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, 8 Apr 2025 09:56:11 +0200	[thread overview]
Message-ID: <Z_TWm1rll_0PyzNQ@macbook.lan> (raw)
In-Reply-To: <f71c3298-24df-4d6f-b73c-382d4a112e01@suse.com>

On Mon, Apr 07, 2025 at 04:04:18PM +0200, Jan Beulich wrote:
> On 01.04.2025 15:26, Roger Pau Monné wrote:
> > nxcompat should be enabled by default I think?  I can of course make
> > it explicit by adding to the PE link command line.
> 
> --nxcompat wasn't the default originally, then was made the default for MinGW
> (and by mistake for everything else as well), then it being the default was
> undone for Cygwin. I've meanwhile submitted a patch to undo it for everything
> that isn't MinGW [1]. I simply don't think the linker is in the position to
> declare that every binary is NX-compatible. It's the programmers who have to
> determine that. With the flag not being honored everywhere one also can't
> simply test an EFI binary on a couple of hosts, at least as long as the EFI
> implementation there is a black box.

I think I looked at this reference:

https://sourceware.org/binutils/docs/ld/Options.html

When saying that nxcompat was enabled by default:

--nxcompat
--disable-nxcompat The image is compatible with the Data Execution
Prevention. This feature was introduced with MS Windows XP SP2 for
i386 PE targets. The option is enabled by default.

I guess the intent was to only enable it by default for Windows PE
images?  Anyway, as said earlier, I don't mind adding it.  FWIW, (I
think I commented with Andrew) I did saw this flag was already present
in our PE builds, even in it's current form, so that explains it.

Thanks, Roger.


  reply	other threads:[~2025-04-08  7:56 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é
2025-04-01 13:58     ` Jan Beulich
2025-04-07 14:04     ` Jan Beulich
2025-04-08  7:56       ` Roger Pau Monné [this message]
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_TWm1rll_0PyzNQ@macbook.lan \
    --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.