Skip to content

Introduce a REQUIRE_NX Kconfig option

Alejandro Vallejo xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 10 repliesIn review
  2. v22 patches 7 repliesSuperseded

Changes in v3 from the cover letter

* Fixed a Gitlab CI breakage on older toolchains (patch 1)
* Removed XD_DISABLE override logic from cpu/intel.c
* Various style fixes to patch 2 (from Andrew's feedback)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tools: Add __AC() macro to common-macros.htools/include/xen-tools/common-macros.h tools/libs/light/libxl_internal.h tools/tests/x86_emulator/x86-emulate.h+3 -52 replies
2/3x86/boot: Clear XD_DISABLE from the early boot pathxen/arch/x86/boot/head.S xen/arch/x86/cpu/intel.c xen/arch/x86/include/asm/msr-index.h +1 more+53 -203 replies
3/3x86: Add Kconfig option to require NX bit supportxen/arch/x86/Kconfig xen/arch/x86/boot/head.S xen/arch/x86/boot/trampoline.S +2 more+43 -34 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAndrew Cooper
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] Introduce a REQUIRE_NX Kconfig option

v3:
* Fixed a Gitlab CI breakage on older toolchains (patch 1)
* Removed XD_DISABLE override logic from cpu/intel.c
* Various style fixes to patch 2 (from Andrew's feedback)

This option hardens Xen by forcing it to write secure (NX-enhanced) PTEs regardless of the runtime NX feature bit in boot_cpu_data. This prevents an attacker with partial write support from affecting Xen's PTE generation logic by overriding the NX feature flag. The patch asserts support for the NX bit in PTEs at boot time and if so short-circuits the cpu_has_nx macro to 1.

Alejandro Vallejo (3):
tools: Add __AC() macro to common-macros.h x86/boot: Clear XD_DISABLE from the early boot path
x86: Add Kconfig option to require NX bit support

 tools/include/xen-tools/common-macros.h |  3 ++
 tools/libs/light/libxl_internal.h       |  2 -
 tools/tests/x86_emulator/x86-emulate.h  |  3 --
 xen/arch/x86/Kconfig                    | 16 +++++++
 xen/arch/x86/boot/head.S                | 62 ++++++++++++++++++++++---
 xen/arch/x86/boot/trampoline.S          |  3 +-
 xen/arch/x86/cpu/intel.c                | 16 +++----
 xen/arch/x86/efi/efi-boot.h             |  9 ++++
 xen/arch/x86/include/asm/cpufeature.h   |  3 +-
 xen/arch/x86/include/asm/msr-index.h    |  2 +-
 xen/arch/x86/include/asm/x86-vendors.h  |  6 +--
 11 files changed, 98 insertions(+), 27 deletions(-)
Signature · 1 line
2.34.1