diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2019-03-11 08:30:35 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-04-21 23:11:46 +1000 |
commit | 31ed2b13c48d779efc838ad54e30121e088a62af (patch) | |
tree | 80890f996c246cd567e2822230b68340919adebf /arch/powerpc/include/asm/kup.h | |
parent | 2679f9bd0abafb3044bcbaac0600b32159ac8bf2 (diff) | |
download | linux-31ed2b13c48d779efc838ad54e30121e088a62af.tar.bz2 |
powerpc/32s: Implement Kernel Userspace Execution Prevention.
To implement Kernel Userspace Execution Prevention, this patch
sets NX bit on all user segments on kernel entry and clears NX bit
on all user segments on kernel exit.
Note that powerpc 601 doesn't have the NX bit, so KUEP will not
work on it. A warning is displayed at startup.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/kup.h')
-rw-r--r-- | arch/powerpc/include/asm/kup.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kup.h b/arch/powerpc/include/asm/kup.h index 043c800ec5fb..5b5e39643a27 100644 --- a/arch/powerpc/include/asm/kup.h +++ b/arch/powerpc/include/asm/kup.h @@ -8,6 +8,9 @@ #ifdef CONFIG_PPC_8xx #include <asm/nohash/32/kup-8xx.h> #endif +#ifdef CONFIG_PPC_BOOK3S_32 +#include <asm/book3s/32/kup.h> +#endif #ifdef __ASSEMBLY__ #ifndef CONFIG_PPC_KUAP |