[PATCH v2 02/21] arm64: entry: Only check for stack overflow on exceptions from EL1
Linus Walleij
linusw at kernel.org
Wed Sep 30 13:50:35 PDT 2026
On Fri, Sep 18, 2026 at 6:14 PM Will Deacon <will at kernel.org> wrote:
> Checking for kernel stack overflow on entry from EL0 is largely
> pointless and gets in the way of using SPSel to switch to the overflow
> stack. If the kernel stack overflows on entry from userspace, that
> implies that it was unbalanced on the last exception return which means
> we can't sensibly reason about the state of the system given that we
> could've returned to an arbitrary virtual address in an arbitrary mode.
>
> Remove the stack overflow check from the EL0 exception entry path.
>
> Cc: Mark Rutland <mark.rutland at arm.com>
> Signed-off-by: Will Deacon <will at kernel.org>
I agree with this reasoning, and it confirms my own understanding
of the futility of checking this at entry from EL0.
Reviewed-by: Linus Walleij <linusw at kernel.org>
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list