Re: [REGRESSION 6.12.117] CPA detected W^X violation: 0000000000000121 -> 0000000000000123 range: 0xffffffffc0477000 - 0xffffffffc0477fff PFN 109c1f and WARNING at arch/x86/mm/pat/set_memory.c:665 __change_page_attr_set_clr+0xf62/0xfb0

From: Sasha Levin

Date: Sun Nov 15 2026 - 09:47:50 EST


On Sun, Nov 15, 2026 at 08:21:28AM +0200, Mike Rapoport wrote:
> Apparently, this commit exposes issues in the management of permissions in
> ITS mitigation that was fixed here:
>
> https://lore.kernel.org/all/20250603111446.2609381-1-rppt@xxxxxxxxxx/

Thanks. That series (a82b26451de1 "x86/its: explicitly manage permissions for
ITS pages" and the rest of it) is already in 7.3 and 6.18, which is why both
keep the two pat patches.

Sadly 6.12, 6.6 and 6.1 have none of it, and their ITS backport is
stable-specific :(

> > On the other hand though testing 7.3.5-rc1 which is currently under
> > review only logs:
> >
> > [ 0.096682] CPA detected W^X violation: 8000000000000123 -> 0000000000000123 range: 0xffffffffc0200000 - 0xffffffffc0200fff PFN 100800

That early-boot message on 7.3 is the one ea6fd393cb9e ("x86/mm/pat: Use
pr_warn() for early W^X warnings") describes as expected from its_alloc()
during early retpoline setup, so it is a pr_warn and not a WARNING.

--
Thanks,
Sasha