ftrace_graph_top_ret_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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

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