Re: [PATCH v2 19/21] arm64: entry: The great stack switcheroo

From: Linus Walleij

Date: Wed Sep 30 2026 - 19:59:21 EST


On Fri, Sep 18, 2026 at 6:15 PM Will Deacon <will@xxxxxxxxxx> wrote:

> With the kernel stack pointer in SP_EL1 and the overflow stack pointer
> in SP_EL0, it is now straightforward to switch between the two on
> exception entry from EL1 by writing to SPSel. However, since exception
> entry sets PSTATE.SP to 1 (selecting SP_EL1 as the stack pointer),
> repurposing the overflow stack as a more general kernel exception stack
> would require writing to SPSel on every exception entry from the kernel.
>
> Switch things around so that the overflow stack resides in SP_EL1, with
> the kernel stack residing in SP_EL0.
>
> Signed-off-by: Will Deacon <will@xxxxxxxxxx>

This patch gives me panic, and as can be seen from the review
comments need some love...

I think maybe we can merge the initial part of the patch series
first (up until the overflow stack gets worthy of its name at least)
for one kernel release and continue from there after we hashed
out that part?

That said I see no direct problem with this approach, other than
it may have side effects on some expected behaviours we cannot
foresee.

Yours,
Linus Walleij