syscall.sh / sh / bpf

bpf

perform a command on an extended BPF map or program

sys_bpf(int cmd, union bpf_attr *attr, unsigned int size, struct bpf_common_attr *attr_common, unsigned int size_common)
number375 (0x177)
abicommon
entry pointsys_bpf
sinceLinux 5.0
man pagebpf(2)
sourceelixir.bootlin.com

Registers

registervalue
r3375, the syscall number
r4int cmd
r5union bpf_attr *attr
r6unsigned int size
r7struct bpf_common_attr *attr_common
r0unsigned int size_common
r0the return value

Then run trapa #31 to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/sh/bpf