kprobe_on_func_entry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 0 if it is the function entry β€” she ate, she's iconic, green light πŸ’š
  • returns -EINVAL if it is not the function entry 😭
  • also returns -ENOENT if it fails the symbol or address lookup β€” like the lookup just ghosted her πŸ‘»
⚠️ real talk though, bestie: the caller must pass addr or sym (either one must be NULL β€” 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 πŸ’œ

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