Re: [PATCH] powerpc: Default to enabling STRICT_KERNEL_RWX

From: christophe leroy
Date: Thu Oct 05 2017 - 14:57:33 EST




Le 05/10/2017 Ã 19:30, Kees Cook a ÃcritÂ:
On Thu, Oct 5, 2017 at 12:49 AM, Christophe LEROY
<christophe.leroy@xxxxxx> wrote:


Le 05/10/2017 Ã 05:45, Kees Cook a Ãcrit :

When available, CONFIG_KERNEL_RWX should be default-enabled.


On PPC32, this option implies deactivating BATs and/or LTLB mapping of the
linear kernel address space, hence a significant performance degradation.

So at least on PPC32, it should remain unselected by default.

Alright, sounds fine to me. Would this be okay?

+ select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if !PPC64

You mean

select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if PPC64

Don't you ?

Christophe


-Kees


Christophe



Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: linuxppc-dev@xxxxxxxxxxxxxxxx
Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
---
arch/powerpc/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 809c468edab1..9a549bbfc278 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -178,6 +178,7 @@ config PPC
select HAVE_ARCH_TRACEHOOK
select ARCH_HAS_STRICT_KERNEL_RWX if ((PPC_BOOK3S_64 ||
PPC32) && !RELOCATABLE && !HIBERNATION)
select ARCH_OPTIONAL_KERNEL_RWX if
ARCH_HAS_STRICT_KERNEL_RWX
+ select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
select HAVE_CBPF_JIT if !PPC64
select HAVE_CONTEXT_TRACKING if PPC64
select HAVE_DEBUG_KMEMLEAK






---
L'absence de virus dans ce courrier Ãlectronique a Ãtà vÃrifiÃe par le logiciel antivirus Avast.
https://www.avast.com/antivirus