Re: [PATCH v2 19/21] arm64: entry: The great stack switcheroo
From: Will Deacon
Date: Thu Oct 01 2026 - 03:28:01 EST
On Wed, Sep 30, 2026 at 11:36:35PM +0200, Linus Walleij wrote:
> 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...
Please can you share the panic message? I'll definitely be reworking
this based on the review comments, but if there's a bug it would be
great to see the details now!
Thanks,
Will