aurae-runtime / aurae

Distributed systems runtime daemon written in Rust.
https://aurae.io
Apache License 2.0
1.85k stars 91 forks source link

Use correct license header when loading BPF programs #377

Closed JeroenSoeters closed 1 year ago

JeroenSoeters commented 1 year ago

This PR ensures we send the correct license string to the kernel, as Aya was defaulting to "GPL".

Local strace output after adding this elf section:

[pid 56599] bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_TRACEPOINT, insn_cnt=31, insns=0x555556e28d00, license="Dual MIT/GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(6, 1, 9), prog_flags=0, prog_name="signals", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0, func_info_rec_size=0, func_info=NULL, func_info_cnt=0, line_info_rec_size=0, line_info=NULL, line_info_cnt=0, attach_btf_id=0, attach_prog_fd=0, fd_array=NULL}, 144) = 12