Thread (2 messages) 2 messages, 2 authors, 2020-12-22

Re: [PATCH] powerpc/32: Fix vmap stack - Properly set r1 before activating MMU on syscall too

From: Michael Ellerman <hidden>
Date: 2020-12-22 13:12:26
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help