unregister_ftrace_direct(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… unregister_ftrace_direct(9) ✨

okay so this is the Kernel API Manual page for unregister_ftrace_direct, and it’s literally about undoing a direct-call setup, bestie. no cap 🫢


πŸŽ€ NAME πŸŽ€

unregister_ftrace_direct β€” remove calls to the custom trampoline that register_ftrace_direct previously registered for the @ops object. that’s the whole vibe πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

int unregister_ftrace_direct (struct ftrace_ops *ops , unsigned long
addr , bool free_filters );

🌸 ARGUMENTS 🌸

  • ops β€” the address of the struct ftrace_ops object. yes, that one πŸ‘‘
  • addr β€” the address of the direct function that the ops functions call. the main-character address fr fr πŸ’…
  • free_filters β€” set it to true to remove all filters for the ftrace_ops; set it to false otherwise. choose wisely πŸŽ€

🧚 DESCRIPTION 🧚

this is used to remove direct calls to addr from the nop locations of the functions registered in ops β€” the ones registered with the ftrace_set_filter_ip function. it’s giving cleanup era, and honestly? obsessed 🧹✨


πŸ”₯ RETURN πŸ”₯

  • 0 β€” success, slay πŸ’–
  • -EINVAL β€” the ops object was not properly registered. not iconic, but important 😭

🌈 SEE ALSO 🌈

Kernel file ./kernel/trace/ftrace.c: 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), 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_set_filter_ips(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) β€” that’s the full guest list, no gatekeeping πŸ’œ


source/version ./kernel/trace β€’ date October 2026 β€’ page unregister_ftrace_direct(9) β€” and that’s the whole page, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from