From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io, Dimitrije.Pavlov@arm.com
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
Jiewen Yao <jiewen.yao@intel.com>,
Jordan Justen <jordan.l.justen@intel.com>,
Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>,
Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
Sunny Wang <Sunny.Wang@arm.com>,
Jeremy Linton <Jeremy.Linton@arm.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] OvmfPkg/QemuVideoDxe: Zero out PixelInformation in QueryMode
Date: Wed, 29 Jun 2022 09:05:27 +0200 [thread overview]
Message-ID: <20220629070527.4f6qiaitzcwzzclx@sirius.home.kraxel.org> (raw)
In-Reply-To: <20220628184816.24493-1-Dimitrije.Pavlov@arm.com>
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 <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>
> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
> Cc: Sunny Wang <Sunny.Wang@arm.com>
> Cc: Jeremy Linton <Jeremy.Linton@arm.com>
>
> Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
next prev parent reply other threads:[~2022-06-29 7:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 18:48 [PATCH v1 1/1] OvmfPkg/QemuVideoDxe: Zero out PixelInformation in QueryMode Dimitrije Pavlov
2022-06-29 7:05 ` Gerd Hoffmann [this message]
2022-07-14 14:28 ` Sunny Wang
2022-07-18 16:11 ` Samer El-Haj-Mahmoud
2022-07-27 15:42 ` [edk2-devel] " Ard Biesheuvel
2022-07-27 19:34 ` Dimitrije Pavlov
2022-07-27 20:39 ` Pedro Falcato
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=20220629070527.4f6qiaitzcwzzclx@sirius.home.kraxel.org \
--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