From: Mike Rapoport <rppt@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"Ingo Molnar" <mingo@redhat.com>, "J�rgen Gro�" <jgross@suse.com>,
"Mike Rapoport" <rppt@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
"Thomas Gleixner" <tglx@linutronix.de>, "Xin Li" <xin@zytor.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
x86@kernel.org
Subject: [PATCH 2/5] x86/Kconfig: only enable ROX cache in execmem when STRICT_MODULE_RWX is set
Date: Tue, 3 Jun 2025 14:14:42 +0300 [thread overview]
Message-ID: <20250603111446.2609381-3-rppt@kernel.org> (raw)
In-Reply-To: <20250603111446.2609381-1-rppt@kernel.org>
From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
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: 64f6a4e10c05 ("x86: re-enable EXECMEM_ROX support")
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
---
arch/x86/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index e21cca404943..47932d5f4499 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -88,7 +88,7 @@ config X86
select ARCH_HAS_DMA_OPS if GART_IOMMU || XEN
select ARCH_HAS_EARLY_DEBUG if KGDB
select ARCH_HAS_ELF_RANDOMIZE
- select ARCH_HAS_EXECMEM_ROX if X86_64
+ select ARCH_HAS_EXECMEM_ROX if X86_64 && STRICT_MODULE_RWX
select ARCH_HAS_FAST_MULTIPLIER
select ARCH_HAS_FORTIFY_SOURCE
select ARCH_HAS_GCOV_PROFILE_ALL
--
2.47.2
next prev parent reply other threads:[~2025-06-03 11:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 11:14 [PATCH 0/5] Fixes for ITS mitigation and execmem Mike Rapoport
2025-06-03 11:14 ` [PATCH 1/5] x86/mm/pat: don't collapse pages without PSE set Mike Rapoport
2025-06-03 11:14 ` Mike Rapoport [this message]
2025-06-11 9:30 ` [tip: x86/urgent] x86/Kconfig: only enable ROX cache in execmem when STRICT_MODULE_RWX is set tip-bot2 for Mike Rapoport (Microsoft)
2025-06-03 11:14 ` [PATCH 3/5] x86/its: move its_pages array to struct mod_arch_specific Mike Rapoport
2025-06-03 11:18 ` kernel test robot
2025-06-11 9:30 ` [tip: x86/urgent] " tip-bot2 for Mike Rapoport (Microsoft)
2025-06-03 11:14 ` [PATCH 4/5] x86/its: explicitly manage permissions for ITS pages Mike Rapoport
2025-06-03 13:58 ` Peter Zijlstra
2025-06-03 14:36 ` Mike Rapoport
2025-06-03 14:45 ` Peter Zijlstra
2025-06-11 21:09 ` Chuck Zmudzinski
2025-06-05 9:23 ` Nikolay Borisov
2025-06-11 9:30 ` [tip: x86/urgent] " tip-bot2 for Peter Zijlstra (Intel)
2025-06-03 11:14 ` [PATCH 5/5] Revert "mm/execmem: Unify early execmem_cache behaviour" Mike Rapoport
2025-06-11 9:30 ` [tip: x86/urgent] " tip-bot2 for Mike Rapoport (Microsoft)
2025-06-10 6:00 ` [PATCH 0/5] Fixes for ITS mitigation and execmem Jürgen Groß
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250603111446.2609381-3-rppt@kernel.org \
--to=rppt@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xin@zytor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.