modify_ftrace_direct(9)
π 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 thestruct ftrace_opsobject. yeah, that one π«Άaddrβ the address of the new trampoline to call atopsfunctions.
π¦ 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 betweenftrace_shutdownandftrace_startupcalls where there will be no callbacks called is lowkey ominous, ngl. not me stressing about the gap π
π₯ RETURN π₯
zeroon success. slay. π- Non zero on error, which includes
-EINVALβ theopsobject was not properly registered.
π 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)unregister_ftrace_direct(9)modify_ftrace_direct_nolock(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)
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
- 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