When are section names needed with eBPF programs and when are they not necessary? This example does not specify a section for the kprobe while the example here does.
1
There are 1 best solutions below
Related Questions in EBPF
- How to monitor the traffic of Android applications uploading images?
- R2 max value is outside of the allowed memory range after explicit bounds checking
- invalid access to map value, value_size=128 off=0 size=0; libbpf: prog 'xdp_parser_func': failed to load: -13
- ebpf not displaying output with tracing_pipe
- ebpf: about the kfuncs call and MAX_BPF_STACK
- Ebpf: Invalid access to map value, with weird compiled code
- Ebpf Kernel Code: permission denied: invalid access to map value
- Invalid access to packet while iterating over packet in eBPF program , with “bpf_trace_printk”
- Where are the "hooks" for BPF functions defined?
- How to iterate vm_area in bpf/bcc program?
- BCC tool execute failed on Android by debianfs
- unknown type name ‘GElf_Nhdr’; did you mean ‘GElf_Shdr’?
- ebpf hook some points, after running for a while. the system is hang ,is kernel bug?
- How do I initialize/reinitialize BPF_MAP_TYPE_PERCPU_HASH entry to zero for all CPUs?
- BPF per CPU array is not zero initialized?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Section names are typically used to give the loader information about the BPF program, such as its type, its position in a tail call map, the type of attachment point, etc. Some loaders, such as bcc, support other ways of passing this information, either via the function name or explicitly in the loader's code.
Your first example shows a bcc program. In that example, the type of BPF program (
kprobe) and the attachment point (kernel functionoom_kill_process) are both given by the function name (kprobe__oom_kill_process), per the bcc convention. bcc also allows you to set the program type on the Python side, with:Your second example seems to follow the libbpf convention. In that case, the section name is used to pass the type of BPF program, the type of attachment, whether it's a sleepable program, etc.