From: Andrew Morton <akpm@linux-foundation.org>
To: Yuanhe Shu <xiangzao@linux.alibaba.com>
Cc: tglx@kernel.org, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
xin@zytor.com, luto@kernel.org, jpoimboe@kernel.org,
peterz@infradead.org, rostedt@goodmis.org, rdunlap@infradead.org,
elver@google.com, andreyknvl@gmail.com, glider@google.com,
gor@linux.ibm.com, kasan-dev@googlegroups.com,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/2] stacktrace: Provide arch_in_irqentry_text() hook
Date: Thu, 27 Aug 2026 16:06:15 -0700 [thread overview]
Message-ID: <20260827160615.c5cd19af1e4d9287d7870fb3@linux-foundation.org> (raw)
In-Reply-To: <20260827150022.1618235-2-xiangzao@linux.alibaba.com>
On Thu, 27 Aug 2026 23:00:21 +0800 Yuanhe Shu <xiangzao@linux.alibaba.com> wrote:
> in_irqentry_text() decides whether a stack address belongs to interrupt
> entry code by checking the .irqentry.text and .softirqentry.text section
> ranges. filter_irq_stacks() uses it to truncate interrupt stacks at the
> entry point, which stack depot depends on to deduplicate them: traces
> that continue past the interrupt entry lead to unbounded depot growth,
> see commit e94006608949 ("lib/stackdepot: always do filter_irq_stacks()
> in stack_depot_save()").
>
> An architecture may deliver interrupts through entry code that cannot be
> placed in .irqentry.text. in_irqentry_text() then never recognizes the
> entry point and the truncation silently stops happening. The markers are
> meant to cover all interrupt entry functions; when they do not, the depot
> ends up holding essentially random stacks:
>
> https://lore.kernel.org/all/CACT4Y+aReMGLYua2rCLHgFpS9io5cZC04Q8GLs-uNmrn1ezxYQ@mail.gmail.com/
>
> Add an optional arch_in_irqentry_text() hook, consulted in addition to
> the section range checks, gated on a new ARCH_HAS_IN_IRQENTRY_TEXT
> symbol. Gating keeps the default a static inline returning false, which
> folds away entirely on every architecture that does not opt in, instead
> of a __weak stub that every architecture would have to call. This
> mirrors the existing ARCH_HAS_* hooks in lib/Kconfig such as
> ARCH_HAS_COPY_MC.
>
> No functional change on its own.
>
> The first user is the FRED fix in the follow-up patch, which carries a
> Fixes: tag and is Cc'ed to stable; tag this prerequisite for stable too,
> so the two are picked up as a pair.
Good call. I suggest that the same Fixes: be attached to this patch
also, to help ensure that everything lands in the correct place.
I'll assume that both patches will be handled by the x86 maintainers.
next prev parent reply other threads:[~2026-08-27 23:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 15:00 [PATCH 0/2] x86/fred: Fix stack depot exhaustion on FRED systems Yuanhe Shu
2026-08-27 15:00 ` [PATCH 1/2] stacktrace: Provide arch_in_irqentry_text() hook Yuanhe Shu
2026-08-27 17:04 ` Bradley Morgan
2026-08-27 23:06 ` Andrew Morton [this message]
2026-08-27 15:00 ` [PATCH 2/2] x86/fred: Fix stack depot filtering of FRED event stacks Yuanhe Shu
2026-08-27 21:26 ` H. Peter Anvin
2026-08-29 9:42 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260827160615.c5cd19af1e4d9287d7870fb3@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=gor@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=stable@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
--cc=xiangzao@linux.alibaba.com \
--cc=xin@zytor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®