fgraph_reserve_data(9)
β¨ fgraph_reserve_data β¨
okay so bestie, welcome to fgraph_reserve_data β that's a section 9 (kernel API) manual page, and yes it's giving "we're doing kernel tracing today" π
πΈ NAME πΈ
fgraph_reserve_data β reserve storage on the task's ret_stack, no cap π
π¦ SYNOPSIS π¦
void * fgraph_reserve_data (int idx , int size_bytes );
π ARGUMENTS π
idxβ the index offgraph_array. that's it, that's the whole vibe.size_bytesβ the size in bytes to reserve. literally how much space you want, in bytes π
π DESCRIPTION π
so here's the tea β β this function reserves space of up to FGRAPH_MAX_DATA_SIZE bytes on the task's ret_stack shadow stack, for a given fgraph_ops, during the entryfunc call. iconic behaviour honestly.
if entryfunc returns zero, the storage is discarded β like, gone, poof, never happened π
an entryfunc can only call this once per iteration. one. single. time. don't be greedy babes π
the fgraph_ops retfunc can then retrieve this stored data with fgraph_retrieve_data. cute little hand-off, we love to see it π«Ά
π₯ RETURN π₯
on success, you get a pointer to the data on the stack β¨
otherwise? NULL π and there's two reasons that can happen:
- there's not enough space left on the
ret_stackfor the data - or
fgraph_reserve_datawas called more than once for a singleentryfunccall (told you β once per iteration, bestie π)
π SEE ALSO π
- the kernel file
./kernel/trace/fgraph.c 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_top_ret_addr(9)ftrace_graph_ret_addr(9)
go read them, they're all main character energy fr fr π
and that's the whole page!! this little icon lives in ./kernel/trace, dated October 2026, part of the Kernel API Manual. mwah, slay, periodt ππ
π
π¦ 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