ftrace_set_filter_ips(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ftrace_set_filter_ips(9) β€” Kernel API Manual ✨

okay so bestie, welcome to the ftrace filter-by-addresses page πŸŽ€ this one lives in the Kernel API Manual corner of the world and honestly it's giving "niche but powerful" energy. let's get into it 🫢


✨ NAME ✨

ftrace_set_filter_ips β€” set functions to filter on in ftrace by addresses πŸ“


🌸 SYNOPSIS 🌸

int ftrace_set_filter_ips (struct ftrace_ops *ops , unsigned long *ips ,
unsigned int cnt , int remove , int reset );

like, that's the whole vibe right there. five args, one int coming back at you πŸ’«


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ops β€” the ops you're setting the filter with. this is the main character of the whole operation, no cap πŸ‘‘
  • ips β€” the array of addresses you're adding to (or removing from) the filter. the guest list, basically πŸ“
  • cnt β€” the number of addresses in ips. gotta tell it how many names are on the list, bestie πŸ”’
  • remove β€” non zero to remove ips from the filter. like uninviting people from the party πŸ™ˆ
  • reset β€” non zero to reset all filters before applying this filter. scorched earth, fresh start, periodt πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

So filters denote which functions should be enabled when tracing is enabled ✨ that's the whole point of them.

⚠️ But listen β€” if the ips array, or any ip specified within it, is NULL, it fails to update the filter. no update, no slay, just failure 😭

And here's the part you cannot skip, bestie: this can allocate memory which must be freed before ops can be freed β€” either by removing each filtered addr, or by using ftrace_free_filter(ops). 🧹

πŸ’€ Memory leak warning fr fr: free it before you free ops. those are your two options and you will pick one of them.

🌈 SEE ALSO 🌈

Kernel file ./kernel/trace/ftrace.c and honestly the whole extended ftrace cinematic universe 🌌 β€”

like, that's the whole group chat πŸ’¬ go read them, iykyk πŸ’…


okay that's the page!! sourced from ./kernel/trace, dated October 2026, and it goes by ftrace_set_filter_ips(9) β€” mwah, love that for us πŸ“πŸ’– stay filtered, bestie ✨

πŸ“¦ where this page comes from