Skip to content

Commit 47410d8

Browse files
rpptPeter Zijlstra
authored andcommitted
x86/Kconfig: only enable ROX cache in execmem when STRICT_MODULE_RWX is set
Currently ROX cache in execmem is enabled regardless of STRICT_MODULE_RWX setting. This breaks an assumption that module memory is writable when STRICT_MODULE_RWX is disabled, for instance for kernel debuggin. Only enable ROX cache in execmem when STRICT_MODULE_RWX is set to restore the original behaviour of module text permissions. Fixes: 64f6a4e ("x86: re-enable EXECMEM_ROX support") Signed-off-by: Mike Rapoport (Microsoft) <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
1 parent 1dbf30f commit 47410d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ config X86
8989
select ARCH_HAS_DMA_OPS if GART_IOMMU || XEN
9090
select ARCH_HAS_EARLY_DEBUG if KGDB
9191
select ARCH_HAS_ELF_RANDOMIZE
92-
select ARCH_HAS_EXECMEM_ROX if X86_64
92+
select ARCH_HAS_EXECMEM_ROX if X86_64 && STRICT_MODULE_RWX
9393
select ARCH_HAS_FAST_MULTIPLIER
9494
select ARCH_HAS_FORTIFY_SOURCE
9595
select ARCH_HAS_GCOV_PROFILE_ALL

0 commit comments

Comments
 (0)