powerpc: Default to enabling STRICT_KERNEL_RWX
PATCH 1/1 powerpc: Default to enabling STRICT_KERNEL_RWX
When available, CONFIG_KERNEL_RWX should be default-enabled.
--- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/Kconfig +1 -0
@@ -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
Signature · 6 lines
2.7.4 -- Kees Cook Pixel Security
Le 05/10/2017 à 05:45, Kees Cook a écrit :
Quoted 1 line
When available,
CONFIG_KERNEL_RWXshould 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.
Christophe
Quoted 23 lines
Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Signed-off-by Kees Cook <[email protected]>--- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/powerpc/Kconfig +1
-0@@ -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
Quoted 11 lines · Christophe LEROY
Quoted 2 lines · Kees Cook
When available,
CONFIG_KERNEL_RWXshould 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
-Kees
Quoted 30 lines
Christophe
Quoted 25 lines
Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Signed-off-by Kees Cook <[email protected]>--- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/powerpc/Kconfig +0
-0@@ -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
+ selectARCH_OPTIONAL_KERNEL_RWX_DEFAULT
selectHAVE_CBPF_JITif !PPC64
selectHAVE_CONTEXT_TRACKINGif PPC64
selectHAVE_DEBUG_KMEMLEAK
Signature · 2 lines
Kees Cook Pixel Security
Le 05/10/2017 à 19:30, Kees Cook a écrit :
Quoted 9 lines
Quoted 7 lines · Christophe LEROY
Quoted 2 lines · Kees Cook
When available,
CONFIG_KERNEL_RWXshould be default-enabled.
Quoted 8 lines
Quoted 4 lines
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_DEFAULTif !PPC64
You mean
select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if PPC64
Don't you ?
Christophe
Quoted 36 lines
-Kees
Quoted 30 lines
Christophe
Quoted 25 lines
Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Signed-off-by Kees Cook <[email protected]>--- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/powerpc/Kconfig +0
-0@@ -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
+ selectARCH_OPTIONAL_KERNEL_RWX_DEFAULT
selectHAVE_CBPF_JITif !PPC64
selectHAVE_CONTEXT_TRACKINGif PPC64
selectHAVE_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
Quoted 19 lines · christophe leroy
Le 05/10/2017 =C3=A0 19:30, Kees Cook a =C3=A9crit :
Quoted 16 lines
Quoted 13 lines · Christophe LEROY
Le 05/10/2017 =C3=A0 05:45, Kees Cook a =C3=A9crit :
Quoted 3 lines
When available,
CONFIG_KERNEL_RWXshould be default-enabled.On PPC32, this option implies deactivating BATs and/or LTLB mapping of the
linear kernel address space, hence a significant performance degradatio=
n.
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
So at least on PPC32, it should remain unselected by default.
Alright, sounds fine to me. Would this be okay?
Quoted 8 lines
Quoted 1 line
+ select
ARCH_OPTIONAL_KERNEL_RWX_DEFAULTif !PPC64You mean
select
ARCH_OPTIONAL_KERNEL_RWX_DEFAULTif PPC64Don't you ?
Oops, yes! :)
-Kees
--=20
Kees Cook
Pixel Security