ftrace_set_filter_ips(9)
π 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 inips. gotta tell it how many names are on the list, bestie π’removeβ non zero to removeipsfrom 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 theipsarray, or any ip specified within it, isNULL, 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 π β
ftrace_lookup_ip(9)ftrace_free_filter(9)ftrace_hash_move(9)ftrace_location_range(9)ftrace_location(9)ftrace_text_reserved(9)ftrace_bug(9)ftrace_update_record(9)ftrace_test_record(9)ftrace_get_addr_new(9)ftrace_get_addr_curr(9)ftrace_rec_iter_start(9)ftrace_rec_iter_next(9)ftrace_rec_iter_record(9)ftrace_run_stop_machine(9)arch_ftrace_update_code(9)ftrace_startup_subops(9)ftrace_shutdown_subops(9)ftrace_regex_open(9)allocate_ftrace_func_mapper(9)ftrace_func_mapper_find_ip(9)ftrace_func_mapper_add_ip(9)ftrace_func_mapper_remove_ip(9)free_ftrace_func_mapper(9)register_ftrace_direct(9)unregister_ftrace_direct(9)modify_ftrace_direct_nolock(9)modify_ftrace_direct(9)hash_add(9)update_ftrace_direct_add(9)hash_sub(9)update_ftrace_direct_del(9)update_ftrace_direct_mod(9)ftrace_set_filter_ip(9)ftrace_ops_set_global_filter(9)ftrace_set_filter(9)ftrace_set_notrace(9)ftrace_set_global_filter(9)ftrace_set_global_notrace(9)ftrace_ops_get_func(9)ftrace_kill(9)ftrace_is_dead(9)register_ftrace_function(9)unregister_ftrace_function(9)ftrace_lookup_symbols(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms