Skip to content

Commit

Permalink
powerpc/32s: Add missing call to kuep_lock on syscall entry
Browse files Browse the repository at this point in the history
Userspace Execution protection and fast syscall entry were implemented
independently from each other and were both merged in kernel 5.2,
leading to syscall entry missing userspace execution protection.

On syscall entry, execution of user space memory must be
locked in the same way as on exception entry.

Fixes: b86fb88 ("powerpc/32: implement fast entry for syscalls on non BOOKE")
Cc: stable@vger.kernel.org
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/c65e105b63aaf74f91a14f845bc77192350b84a6.1612796617.git.christophe.leroy@csgroup.eu
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Feb 11, 2021
1 parent 57f48b4 commit 57fdfbc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ trace_syscall_entry_irq_off:

.globl transfer_to_syscall
transfer_to_syscall:
#ifdef CONFIG_PPC_BOOK3S_32
kuep_lock r11, r12
#endif
#ifdef CONFIG_TRACE_IRQFLAGS
andi. r12,r9,MSR_EE
beq- trace_syscall_entry_irq_off
Expand Down

0 comments on commit 57fdfbc

Please sign in to comment.