Skip to content

Kernel support

gobpfgo supports Linux 5.10 and newer, on amd64 and arm64. This page is the manual’s summary of Kernel, feature and architecture support in the repository, which is the full table, with a note on every row, and the page to check when the two disagree.

Read the versions below with four rules in mind:

  • 5.10 is the floor. Nothing older is tested or supported.
  • A version is a minimum. It is the oldest upstream kernel where gobpfgo can use the feature; newer kernels keep it.
  • The loader probes the running kernel, as libbpf does, and converts or drops what the kernel cannot take, such as newer BTF kinds. A feature the kernel lacks fails the call that needs it with the kernel’s errno, such as EINVAL, EOPNOTSUPP or ENOTSUPP (524).
  • Distribution kernels backport BPF features, so a feature can work on a kernel whose version number is older than the minimum. Probe for the feature, as the production chapter shows, rather than compare versions.

“any” means the feature runs in user space and makes no bpf() call.

The root suite, which loads and attaches, and the unprivileged suite run on six kernels. On 2026-11-30 both passed on all six at 5b08de7.

Arch Kernel Distribution Role
amd64 5.10.262 Debian 11 The floor
amd64 6.18.63 Arch Linux, LTS kernel Generates the oracle fixtures and runs the benchmarks
amd64 7.3.6 Arch Linux First tier with per-CPU global data and tracing multi
amd64 7.4-rc4 Fedora Rawhide First tier with callx and cgroup struct_ops
arm64 6.17 Ubuntu 25.10 Generates the arm64 layout fixtures
arm64 5.10 Debian 11.11 The arm64 floor, without BPF trampolines

A feature a kernel lacks skips its tests on that tier, and the skip names the missing feature. CI builds, vets and runs the unprivileged suite on every pull request. No arm64 tier runs a kernel newer than 6.17 yet, so on arm64 the tests do not exercise the features that need a newer kernel, such as per-CPU global data, tracing multi, callx and cgroup struct_ops.

Feature amd64 arm64 Note
Object open and load, BTF-defined maps, global data 5.10 5.10 The open alone needs no kernel.
CO-RE relocations, .kconfig and .ksyms externs 5.10 5.10 CO-RE needs kernel BTF, or a BTF file given as BtfCustomPath.
Static linker, BTF dedup, BTF and typed-data dumps any any
Perf buffer 5.10 5.10
Ring buffer 5.10 5.10 In the kernel since 5.8, below gobpfgo’s floor.
User ring buffer 6.1 6.1
struct_ops maps 5.10 6.0 The callbacks need BPF trampolines, which arm64 has from 6.0.
struct_ops links 6.4 6.4 Swapping a link’s map, Link.UpdateMap, needs 6.4 too.
struct_ops links on cgroups 7.4 7.4 Needs a struct_ops type the kernel attaches to cgroups, such as bpf_tcp_ops. 6.18 and 7.3.6 ignore the cgroup and register the map for the whole system, as they do for libbpf.
Arena globals 6.9 6.9
Per-CPU global data (.percpu) 7.3 7.3 Older kernels skip the data map; a program that uses it fails to load.
Exceptions (bpf_throw) 6.7 6.7 No arm64 tier exercises them: the 6.17 kernel hangs in bpf_throw under fentry, so that test skips.
Function pointers in read-only data (callx) 7.4 7.4 Needs the BPF JIT.
Feature amd64 arm64 Note
Tracepoint, kprobe, kretprobe, uprobe, uretprobe 5.10 5.10 The Default, Legacy and Perf attach modes; the Link mode from 5.15.
BPF cookie 5.15 5.15 Carried by perf links.
USDT 5.10 5.10 One uprobe per call site, and one uprobe multi link from 6.6.
fentry, fexit, fmod_ret 5.10 6.0 arm64 has no BPF trampoline before 6.0.
freplace 5.10 6.0 The same trampoline requirement.
LSM 5.10 6.0 Needs bpf in the boot lsm= list.
iter 5.10 5.10
kprobe multi 5.18 6.14 arm64 has fprobe, which these links use, from 6.14.
kprobe session 6.10 6.14 The same fprobe requirement on arm64.
uprobe multi 6.6 6.6
uprobe session 6.13 6.13
Tracing multi: fentry.multi, fexit.multi, fsession.multi 7.2 7.2
Kernel module attach targets 5.11 5.11 Needs module BTF; the fentry forms also need 6.0 on arm64.
Feature amd64 arm64 Note
XDP link, and its update 5.10 5.10 In the kernel since 5.9.
tcx 6.6 6.6 gobpfgo attaches tc programs through tcx only.
netkit 6.7 6.7
netfilter 6.4 6.4
sockmap links 6.10 6.10
cgroup links 5.10 5.10
cgroup program revisions 6.17 6.17 BPF_F_BEFORE, BPF_F_AFTER and the expected revision in BpfCgroupOpts.
  • The BPF system call: CONFIG_BPF_SYSCALL=y, and CONFIG_BPF_JIT=y for callx and arenas.
  • Kernel BTF: CONFIG_DEBUG_INFO_BTF=y, which the loader reads from /sys/kernel/btf/vmlinux. CO-RE, typed .ksyms, fentry, fexit, LSM, struct_ops, iter and tracing multi need it. BtfCustomPath can supply the BTF for CO-RE instead.
  • Module BTF: CONFIG_DEBUG_INFO_BTF_MODULES=y, for module:function targets, module struct_ops types and module .ksyms.
  • tracefs, mounted at /sys/kernel/tracing or /sys/kernel/debug/tracing, for tracepoints, the Legacy kprobe and uprobe modes, and the function lists that kprobe multi patterns read.
  • fprobe: CONFIG_FPROBE=y, for kprobe multi and kprobe session.
  • bpffs, mounted at /sys/fs/bpf, to pin maps, programs and links.
  • BPF LSM: CONFIG_BPF_LSM=y and bpf in the boot lsm= list, which /sys/kernel/security/lsm shows.
  • Kernel symbols: a readable /proc/kallsyms for .ksyms and module targets, and CONFIG_KALLSYMS_ALL=y for data symbols.
  • Permissions: loading and attaching need root, or CAP_BPF with CAP_PERFMON for tracing programs and CAP_NET_ADMIN for networking ones. Opening objects, linking, dedup and dumps need no privilege. The production chapter covers the files a tool also reads.

Install shows the commands that check a kernel before the tutorial.