[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 5/7] x86/mkreloc: remove warning about relocations to RO section
On 20.03.2025 12:00, Andrew Cooper wrote: > On 20/03/2025 10:18 am, Jan Beulich wrote: >> On 20.03.2025 10:53, Jan Beulich wrote: >>> On 20.03.2025 09:34, Jan Beulich wrote: >>>> On 20.03.2025 09:14, Roger Pau Monné wrote: >>>>> I wonder how this worked then, as I've tested with the xen.efi smoke >>>>> test in gitlab CI. Maybe ovmf doesn't acknowledge the RX sections and >>>>> unconditionally sets all mappings as writable? >>>> Possible. And that would be in line with the mode being call "physical >>>> mode": >>>> There are no permissions to enforce there. It just so happens that x86-64 >>>> requires paging to be enabled to be able to run 64-bit code. >>>> >>>> My experience with OVMF has been that it's hard to find where certain code >>>> lives. Perhaps I should try whether I can find respective code there. Then >>>> again if I find nothing, there wouldn't be any guarantee that I merely >>>> didn't >>>> spot the right place. >>> All I can find is >>> BaseTools/Source/C/Common/BasePeCoff.c:PeCoffLoaderLoadImage(), >>> which doesn't look to care about section flags at all. >> And then there is at least one duplicate thereof elsewhere, or something very >> close to a duplicate. In addition I meanwhile found ProtectUefiImage(), yet >> it's unclear (to me) under what conditions execution would make it there. >> Plus >> it leading to SetUefiImageMemoryAttributes() leaves open where >> gCpu->SetMemoryAttributes() is implemented. I can spot some Arm and RISC-V >> code >> with respective names (albeit in distinct places), and MTRR functionality >> with >> names along these lines. None of these can be it. > > https://www.kraxel.org/blog/2023/12/uefi-nx-linux-boot/ Which, besides saying e.g. "When configured to do so ...", means that our copy of ovmf wouldn't have any of that, as it hasn't been updated for quite some time afaict (just tried to pull earlier in the day, with nothing new coming through at all; the last time something new came through was apparently about a year and a half ago, i.e. older than what that article says is needed). Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |