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>
18 lines
342 B
C
18 lines
342 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_POWERPC_KUP_H_
|
|
#define _ASM_POWERPC_KUP_H_
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
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_ */
|