From: "Gerd Hoffmann" <kraxel@redhat.com>
To: "Marvin Häuser" <mhaeuser@posteo.de>
Cc: Ard Biesheuvel <ardb@kernel.org>,
devel@edk2.groups.io, Rebecca Cran <rebecca@bsdio.com>,
Andrew Fish <afish@apple.com>
Subject: Re: [edk2-devel] [RFT PATCH v2 1/6] BaseTools/tools_def XCODE: Link X64 with -read_only_relocs suppress
Date: Fri, 31 Mar 2023 11:16:25 +0200 [thread overview]
Message-ID: <pcbx5cug2wz2t2ct5zysi34szjgrjayzkhl7vvzxrbkkwmkgsd@pzomno2xjjlt> (raw)
In-Reply-To: <943BFDDF-6EF6-42BD-9173-E3D26DCE0E0A@posteo.de>
Hi,
> > - modify the SecPei version of CpuExceptionHandlerLib to put the
> > vector templates in .data, as I proposed before. This works around the
> > issue, and given that SEC/PEI is assumed to be read-only anyway (as it
> > may execute in place from flash) and does not use page alignment for
> > the sections due to size constraints, it is reasonable to assume that
> > .text and .data will be mapped executable anyway.
>
> Well, that assumption is more than fair to make for the status quo
> platforms, but this is just another rock in the way of doing things
> the right way (even if it’s just VMs).
>
> Cc Gerd for an OVMF security perspective. Is PEI-time memory
> protection something you’d be interested in in the future?
Given that PEI is expected to be able to run from read-only storage
the easiest way to apply X^W rules would be to just map the whole
PEI firmware volume as R-X when executing from RAM (which is the case
for OVMF).
I've fixed OVMF PEI modules last year to *not* use global variables,
so OVMF is not a special case any more and mapping OVMF PEI readonly
should work just fine.
So Ard's approach looks sane to me.
take care,
Gerd
next prev parent reply other threads:[~2023-03-31 9:16 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 21:20 [RFT PATCH v2 0/6] UefiCpuPkg, OvmfPkf: Simplify CpuExceptionHandlerLib Ard Biesheuvel
2023-03-30 21:20 ` [RFT PATCH v2 1/6] BaseTools/tools_def XCODE: Link X64 with -read_only_relocs suppress Ard Biesheuvel
2023-03-30 21:54 ` [edk2-devel] " Marvin Häuser
2023-03-31 7:39 ` Ard Biesheuvel
2023-03-31 8:29 ` Marvin Häuser
2023-03-31 8:59 ` Ard Biesheuvel
2023-03-31 9:27 ` Marvin Häuser
2023-03-31 9:36 ` Ard Biesheuvel
2023-03-31 10:35 ` Marvin Häuser
2023-03-31 10:52 ` Gerd Hoffmann
2023-03-31 10:58 ` Ard Biesheuvel
2023-03-31 11:00 ` Marvin Häuser
2023-03-31 9:16 ` Gerd Hoffmann [this message]
2023-03-31 14:58 ` Rebecca Cran
2023-03-31 15:08 ` Marvin Häuser
2023-03-30 21:20 ` [RFT PATCH v2 2/6] BaseTools/tools_def CLANGDWARF: Permit text relocations Ard Biesheuvel
2023-03-30 21:20 ` [RFT PATCH v2 3/6] UefiCpuPkg/CpuExceptionHandlerLib: Use single SEC/PEI version Ard Biesheuvel
2023-03-31 4:21 ` Ni, Ray
2023-03-31 7:40 ` [edk2-devel] " Ard Biesheuvel
2023-03-31 8:01 ` Ni, Ray
2023-03-30 21:20 ` [RFT PATCH v2 4/6] UefiCpuPkg/CpuExceptionHandlerLib: Remove needless runtime fixups Ard Biesheuvel
2023-03-30 22:04 ` [edk2-devel] " Marvin Häuser
2023-03-31 5:08 ` Ni, Ray
2023-03-31 8:06 ` Marvin Häuser
2023-03-31 4:22 ` Ni, Ray
2023-03-30 21:21 ` [RFT PATCH v2 5/6] OvmfPkg: Drop special Xcode5 version of exception handler library Ard Biesheuvel
2023-03-31 0:37 ` [edk2-devel] " Yao, Jiewen
2023-03-30 21:21 ` [RFT PATCH v2 6/6] UefiCpuPkg/CpuExceptionHandlerLib: Drop special XCODE5 version Ard Biesheuvel
2023-03-31 4:23 ` [edk2-devel] " Ni, Ray
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-list 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=pcbx5cug2wz2t2ct5zysi34szjgrjayzkhl7vvzxrbkkwmkgsd@pzomno2xjjlt \
--to=devel@edk2.groups.io \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox