ftrace_graph_top_ret_addr(9)
β¨ ftrace_graph_top_ret_addr π
okay so bestie, welcome to the kernel API manual β this one's a little function with main character energy, and honestly? it's giving "short but iconic." π
πΈ NAME
ftrace_graph_top_ret_addr β returns the top return address in the shadow stack π¦
like, literally. that's the whole vibe.
β¨ SYNOPSIS
unsigned long ftrace_graph_top_ret_addr (struct task_struct *task );
that's it, that's the signature. no cap. π
π«Ά ARGUMENTS
taskβ the task you wanna read the shadow stack from. that's the whole assignment bestie, just hand it the task and it'll go look. π
π DESCRIPTION
okay so here's the tea β: this function returns the first return address on the shadow stack of the task β and here's the important bit β it's not the fgraph's return_to_handler. so like, we're skipping past that one, that's not the one we want, we want the top one that isn't that. periods. π
basically: shadow stack, top rung, not return_to_handler, slay. π₯
π SEE ALSO
- Kernel file
./kernel/trace/fgraph.c fgraph_reserve_data(9)fgraph_retrieve_data(9)fgraph_get_task_var(9)fgraph_retrieve_parent_data(9)ftrace_graph_stop(9)ftrace_graph_get_ret_stack(9)ftrace_graph_ret_addr(9)
go read those if you want the full lore, iykyk β
and that's a wrap bestie!! this lil page lives in ./kernel/trace, dated October 2026, and it's part of the Kernel API Manual β mwah, drink water, and may your shadow stack always be immaculate π§π
π¦ 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