kprobe_on_func_entry(9)
π kprobe_on_func_entry(9) β a Kernel API Manual moment
ok so bestie, welcome to the Kernel API Manual entry for kprobe_on_func_entry(9). this one's a little vibe-checker function, she just looks at an address and tells you if it's the actual entry of a function or not. no cap, that's the whole gig. β¨
πΈ NAME πΈ
kprobe_on_func_entry β check whether given address is function entry
like literally. that's her job. she checks. she reports. she leaves. π
π SYNOPSIS π
int kprobe_on_func_entry (kprobe_opcode_t *addr , const char *sym ,
unsigned long offset );
yes the spacing in the signature is giving "written by a kernel dev at 3am" and we respect it π keep it exactly like that, bestie, it's canon.
π¦ ARGUMENTS π¦
addrβ Target address. the actual memory address you're curious about π«Άsymβ Target symbol name. the name-brand version of the same question β¨offsetβ The offset from the symbol or the address. so like, your little scoot away from wherever you started π
π₯ DESCRIPTION π₯
okay so here's the tea β: this function checks whether the given addr+offset or sym+offset lands exactly on the function entry address. that's it. that's the whole plot.
the receipts come back like this:
- returns
0if it is the function entry β she ate, she's iconic, green light π - returns
-EINVALif it is not the function entry π - also returns
-ENOENTif it fails the symbol or address lookup β like the lookup just ghosted her π»
β οΈ real talk though, bestie: the caller must passaddrorsym(either one must beNULLβ yep, exactly one of them, that's the rule), or this returns-EINVAL. so don't be out here passing both and then acting surprised. π
π SEE ALSO π
- Kernel file
./kernel/kprobes.c__get_insn_slot(9) kretprobe_find_ret_addr(9)
go read those too, they're lowkey part of the same friend group π§
and that's the whole page, bestie, no notes π
this masterpiece came from ./kernel, dated October 2026, and she's officially catalogued as kprobe_on_func_entry(9). periodt. πβ
π¦ 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