All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Doug Goldstein" <cardoe@cardoe.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Shawn Anastasio" <sanastasio@raptorengineering.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Bob Eshleman" <bobbyeshleman@gmail.com>,
	"Connor Davis" <connojdavis@gmail.com>,
	"Oleksii Kurochko" <oleksii.kurochko@gmail.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 00/11] x86/EFI: prevent write-execute sections
Date: Tue, 1 Apr 2025 15:26:58 +0200	[thread overview]
Message-ID: <Z-vpoh858ldjXok_@macbook.local> (raw)
In-Reply-To: <c686844c-4cb8-43d0-a762-7f93a30f9388@suse.com>

On Tue, Apr 01, 2025 at 03:13:52PM +0200, Jan Beulich wrote:
> On 01.04.2025 15:08, Roger Pau Monne wrote:
> > Hello,
> > 
> > The following series aim to remove the presence of any write and execute
> > section in the PE Xen image.  This is required to support the NX
> > compatible flag in the PE header.   By the end of the series the
> > resulting PE image has no relocations that apply to text sections, as
> > text sections are strictly mapped read-execute only.  Xen itself
> > attempting to apply relocations to text would result in page-faults.
> > 
> > A smoke test is added to Gitlab to ensure the PE NX support doesn't
> > regress.
> > 
> > Only patches 5 and 10 are carried over from v1, the rest are new.
> > 
> > Thanks, Roger.
> > 
> > Roger Pau Monne (11):
> >   automation/dockers: add to README how to rebuild all containers
> >   x86/mkreloc: fix obtaining PE image base address
> >   x86/mkreloc: use the string table to get names
> >   x86/mkreloc: print the linear address of relocations to read-only
> >     sections
> >   xen: remove -N from the linker command line
> >   x86/efi: discard .text.header for PE binary
> >   x86/efi: discard multiboot related entry code for PE binary
> >   x86/boot: place trampoline code in a non-execute section
> >   x86/efi: avoid a relocation in efi_arch_post_exit_boot()
> >   x86/efi: do not merge all .init sections
> >   automation/x86: add a xen.efi test with a strict NX OVMF build
> > 
> >  automation/build/README.md                   |  7 ++
> >  automation/build/fedora/41-x86_64.dockerfile |  5 ++
> >  automation/gitlab-ci/test.yaml               |  9 +++
> >  automation/scripts/qemu-smoke-x86-64-efi.sh  | 22 +++++-
> >  xen/arch/arm/Makefile                        |  6 +-
> >  xen/arch/ppc/Makefile                        |  6 +-
> >  xen/arch/riscv/Makefile                      |  6 +-
> >  xen/arch/x86/Makefile                        | 12 +--
> >  xen/arch/x86/boot/head.S                     |  3 +-
> >  xen/arch/x86/efi/efi-boot.h                  |  7 +-
> >  xen/arch/x86/efi/mkreloc.c                   | 77 +++++++++++++++++---
> >  xen/arch/x86/xen.lds.S                       | 20 +++--
> >  12 files changed, 138 insertions(+), 42 deletions(-)
> 
> From titles and diffstat (all Makefile changes being covered by patch 05)
> it looks like you still don't add passing --nxcompat to the linker. Is
> that intentionally left out here?

Hm, and I see I also failed to add (the already RB patch) "xen/build:
warn about RWX load segments".

nxcompat should be enabled by default I think?  I can of course make
it explicit by adding to the PE link command line.

Thanks, Roger.


  reply	other threads:[~2025-04-01 13:27 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 13:08 [PATCH v2 00/11] x86/EFI: prevent write-execute sections Roger Pau Monne
2025-04-01 13:08 ` [PATCH v2 01/11] automation/dockers: add to README how to rebuild all containers Roger Pau Monne
2025-04-01 13:25   ` Andrew Cooper
2025-04-01 23:08   ` Stefano Stabellini
2025-04-01 13:08 ` [PATCH v2 02/11] x86/mkreloc: fix obtaining PE image base address Roger Pau Monne
2025-04-01 14:01   ` Andrew Cooper
2025-04-01 14:17   ` Jan Beulich
2025-04-02  7:46     ` Jan Beulich
2025-04-08 11:21       ` Roger Pau Monné
2025-04-08 12:34         ` Jan Beulich
2025-04-10  7:20           ` Roger Pau Monné
2025-04-10  7:41             ` Jan Beulich
2025-04-01 13:08 ` [PATCH v2 03/11] x86/mkreloc: use the string table to get names Roger Pau Monne
2025-04-01 15:50   ` Jan Beulich
2025-04-02  7:42   ` Jan Beulich
2025-04-01 13:08 ` [PATCH v2 04/11] x86/mkreloc: print the linear address of relocations to read-only sections Roger Pau Monne
2025-04-01 15:55   ` Jan Beulich
2025-04-01 13:08 ` [PATCH v2 05/11] xen: remove -N from the linker command line Roger Pau Monne
2025-04-02 10:28   ` Julien Grall
2025-04-01 13:08 ` [PATCH v2 06/11] x86/efi: discard .text.header for PE binary Roger Pau Monne
2025-04-01 13:18   ` Jan Beulich
2025-04-01 13:22     ` Andrew Cooper
2025-04-01 13:08 ` [PATCH v2 07/11] x86/efi: discard multiboot related entry code " Roger Pau Monne
2025-04-01 16:02   ` Jan Beulich
2025-04-01 13:08 ` [PATCH v2 08/11] x86/boot: place trampoline code in a non-execute section Roger Pau Monne
2025-04-01 13:49   ` Andrew Cooper
2025-04-02  9:47     ` Jan Beulich
2025-04-01 13:08 ` [PATCH v2 09/11] x86/efi: avoid a relocation in efi_arch_post_exit_boot() Roger Pau Monne
2025-04-02 10:23   ` Jan Beulich
2025-04-01 13:08 ` [PATCH v2 10/11] x86/efi: do not merge all .init sections Roger Pau Monne
2025-04-02 10:28   ` Jan Beulich
2025-04-01 13:08 ` [PATCH v2 11/11] automation/x86: add a xen.efi test with a strict NX OVMF build Roger Pau Monne
2025-04-01 14:23   ` Andrew Cooper
2025-04-01 13:13 ` [PATCH v2 00/11] x86/EFI: prevent write-execute sections Jan Beulich
2025-04-01 13:26   ` Roger Pau Monné [this message]
2025-04-01 13:58     ` Jan Beulich
2025-04-07 14:04     ` Jan Beulich
2025-04-08  7:56       ` Roger Pau Monné
2025-04-08  8:18         ` Jan Beulich

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=Z-vpoh858ldjXok_@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=alistair.francis@wdc.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=bobbyeshleman@gmail.com \
    --cc=cardoe@cardoe.com \
    --cc=connojdavis@gmail.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=marmarek@invisiblethingslab.com \
    --cc=michal.orzel@amd.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=sanastasio@raptorengineering.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.