From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id D64D6AC0F3A for ; Mon, 4 Nov 2024 09:41:08 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=bRJSiifkresz2hk1edXV4jTtVRhEV/7/pIN2QiX+NOQ=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition:Content-Transfer-Encoding; s=20240830; t=1730713268; v=1; x=1730972467; b=YdIkt0Wjj91CCAyF/wt+5Uqm0B3PdSLlwCbZ1ZTY0tzrMlpVtKKvJ9NNI1fx7WbAx9pQcjLS DQgfWZAKFZlQjmOZ2EVMqqItCz4+e3EC7/jUP6yml45wTc5p/xdD+AjHuhD5ysgpLuTY9cS0nKy iYTcH422mWsriUvt1QrOLnXEiJgy+U/MPipDC2FdR8P1N1icg3MZXlAyVRNiuYz2BxmehMJfCzO ekd+zRpohDNxxS3iwLXDIyRTzsfOt6MPpBYo8GRd3z8m++1KYV1szCQ/z8dG8R2YEM7U+T+/3ya 8idlciSwwHt5nZ+VunMyhIWDelkxrStd/zJ/8c3E/Bovg== X-Received: by 127.0.0.2 with SMTP id FiNqYY7687511xKEAgUpUOVr; Mon, 04 Nov 2024 01:41:07 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.53921.1730713266349839141 for ; Mon, 04 Nov 2024 01:41:06 -0800 X-Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-218-LbbMKc1JNNKxgO3R44YEiQ-1; Mon, 04 Nov 2024 04:41:04 -0500 X-MC-Unique: LbbMKc1JNNKxgO3R44YEiQ-1 X-Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 02B7A1955D94; Mon, 4 Nov 2024 09:41:03 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.194.101]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5A35219560A2; Mon, 4 Nov 2024 09:41:02 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id F251E180063D; Mon, 4 Nov 2024 10:40:59 +0100 (CET) Date: Mon, 4 Nov 2024 10:40:59 +0100 From: "Gerd Hoffmann" To: Stefano Garzarella Cc: Oliver Steffen , devel@edk2.groups.io, Jiewen Yao , Zachary Clark-williams , Saloni Kasbekar , Doug Flick , Daniel Berrange , Cong Li Subject: Re: [edk2-devel] OVMF Issue with Netboot, VirtioRng, and both COM1/COM2 configured Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 04 Nov 2024 01:41:06 -0800 Resent-From: kraxel@redhat.com Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: zEYreY87FQGx5UL75KkM3gc3x7686176AA= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=YdIkt0Wj; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io On Mon, Nov 04, 2024 at 10:14:47AM +0100, Stefano Garzarella wrote: > Hi Gerd, > > On Fri, Nov 1, 2024 at 10:31 AM Gerd Hoffmann wrote: > > > > Hi, > > > > > By analyzing the calls to the dispatcher (`gDS->Dispatch ()`) I found > > > that when we only have COM1, EfiBootManagerConnectDevicePath() at some > > > point invokes `gDS->Dispatch ()` after VirtioRng has started. This call > > > will then get DxeNetLib loaded. > > > > Ok, so it is probably a good idea to explicitly request a dispatch after > > activating virtio-rng, so we do not depend on this happening by pure > > luck for other reasons: > > > > --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > > +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > > @@ -670,6 +670,7 @@ ConnectVirtioPciRng ( > > if (EFI_ERROR (Status)) { > > goto Error; > > } > > + gDS->Dispatch (); > > } > > > > return EFI_SUCCESS; > > > > [ untested patch, and we probably should do something similar for ArmVirt, > > /me goes continue walking through my email backlog now ] > > > > Yep, that should work. > > Last week I went a little deeper into the problem and basically > starting with commit 4c4ceb2ceb ("NetworkPkg: SECURITY PATCH > CVE-2023-45237") the network stack is no longer initialized during > DXE, but in BDS (see > https://issues.redhat.com/browse/RHEL-58631?focusedId=25981655&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-25981655). > > Is this intentional? Could there be other problems besides this one we just had? A lot of the more important stuff for network booting happens in the BDS phase anyway, i.e. OVMF checking the qemu boot order, connecting the devices configured as bootable devices (including the NICs), creating (if needed) and sorting the BootNNNN entries. So I don't expect any bad side effects from initializing the core network modules in the (early) BDS phase. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120704): https://edk2.groups.io/g/devel/message/120704 Mute This Topic: https://groups.io/mt/109008158/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-