powerpc: Add skeleton for Kernel Userspace Execution Prevention

This patch adds a skeleton for Kernel Userspace Execution Prevention.

Then subarches implementing it have to define CONFIG_PPC_HAVE_KUEP
and provide setup_kuep() function.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[mpe: Don't split strings, use pr_crit_ratelimited()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Christophe Leroy
2019-04-18 16:51:19 +10:00
committed by Michael Ellerman
parent 69795cabe4
commit 0fb1c25ab5
5 changed files with 34 additions and 6 deletions

View File

@@ -6,6 +6,12 @@
void setup_kup(void);
#ifdef CONFIG_PPC_KUEP
void setup_kuep(bool disabled);
#else
static inline void setup_kuep(bool disabled) { }
#endif /* CONFIG_PPC_KUEP */
#endif /* !__ASSEMBLY__ */
#endif /* _ASM_POWERPC_KUP_H_ */