On Tue, Jun 28, 2022 at 01:48:16PM -0500, Dimitrije Pavlov wrote: > Ensure that the PixelInformation field of the > EFI_GRAPHICS_OUTPUT_MODE_INFORMATION structure is zeroed out in > EFI_GRAPHICS_OUTPUT_PROTOCOL.QueryMode() and > EFI_GRAPHICS_OUTPUT_PROTOCOL.SetMode() when PixelFormat is > PixelBlueGreenRedReserved8BitPerColor. > > According to UEFI 2.9 Section 12.9, PixelInformation field of the > EFI_GRAPHICS_OUTPUT_MODE_INFORMATION structure is valid only if > PixelFormat is PixelBitMask. This means that firmware is not required > to fill out the PixelInformation field for other PixelFormat types, > which implies that the QemuVideoDxe implementation is technically > correct. > > However, not zeroing out those fields will leak the contents of the > memory returned by the memory allocator, so it is better to explicitly > set them to zero. > > In addition, the SCT test suite relies on PixelInformation always > having a consistent value, which causes failures. > > Cc: Ard Biesheuvel <[email protected]> > Cc: Jiewen Yao <[email protected]> > Cc: Jordan Justen <[email protected]> > Cc: Gerd Hoffmann <[email protected]> > Cc: Jeff Booher-Kaeding <[email protected]> > Cc: Samer El-Haj-Mahmoud <[email protected]> > Cc: Sunny Wang <[email protected]> > Cc: Jeremy Linton <[email protected]> > > Signed-off-by: Dimitrije Pavlov <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#90832): https://edk2.groups.io/g/devel/message/90832 Mute This Topic: https://groups.io/mt/92050521/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
