powerpc/powermac: Fix low_sleep_handler with KUAP and KUEP
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Fri, 11 Sep 2020 10:29:15 +0000 (10:29 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 15 Sep 2020 12:13:37 +0000 (22:13 +1000)
commit2c637d2df4ee4830e9d3eb2bd5412250522ce96e
tree5b53eed2df62ca0273c9d714f236ccda70260b5f
parentc83c192a6fbb1d4db4144c40296ed059f5eca384
powerpc/powermac: Fix low_sleep_handler with KUAP and KUEP

low_sleep_handler() has an hardcoded restore of segment registers
that doesn't take KUAP and KUEP into account.

Use head_32's load_segment_registers() routine instead.

Fixes: a68c31fc01ef ("powerpc/32s: Implement Kernel Userspace Access Protection")
Fixes: 31ed2b13c48d ("powerpc/32s: Implement Kernel Userspace Execution Prevention.")
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/21b05f7298c1b18f73e6e5b4cd5005aafa24b6da.1599820109.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/head_32.S
arch/powerpc/platforms/powermac/sleep.S