diff options
| author | Mike Rapoport (Microsoft) <rppt@kernel.org> | 2026-09-13 10:37:27 +0300 |
|---|---|---|
| committer | Dave Hansen <dave.hansen@linux.intel.com> | 2026-09-21 12:23:22 -0700 |
| commit | ea6fd393cb9e6811a748c7551de0dd3090f9dcde (patch) | |
| tree | 3329ce1d0e7d21e75e62518cc9e714b7259bc02c /include/uapi/linux | |
| parent | ebaf7c9bbb1e16523d7036e7e1225ad2dfcc6482 (diff) | |
| download | linux-next-ea6fd393cb9e6811a748c7551de0dd3090f9dcde.tar.gz linux-next-ea6fd393cb9e6811a748c7551de0dd3090f9dcde.zip | |
x86/mm/pat: Use pr_warn() for early W^X warnings
Nathan Chancellor reports the following warning:
CPA detected W^X violation: 8000000000000123 -> 0000000000000123 range: 0xffffffffc0400000 - 0xffffffffc0400fff PFN 100e00
from its_alloc() doing set_memory_x() during early retpoline setup.
The warning is not factually wrong but it is unproductive. First, the RWX
permission is temporary and fixed up by execmem_restore_rox(). Second,
at the time of the warning, all kernel text is mapped RWX. So there is not
even a transient actual security issue.
The right way to fix this up is to relax RWX detection during boot but
make a final verification pass over all kernel page tables before running
userspace. There is code to do that today (debug_checkwx()) but it
must be enabled explicitly in Kconfig.
For now, retain the warning even if it's unproductive, but make it
scream less loudly: use pr_warn_once() rather than WARN_ONCE().
Remove the warning once debug_checkwx() behavior becomes unconditional.
Closes: https://lore.kernel.org/all/20260905044253.GA3816371@ax162
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://patch.msgid.link/20260913-fixes-verify-rwx-v3-1-5e1d6a08bd02@kernel.org
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions
