BPF Syscall BPF_BTF_LOAD
command
This command loads a BTF object into the kernel.
Return value
This command will return a file descriptor to the created BTF object on success (positive integer) or an error number (negative integer) if something went wrong.
Attributes
btf
This field is a pointer to the BTF information to be loaded.
btf_log_buf
This field is a pointer to a reserved piece of memory where the kernel will write the log to, if enabled.
btf_size
This field is the size of the info indicated by btf
.
btf_log_size
This field is the size of the memory region indicated by btf_log_buf
btf_log_level
This field is the level of detail contained in the log. Possible values are:
0
= no log1
= basic logging (BPF_LOG_LEVEL1
)2
= verbose logging (BPF_LOG_LEVEL2
)
Additionally the 3rd bit is a flag, if set the kernel will output statistics to the log (BPF_LOG_STATS
).