[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <160864266247.1929899.17670433500031746494.b4-ty@ellerman.id.au>
Date: Wed, 23 Dec 2020 00:11:22 +1100 (AEDT)
From: Michael Ellerman <patch-notifications@...erman.id.au>
To: Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Paul Mackerras <paulus@...ba.org>
Cc: linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] powerpc/32: Fix vmap stack - Properly set r1 before activating MMU on syscall too
On Mon, 21 Dec 2020 06:18:03 +0000 (UTC), Christophe Leroy wrote:
> We need r1 to be properly set before activating MMU, otherwise any new
> exception taken while saving registers into the stack in syscall
> prologs will use the user stack, which is wrong and will even lockup
> or crash when KUAP is selected.
>
> Do that by switching the meaning of r11 and r1 until we have saved r1
> to the stack: copy r1 into r11 and setup the new stack pointer in r1.
> To avoid complicating and impacting all generic and specific prolog
> code (and more), copy back r1 into r11 once r11 is save onto
> the stack.
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/32: Fix vmap stack - Properly set r1 before activating MMU on syscall too
https://git.kernel.org/powerpc/c/d5c243989fb0cb03c74d7340daca3b819f706ee7
cheers
Powered by blists - more mailing lists