ftrace_init_nop(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ftrace_init_nop(9) ✨

okay so bestie, welcome to page ftrace_init_nop(9) from the Kernel API Manual πŸ’… this one's a kernel-arch-flavored baddie and she is very particular about how you treat her 🫢


🌸 NAME 🌸

ftrace_init_nop β€” initialize a nop call site ✨


πŸŽ€ SYNOPSIS πŸŽ€

int ftrace_init_nop (struct module *mod , struct dyn_ftrace *rec );

πŸ’– ARGUMENTS πŸ’–

  • mod β€” the module structure, but only if you're being called by module load initialization πŸ‘€
  • rec β€” the call site record (think mcount/fentry), the actual spot we're poking at 🎯

πŸ”₯ DESCRIPTION πŸ”₯

okay so this is a very sensitive operation and the arch needs to take great care with it, no cap. like, this is not the moment to freestyle 😭

The operation should carefully read the location, then check to see if what is read is indeed what we expect it to be, and then β€” only on success of that compare β€” it should write to the location. read β†’ verify β†’ write, in that order, periodt πŸ’…

The code segment at rec->ip should contain the contents created by the compiler 🧚

The 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, so don't be out here inventing your own return codes bestie, that's not the vibe ⭐

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/ftrace.h, plus these iconic little references:


and that's the whole page, main character energy complete πŸ‘‘ this lil gem lives in ./include/linux and it's dated October 2026 β€” signature ftrace_init_nop(9), mwah πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from