[PATCH] powerpc/32: Fix vmap stack - Properly set r1 before activating MMU on syscall too
Michael Ellerman
patch-notifications at ellerman.id.au
Wed Dec 23 00:11:22 AEDT 2020
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
More information about the Linuxppc-dev
mailing list