Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1245812

Bug#1105209: edk2: OVMF binaries built with debug memory clearing on free

From Luca Boccassi <bluca@debian.org>
Newsgroups linux.debian.bugs.dist
Subject Bug#1105209: edk2: OVMF binaries built with debug memory clearing on free
Date 2025-05-13 14:40 +0200
Message-ID <KLX5n-2PyQ-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Source: edk2
Severity: wishlist

Dear Maintainer(s),

Current OVMF binaries for use with qemu (at least on x86_64) are built
so that the debug function DebugClearMemory() runs and overwrites any
pages being freed with BS->FreePages() with a fixed 0xAF pattern.

Other than being most likely bad for performance, this recently also
caused some headaches in shim when pages that were used to load images,
and thus marked as non-writable and executable, were freed, which made
OVMF attempt to overwrite them, which causes a crash due to non-
writable attribute being set. For more details, see:

https://github.com/rhboot/shim/pull/750

As far as I can tell, this is caused by the 0x08 bit being set in
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask in the OvmfPKgX64.dsc by
default.

Should the packages provide alternative debug binaries where these
flags are enabled? Running this code is certainly useful for testing
purposes, but I'm not sure for production usage. Separate debug-enabled
binaries have been requested already in other bug reports, so maybe
this flag could be enabled there, and removed from default builds?

Thanks!

Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread


Thread

Bug#1105209: edk2: OVMF binaries built with debug memory clearing on free Luca Boccassi <bluca@debian.org> - 2025-05-13 14:40 +0200

csiph-web