Skip to content

Commit 3bb548b

Browse files
committed
eBPF.md: Document BPF_PSEUDO_KFUNC_CALL for the call instruction
When the source register of a call instruction is set to BPF_PSEUDO_KFUNC_CALL (2), then the call refers to a kernel function. This is different from a helper function, in that the function is not specific to BPF programs (but it must be explicitly marked as call-able from BPF programs). This is supported in the kernel since commit: e6ac2450d6de ("bpf: Support bpf program calling kernel function")
1 parent 0fc3a24 commit 3bb548b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

eBPF.md

+1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ Opcode | Mnemonic | Pseudocode
193193
0xdd | jsle dst, src, +off | PC += off if dst <= src (signed)
194194
0x85 (src = 0) | call imm | Helper function call
195195
0x85 (src = 1) | call imm | BPF function call
196+
0x85 (src = 2) | call imm | Kernel function call
196197
0x95 | exit | return r0
197198

198199
### 32-bit

0 commit comments

Comments
 (0)