Kernel Configuration for BPF Features

BPF Related Kernel Configurations

FunctionalitiesKernel ConfigurationDescription
BasicCONFIG_BPF_SYSCALLEnable the bpf() system call
CONFIG_BPF_JITBPF programs are normally handled by a BPF interpreter. This option allows the kernel to generate native code when a program is loaded into the kernel. This will significantly speed-up processing of BPF programs
CONFIG_HAVE_BPF_JITEnable BPF Just In Time compiler
CONFIG_HAVE_EBPF_JITExtended BPF JIT (eBPF)
CONFIG_HAVE_CBPF_JITClassic BPF JIT (cBPF)
CONFIG_MODULESEnable to build loadable kernel modules
CONFIG_BPFBPF VM interpreter
CONFIG_BPF_EVENTSAllow the user to attach BPF programs to kprobe, uprobe, and tracepoint events
CONFIG_PERF_EVENTSKernel performance events and counters
CONFIG_HAVE_PERF_EVENTSEnable perf events
CONFIG_PROFILINGEnable the extended profiling support mechanisms used by profilers
BTFCONFIG_DEBUG_INFO_BTFGenerate deduplicated BTF type information from DWARF debug info
CONFIG_PAHOLE_HAS_SPLIT_BTFGenerate BTF for each selected kernel module
CONFIG_DEBUG_INFO_BTF_MODULESGenerate compact split BTF type information for kernel modules
SecurityCONFIG_BPF_JIT_ALWAYS_ONEnable BPF JIT and removes BPF interpreter to avoid speculative execution
CONFIG_BPF_UNPRIV_DEFAULT_OFFDisable unprivileged BPF by default by setting
CgroupCONFIG_CGROUP_BPFSupport for BPF programs attached to cgroups
NetworkCONFIG_BPFILTERBPF based packet filtering framework (BPFILTER)
CONFIG_BPFILTER_UMHThis builds bpfilter kernel module with embedded user mode helper
CONFIG_NET_CLS_BPFBPF-based classifier - to classify packets based on programmable BPF (JIT'ed) filters as an alternative to ematches
CONFIG_NET_ACT_BPFExecute BPF code on packets. The BPF code will decide if the packet should be dropped or not
CONFIG_BPF_STREAM_PARSEREnable this to allow a TCP stream parser to be used with BPF_MAP_TYPE_SOCKMAP
CONFIG_LWTUNNEL_BPFAllow to run BPF programs as a nexthop action following a route lookup for incoming and outgoing packets
CONFIG_NETFILTER_XT_MATCH_BPFBPF matching applies a linux socket filter to each packet and accepts those for which the filter returns non-zero
CONFIG_IPV6_SEG6_BPFTo support BPF seg6local hook. bpf: Add IPv6 Segment Routing helpersy. Reference
kprobesCONFIG_KPROBE_EVENTSThis allows the user to add tracing events (similar to tracepoints) on the fly via the ftrace interface
CONFIG_KPROBESEnable kprobes-based dynamic events
CONFIG_HAVE_KPROBESCheck if krpobes enabled
CONFIG_HAVE_REGS_AND_STACK_ACCESS_APIThis symbol should be selected by an architecture if it supports the API needed to access registers and stack entries from pt_regs. For example the kprobes-based event tracer needs this API.
CONFIG_KPROBES_ON_FTRACEHave kprobes on function tracer if arch supports full passing of pt_regs to function tracing
kprobe multiCONFIG_FPROBEEnable fprobe to attach the probe on multiple functions at once
kprobe overrideCONFIG_BPF_KPROBE_OVERRIDEEnable BPF programs to override a kprobed function
uprobesCONFIG_UPROBE_EVENTSEnable uprobes-based dynamic events
CONFIG_ARCH_SUPPORTS_UPROBESArch specific uprobes support
CONFIG_UPROBESUprobes is the user-space counterpart to kprobes: they enable instrumentation applications (such as ‘perf probe’) to establish unintrusive probes in user-space binaries and libraries, by executing handler functions when the probes are hit by user-space applications.
CONFIG_MMUMMU-based virtualised addressing space support by paged memory management
TracepointsCONFIG_TRACEPOINTSEnable inserting tracepoints in the kernel and connect to proble functions
CONFIG_HAVE_SYSCALL_TRACEPOINTSEnable syscall enter/exit tracing
Raw TracepointsSame as Tracepoints
LSMCONFIG_BPF_LSMEnable instrumentation of the security hooks with BPF programs for implementing dynamic MAC and Audit Policies
LIRCCONFIG_BPF_LIRC_MODE2Allow attaching BPF programs to a lirc device