diff options
| author | Breno Leitao <leitao@debian.org> | 2026-11-12 07:18:42 -0800 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2026-11-20 10:02:36 -0500 |
| commit | 65f42f1fa03829e0ab1473369461a7aabf525cb2 (patch) | |
| tree | f96b0d6aa6d582a8ad32109c7d097e994977febe /rust/kernel/alloc/kvec/errors.rs | |
| parent | c62206dfe9c80490de8cc2d211fb28eea4958240 (diff) | |
fgraph: Do not mark index 0 in every shadow stack frame
We are seeing this warning on an arm64 host:
WARNING: kernel/trace/fprobe.c:676 at fprobe_return+0x260/0x2c8, CPU#16: FuncSched/3281330
Call trace:
fprobe_return+0x260/0x2c8 (P)
ftrace_return_to_handler+0x2bc/0x5a8
return_to_handler+0x20/0x48
futex_wait+0xa4/0x218
do_futex+0xb4/0x1d0
__arm64_sys_futex+0x15c/0x278
The theory is that function_graph_enter_regs() sets BIT(0) in the bitmap
of every frame, a leftover of an old tail-call check, while the return
path calls the retfunc of every set bit.
A reproducer on linux-next supports the theory. On a fresh boot, with no
other fgraph user yet:
cd /sys/kernel/tracing
echo 'f:fpexit vfs_read%return' >> dynamic_events
echo 1 > events/fprobes/fpexit/enable # fprobe_graph_ops: index 0
echo vfs_write > set_ftrace_filter
echo function_graph > current_tracer # function_graph: index 1
echo x > /dev/null # WARN on vfs_write return
Removing the bit was agreed in the review of the series that added it
[0], but the line stayed. Drop it now.
[0] https://lore.kernel.org/all/20240527093436.7060d358a64cc2ea3213b07b@kernel.org/
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261112-fgraph-bit0-v1-1-695ad14f4b1e@debian.org
Fixes: 7aa1eaef9f42 ("function_graph: Allow multiple users to attach to function graph")
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
