Re: [PATCH] x86/Kconfig: enable ROX also when STRICT_KERNEL_RWX is present

From: Vinny Horgan

Date: Sat Nov 21 2026 - 10:30:12 EST


On Thu, Jun 25, 2026 at 11:06:27AM +0200, Richard Weinberger wrote:
> Running a kernel with CONFIG_MODULES=n causes the W+X page dectection
> to trigger:
> x86/mm: Found insecure W+X mapping at address 0xffffffffc033a000

Same here, on a ThinkPad T490 (i5-8365U; "Spectre V2 : Mitigation:
Enhanced / Automatic IBRS", "ITS: Mitigation: Aligned branch/return
thunks") with a CONFIG_MODULES=n kernel based on 7.3.4:

x86/mm: Found insecure W+X mapping at address 0xffffffffc03f3000

With this patch on top of 7.3.5, the same machine and config boot with
"x86/mm: Checked W+X mappings: passed, no W+X pages found."

Tested-by: Vinny Horgan <vinnyhorgan@xxxxxxxxx>

It doesn't seem to have been applied yet: arch/x86/Kconfig in v7.4-rc3,
tip/master and next-20261120 still has the old condition.

QEMU without KVM could not reproduce it: TCG offers no IBRS, so
spectre_v2 falls back to retpolines and no ITS thunk pages are
allocated, with or without indirect_target_selection=force.

I found this, and wrote this reply, with the help of an AI assistant
(Claude) while building a custom kernel for the T490; the results above
are from that machine.