Re: [PATCH 2/2] x86/fred: Fix stack depot filtering of FRED event stacks

From: Peter Zijlstra

Date: Mon Aug 31 2026 - 07:58:05 EST


On Mon, Aug 31, 2026 at 07:25:24PM +0800, Yuanhe Shu wrote:
> 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.

That seems fine, thank you!