Re: [PATCH 2/2] x86/fred: Fix stack depot filtering of FRED event stacks
From: Yuanhe Shu
Date: Mon Aug 31 2026 - 07:28:56 EST
On Mon, Aug 31, 2026 at 11:01:24AM +0200, Peter Zijlstra wrote:
> I would still argue the function name is incorrect, and the user might
> want a comment explaining this.
You are right, and it predates FRED: the ranges in_irqentry_text() tests
have always covered the asm_exc_* stubs, so it has never been literally
irq-only either. The hook inherited the wording because I named it after
the helper it extends, the way arch_nmi_enter() is named after
nmi_enter().
v2 renames both: in_event_entry_text() and arch_in_event_entry_text().
The helper is file local with a single caller, so the rename stays inside
kernel/stacktrace.c; filter_irq_stacks() keeps its name since it is
exported and used treewide. Both the generic definition and the x86 hook
now carry a comment saying the range is where a trace entered the kernel
and covers syscall entry on some architectures; the x86 one also spells
out why matching it is a no-op for filter_irq_stacks().
If you would rather have a different name, say so and I will respin.
Thanks,
Yuanhe