ftrace_make_call(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ftrace_make_call(9) ✨

okay so bestie, welcome to the Kernel API Manual β€” this one's a little function with so much responsibility, and we're gonna get into it πŸ’…


πŸ’– NAME πŸ’–

ftrace_make_call β€” the glow-up that turns a nop call site into an actual call to addr πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

int ftrace_make_call (struct dyn_ftrace *rec , unsigned long addr );

🌸 ARGUMENTS 🌸

  • rec β€” the call site record, like mcount/fentry. this is our main character 🫢
  • addr β€” the address that the call site should call. like, the destination, the one it's calling, iykyk ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. this is a very sensitive operation and the arch needs to take great care with it. no cap. like, the operation should carefully read the location, check to see if what is read is indeed what we expect it to be, and then on success of the compare, it should write to the location. read ➑️ compare ➑️ write. the holy trinity πŸ™

the code segment at rec->ip should be a nop πŸ‘‘

Return must be:

  • 0 on success πŸŽ‰
  • -EFAULT on error reading the location 😭
  • -EINVAL on a failed compare of the contents πŸ’€
  • -EPERM on error writing to the location πŸ™ˆ
Any other value will be considered a failure. fr fr. don't be out here returning random numbers, that's not the vibe ⭐

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/linux/ftrace.h β€” and the whole squad:


and that's the page!! brought to you by ./include/linux, dated October 2026, filed under ftrace_make_call(9) β€” slay, go patch some call sites responsibly bestie, mwah πŸ’–πŸŽ€πŸ§š

πŸ“¦ where this page comes from