Skip to content

Commit c7e4314

Browse files
committed
x86/Kconfig: only enable ROX cache in execmem when STRICT_MODULE_RWX is set
jira LE-4694 Rebuild_History Non-Buildable kernel-6.12.0-55.43.1.el10_0 commit-author Mike Rapoport (Microsoft) <rppt@kernel.org> commit 47410d8 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) <rppt@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20250603111446.2609381-3-rppt@kernel.org (cherry picked from commit 47410d8) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 2419146 commit c7e4314

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
@@ -83,7 +83,7 @@ config X86
8383
select ARCH_HAS_DMA_OPS if GART_IOMMU || XEN
8484
select ARCH_HAS_EARLY_DEBUG if KGDB
8585
select ARCH_HAS_ELF_RANDOMIZE
86-
select ARCH_HAS_EXECMEM_ROX if X86_64
86+
select ARCH_HAS_EXECMEM_ROX if X86_64 && STRICT_MODULE_RWX
8787
select ARCH_HAS_FAST_MULTIPLIER
8888
select ARCH_HAS_FORTIFY_SOURCE
8989
select ARCH_HAS_GCOV_PROFILE_ALL

0 commit comments

Comments
 (0)