modify_ftrace_direct(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– modify_ftrace_direct(9) πŸ’–

okay so bestie, this is the Kernel API Manual page for modify_ftrace_direct(9) β€” the function that’s literally here to modify an existing direct 'multi' call to call something else. it’s giving kernel-level main character energy, and we’re gonna read it together, fr fr. πŸ’…

✨ NAME ✨

modify_ftrace_direct β€” modify an existing direct 'multi' call to call something else. periodt.

🌸 SYNOPSIS 🌸

int modify_ftrace_direct (struct ftrace_ops *ops , unsigned long addr );

πŸŽ€ ARGUMENTS πŸŽ€

  • ops β€” the address of the struct ftrace_ops object. yeah, that one 🫢
  • addr β€” the address of the new trampoline to call at ops functions.

πŸ¦‹ DESCRIPTION πŸ¦‹

So what’s the vibe? This is used to unregister the direct caller that’s currently registered, and then register a new one β€” addr β€” on the functions registered in the ops object. basically a switcheroo, but for callbacks. iconic behavior, honestly. ✨

⚠️ important little caveat, bestie: the way that there’s a window between ftrace_shutdown and ftrace_startup calls where there will be no callbacks called is lowkey ominous, ngl. not me stressing about the gap 😭

πŸ”₯ RETURN πŸ”₯

  • zero on success. slay. πŸ’–
  • Non zero on error, which includes -EINVAL β€” the ops object was not properly registered.

🌈 SEE ALSO 🌈

Kernel file: ./kernel/trace/ftrace.c


xoxo, bestie β€” this page is sourced from ./kernel/trace, dated October 2026. stay iconic, and maybe go touch some kernel code πŸ’–βœ¨

πŸ“¦ where this page comes from