public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: Doug Flick <doug.edk2@gmail.com>
Cc: devel@edk2.groups.io, Ard Biesheuvel <ardb+tianocore@kernel.org>,
	 Jiewen Yao <jiewen.yao@intel.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [edk2-devel] [PATCH v2 03/13] OvmfPkg:PlatformCI: Support virtio-rng-pci
Date: Thu, 9 May 2024 10:45:26 +0200	[thread overview]
Message-ID: <CAMj1kXFT7u-bAoYf51KUeN3KEWs1rTKcA_R0bauEyOyL3vrpsA@mail.gmail.com> (raw)
In-Reply-To: <20240509055633.828642-4-doug.edk2@gmail.com>

So this patch is necessary as otherwise, QEMU fails to boot due to a
missing source of randomness in the network drivers, right?

Does this imply that all QEMU deployments that rely on the bundled
firmware images (e.g., for micro-VMs and container use cases) will now
fail to boot if the pre-existing QEMU launch script happens to omit
the virtio-rng device?

If so, we absolutely need a fallback here - RngDxe based on TRNG (for
KVM use cases) as well as RNDR (for TCG with CPU max). This may still
break some deployments, but the vast majority should be covered.

RNDR raises another interesting problem, by the way - the ARM arch
spec requires RNDR to be backed by an appropriate DRBG that complies
with the NIST spec but it does not specify which one. IOW, it is
backed by a DRBG not by a raw entropy source, but specifying which
DRBG (by GUID) is not generally feasible, as the guest VM firmware
cannot interrogate the host about which DRBG is behind RNDR.

TL;DR there are a couple of loose ends here, and so rushing it through
doesn't seem wise imho. I'd rather leave ARM behind with these CVE
fixes than break many different use cases in different ways.



On Thu, 9 May 2024 at 07:56, Doug Flick <doug.edk2@gmail.com> wrote:
>
> This patch adds "virtio-rng-pci" to the PlatformBuildLib.py
> This adds Rng services to the guest VM
>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
>
> Signed-off-by: Doug Flick [MSFT] <doug.edk2@gmail.com>
> ---
>  OvmfPkg/PlatformCI/PlatformBuildLib.py | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/OvmfPkg/PlatformCI/PlatformBuildLib.py b/OvmfPkg/PlatformCI/PlatformBuildLib.py
> index 00d454954bff..3fe80f5c1caa 100644
> --- a/OvmfPkg/PlatformCI/PlatformBuildLib.py
> +++ b/OvmfPkg/PlatformCI/PlatformBuildLib.py
> @@ -208,6 +208,8 @@ class PlatformBuilder( UefiBuilder, BuildSettingsManager):
>          args += " -net none"                                                # turn off network
>          args += " -smp 4"
>          args += f" -drive file=fat:rw:{VirtualDrive},format=raw,media=disk" # Mount disk with startup.nsh
> +        # Provides Rng services to the Guest VM
> +        args += " -device virtio-rng-pci"
>
>          if (self.env.GetValue("QEMU_HEADLESS").upper() == "TRUE"):
>              args += " -display none"  # no graphics
> --
> 2.34.1
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118753): https://edk2.groups.io/g/devel/message/118753
Mute This Topic: https://groups.io/mt/105996580/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-05-09  8:45 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09  5:56 [edk2-devel] [PATCH v2 00/13] NetworkPkg: CVE-2023-45236 and CVE-2023-45237 Doug Flick via groups.io
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 01/13] EmulatorPkg: : Add RngDxe to EmulatorPkg Doug Flick via groups.io
2024-05-10  3:10   ` Ni, Ray
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 02/13] EmulatorPkg: : Add Hash2DxeCrypto " Doug Flick via groups.io
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 03/13] OvmfPkg:PlatformCI: Support virtio-rng-pci Doug Flick via groups.io
2024-05-09  8:45   ` Ard Biesheuvel [this message]
2024-05-09  8:45     ` Ard Biesheuvel
2024-05-09 18:21     ` Doug Flick via groups.io
2024-05-10  0:54       ` 回复: " gaoliming via groups.io
2024-05-10 17:13         ` [edk2-devel] " Doug Flick via groups.io
2024-05-11  8:40           ` Ard Biesheuvel
2024-05-13  9:22             ` Gerd Hoffmann
2024-05-13 17:24               ` Ard Biesheuvel
2024-05-17  3:27                 ` Doug Flick via groups.io
2024-05-17  7:27                   ` Ard Biesheuvel
2024-05-17  9:48                     ` Gerd Hoffmann
2024-05-24  3:02                       ` 回复: " gaoliming via groups.io
2024-05-14 19:55               ` Pedro Falcato
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 04/13] OvmfPkg: : Add Hash2DxeCrypto to OvmfPkg Doug Flick via groups.io
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 05/13] ArmVirtPkg:PlatformCI: Support virtio-rng-pci Doug Flick via groups.io
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 06/13] ArmVirtPkg: : Add Hash2DxeCrypto to ArmVirtPkg Doug Flick via groups.io
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 07/13] SecurityPkg: RngDxe: Remove incorrect limitation on GetRng Doug Flick via groups.io
2024-05-10 10:23   ` Yao, Jiewen
2024-05-10 21:12     ` Doug Flick via groups.io
2024-05-11  0:24       ` Yao, Jiewen
2024-05-13 15:53         ` PierreGondois
2024-05-11  8:26   ` Ard Biesheuvel
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 08/13] NetworkPkg:: SECURITY PATCH CVE-2023-45237 Doug Flick via groups.io
2024-05-13 14:30   ` Ard Biesheuvel
2024-05-15 19:14   ` Saloni Kasbekar
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 09/13] NetworkPkg: TcpDxe: SECURITY PATCH CVE-2023-45236 Doug Flick via groups.io
2024-05-15 21:38   ` Saloni Kasbekar
2024-05-21 19:28     ` Doug Flick via groups.io
2024-05-24  1:24       ` 回复: " gaoliming via groups.io
2024-05-24  4:23         ` Saloni Kasbekar
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 10/13] MdePkg: : Add MockUefiBootServicesTableLib Doug Flick via groups.io
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 11/13] MdePkg: : Adds Protocol for MockRng Doug Flick via groups.io
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 12/13] MdePkg: Add MockHash2 Protocol for testing Doug Flick via groups.io
2024-05-09  5:56 ` [edk2-devel] [PATCH v2 13/13] NetworkPkg: Update the PxeBcDhcp6GoogleTest due to underlying changes Doug Flick via groups.io
2024-05-24  4:24   ` Saloni Kasbekar
2024-05-09  9:40 ` 回复: [edk2-devel][edk2-stable202405] [PATCH v2 00/13] NetworkPkg: CVE-2023-45236 and CVE-2023-45237 gaoliming via groups.io
2024-05-09 18:26   ` [edk2-devel] " Doug Flick via groups.io
2024-05-15  0:41     ` 回复: " gaoliming via groups.io

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=CAMj1kXFT7u-bAoYf51KUeN3KEWs1rTKcA_R0bauEyOyL3vrpsA@mail.gmail.com \
    --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