]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/32: Prepare for Kernel Userspace Access Protection
authorChristophe Leroy <christophe.leroy@c-s.fr>
Mon, 11 Mar 2019 08:30:31 +0000 (08:30 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 21 Apr 2019 13:11:46 +0000 (23:11 +1000)
commit9acca4df28010880b004ed5fbaae6a7d80d6d97b
treed199c5ba49c2e30fff0d9722a4522b28c5f6959f
parentf3d669e77602f8c1693c3b7da56ac02abb0fce12
powerpc/32: Prepare for Kernel Userspace Access Protection

This patch adds ASM macros for saving, restoring and checking
the KUAP state, and modifies setup_32 to call them on exceptions
from kernel.

The macros are defined as empty by default for when CONFIG_PPC_KUAP
is not selected and/or for platforms which don't handle (yet) KUAP.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/kup.h
arch/powerpc/kernel/entry_32.S
arch/powerpc/platforms/Kconfig.cputype