[PATCH] arm64: Make sure SPsel is always set

Catalin Marinas catalin.marinas at arm.com
Tue Sep 26 09:16:07 PDT 2017


On Tue, Sep 26, 2017 at 03:57:16PM +0100, Will Deacon wrote:
> From: Marc Zyngier <marc.zyngier at arm.com>
> 
> When the kernel is entered at EL2 on an ARMv8.0 system, we construct
> the EL1 pstate and make sure this uses the the EL1 stack pointer
> (we perform an exception return to EL1h).
> 
> But if the kernel is either entered at EL1 or stays at EL2 (because
> we're on a VHE-capable system), we fail to set SPsel, and use whatever
> stack selection the higher exception level has choosen for us.
> 
> Let's not take any chance, and make sure that SPsel is set to one
> before we decide the mode we're going to run in.
> 
> Cc: <stable at vger.kernel.org>
> Acked-by: Mark Rutland <mark.rutland at arm.com>
> Signed-off-by: Marc Zyngier <marc.zyngier at arm.com>
> Signed-off-by: Will Deacon <will.deacon at arm.com>

Queued for 4.14-rc3. Thanks.

-- 
Catalin



More information about the linux-arm-kernel mailing list