KFuncs (Linux)
Stability guarantees
Helper functions enjoy the stability guarantee offered by the user API, as explained in documentation about stability guarantees of the helper functions. But KFuncs do not enjoy those same guarantees.
Although KFuncs are not expected to be very volatile, defensive programming techniques are still advised. Otherwise helper functions should be preferred over KFuncs.
cGroup statistics KFuncs
cGroup resource statistics KFuncs
These KFuncs are used to update or flush cGroup resource statistics efficiently.
cGroup memory statistics KFuncs
These KFuncs are used to read and flush cGroup memory statistics.
Key signature verification KFuncs
These KFuncs are used to verify
File related kfuncs
CPU mask KFuncs
bpf_cpumask_createbpf_cpumask_releasebpf_cpumask_acquirebpf_cpumask_firstbpf_cpumask_first_zerobpf_cpumask_first_andbpf_cpumask_set_cpubpf_cpumask_clear_cpubpf_cpumask_test_cpubpf_cpumask_test_and_set_cpubpf_cpumask_test_and_clear_cpubpf_cpumask_setallbpf_cpumask_clearbpf_cpumask_andbpf_cpumask_orbpf_cpumask_xorbpf_cpumask_equalbpf_cpumask_intersectsbpf_cpumask_subsetbpf_cpumask_emptybpf_cpumask_fullbpf_cpumask_copybpf_cpumask_any_distributebpf_cpumask_any_and_distributebpf_cpumask_weightbpf_cpumask_populate
Generic KFuncs
Object allocation KFuncs
A set of KFuncs to allocate and deallocate custom objects for the purposes of building custom data structures.
bpf_obj_new_implbpf_obj_newbpf_percpu_obj_new_implbpf_percpu_obj_newbpf_obj_drop_implbpf_obj_dropbpf_percpu_obj_drop_implbpf_percpu_obj_dropbpf_refcount_acquire_implbpf_refcount_acquire
BPF linked list KFuncs
BPF Arena KFuncs
KFuncs used to allocate and free pages from an arena.
BPF task KFuncs
Kfuncs used to acquire and release task reference.
BPF Red-Black-tree KFuncs
Kfuncs used to create and modify red-black trees.
Kfuncs for acquiring and releasing cGroup references
These kfuncs allow you to take a reference to a cGroup and store them as kptrs in maps.
Kfuncs for querying tasks
KFuncs for memory allocator inspection
Kfuncs for casting pointers
Kfuncs for taking and releasing RCU read locks
Kfuncs for dynamic pointer slices
Open coded iterators
Kfuncs for open coded numeric iterators
Kfuncs for open coded virtual memory area iterators
Kfuncs for open coded task cGroup iterators
Kfuncs for open coded cGroup iterators
Kfuncs for open coded task iterators
Kfuncs for bits
Kfuncs for slab memory allocation iterators
Kfuncs for sched_ext dispatch queue iterators
Kfuncs for DMA buffer iterators
Kfuncs for dynamic pointers
Preemption KFuncs
Work-queue KFuncs
Misc KFuncs
Timer KFuncs
XDP metadata kfuncs
XDP/SKB dynamic pointer kfuncs
Socket related kfuncs
Network crypto kfuncs
BBR congestion control kfuncs
Cubic TCP congestion control kfuncs
DC TCP congestion control kfuncs
TCP Reno congestion control kfuncs
Foo over UDP KFuncs
SYN Cookie KFuncs
Connection tracking KFuncs
XDP KFuncs
XFRM KFuncs
HID Kfuncs
KProbe session Kfuncs
Memory probe Kfuncs
IRQ Kfuncs
sched_ext Kfuncs
scx_bpf_kick_cpuscx_bpf_select_cpu_dflscx_bpf_select_cpu_and__scx_bpf_select_cpu_andscx_bpf_cpu_rqscx_bpf_nowscx_bpf_cpu_currscx_bpf_locked_rqscx_bpf_events
Dispatch Queue Kfuncs
scx_bpf_create_dsqscx_bpf_destroy_dsqscx_bpf_dsq_nr_queuedscx_bpf_dsq_insert(scx_bpf_dispatch)scx_bpf_dsq_insert___v2scx_bpf_dsq_insert_vtime(scx_bpf_dispatch_vtime)scx_bpf_dsq_move_to_local(scx_bpf_consume)scx_bpf_dsq_move_to_local___v2scx_bpf_dsq_move_set_slice(scx_bpf_dispatch_from_dsq_set_slice)scx_bpf_dsq_move_set_vtime(scx_bpf_dispatch_from_dsq_set_vtime)scx_bpf_dsq_move(scx_bpf_dispatch_from_dsq)scx_bpf_dsq_move_vtime(scx_bpf_dispatch_vtime_from_dsq)scx_bpf_reenqueue_localscx_bpf_reenqueue_local___v2scx_bpf_dsq_peekscx_bpf_dsq_reenqscx_bpf_sub_dispatch
Dispatch Kfuncs
Error and debug Kfuncs
CPU performance Kfuncs
CPU mask Kfuncs
Idle CPU mask Kfuncs
Task Kfuncs
CID flavor Kfuncs
NUMA Kfuncs
Resilient Queued spinlock Kfuncs
Sock ops Kfuncs
Memory probe to dynptr Kfuncs
File dynptr Kfuncs
BPF Qdisc kfuncs
String Kfuncs
Debug stream Kfuncs
CGroup xattr Kfuncs
Task work schedule Kfuncs
I/O Userspace Ring Kfuncs
Wake up sources Kfuncs
These kfuncs allow for the iteration of wake-up sources in BPF, which is faster than iteration in userspace via sysfs/debugfs.