trace_call_bpf(9)
β¨ trace_call_bpf(9) β the Kernel API Manual glow-up β¨
okay so bestie, this is trace_call_bpf from section 9 of the Kernel API Manual, and it's literally the little helper that makes BPF programs run from tracepoint-land π
π NAME π
trace_call_bpf β invoke BPF program π¦
β SYNOPSIS β
unsigned int trace_call_bpf (struct trace_event_call *call , void *ctx );
no cap, that's the whole signature π«Ά
πΈ ARGUMENTS πΈ
callβ the tracepoint event πctxβ an opaque context pointer (opaque like your crush's texts, iykyk π)
π DESCRIPTION π
so here's the tea: kprobe handlers execute BPF programs via this helper, periodt β‘
and lowkey it can be used from static tracepoints in the future β that's the plan, it's giving main character energy for later π
π₯ RETURN π₯
BPF programs always return an integer, and the kprobe handler interprets it like this:
0β return from kprobe (the event is filtered out) π1β store the kprobe event into the ring buffer β¨
any other values are reserved, and currently they alias to 1 π« β so don't get cute with your return values, bestie
π§ SEE ALSO π§
- Kernel file
./kernel/trace/bpf_trace.cπ trace_call_bpf_faultable(9)π
ngl this one's short and sweet β the whole vibe is "hand it a tracepoint and a context, get an integer back, slay" π
and that's the page, fr fr β¨ source is ./kernel/trace, version stamped October 2026, and it's trace_call_bpf(9) β go off, bestie ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms