Make clear the minimal kernel compile config for each ebpf functionalities
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 3
Description
Hi,
I usually see the question
> everything is right (including kernel version, ebpf program, etc), but my ebpf programs still cannot work
Such kind of issues mostly caused by the kernel compile configurations.
However, bpf (at least now) does not provide a useful error message (yes, that's you `load bpf program failed: Invalid argument`) to indicate which kernel configuation is not enabled.
Thus I try to make it clear and give a clear list of the minimal requirements of basic eBPF functionalities.
Please correct me if I am wrong.
| Index |Functionalities| Kernel Configuration | Describtion|
|----|-----------------|---------------------------------------|-------------|
| 1 | Basic | CONFIG_BPF_SYSCALL | Enable the bpf() system call |
| 2 | | CONFIG_BPF_JIT | BPF JIT support |
| 3 | | CONFIG_HAVE_BPF_JIT | the dependency of CONFIG_BPF_JIT |
| 4 | | CONFIG_HAVE_EBPF_JIT | the dependency of CONFIG_BPF_JIT |
| 5 | | CONFIG_HAVE_CBPF_JIT | the dependency of CONFIG_BPF_JIT |
| 6 | | CONFIG_MODULES | the dependency of CONFIG_BPF_JIT and CONFIG_KPROBES |
| 7 | | CONFIG_BPF | Enable BPF VM |
| 8 | | CONFIG_BPF_EVENTS | This allows the user to attach BPF programs to kprobe, uprobe, and tracepoint events. |
| 9 | | CONFIG_PERF_EVENTS | the dependency of CONFIG_BPF_EVENTS and CONFIG_UPROBE_EVENTS |
| 10 | | CONFIG_HAVE_PERF_EVENTS | the dependency of CONFIG_PERF_EVENTS |
| 11 | | CONFIG_PROFILING | the dependency of CONFIG_PERF_EVENTS |
| 12 | CGroup | CONFIG_CGROUP_BPF | Allow attaching eBPF programs to a cgroup |
| 13 | Kprobes | CONFIG_KPROBE_EVENTS | Allow attaching to kprobes |
| 14 | | CONFIG_KPROBES | the dependency of CONFIG_KPROBE_EVENTS |
| 15 | | CONFIG_HAVE_KPROBES | the dependency of CONFIG_KPROBES |
| 16 | | CONFIG_HAVE_REGS_AND_STACK_ACCESS_API | the dependency of CONFIG_KPROBE_EVENTS |
| 17 | Uprobes | CONFIG_UPROBE_EVENTS | Allow attaching to uprobes |
| 18 | | CONFIG_ARCH_SUPPORTS_UPROBES | the dependency of CONFIG_UPROBE_EVENTS |
| 19 | | CONFIG_UPROBES | the dependency of CONFIG_UPROBE_EVENTS |
| 20 | | CONFIG_MMU | the dependency of CONFIG_UPROBE_EVENTS |
| 21 | Tracepoints | CONFIG_TRACEPOINTS | realted to Tracepoints |
| 22 | | CONFIG_HAVE_SYSCALL_TRACEPOINTS | realted to Tracepoints |
| 23 | Raw Tracepoints | Same as Tracepoints | |
Contributor guide
No contributing guide indexed for this repository
Research direction
No repository file or test is named in the issue. Start by validating the listed kernel configuration options and dependencies against Linux kernel configuration documentation, then organize the verified requirements by eBPF functionality; done means the table clearly identifies the minimal configuration for each listed capability.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- documentation, operating-systems
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 39/100