Re: [PATCH v2 19/21] arm64: entry: The great stack switcheroo
From: Will Deacon
Date: Thu Oct 01 2026 - 07:32:48 EST
On Thu, Oct 01, 2026 at 10:38:22AM +0200, Linus Walleij wrote:
> On Thu, Oct 1, 2026 at 9:27 AM Will Deacon <will@xxxxxxxxxx> wrote:
> > 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!
>
> Haha. I was not referring to the kernel function but the emotion ;D
Oh! That kind of panic is easier to fix :) Are you going to LPC?
Will