From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 84EB2941A29 for ; Fri, 16 Feb 2024 17:56:53 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=5xOhkpIQG0BXpawRnVT7hWYhfzEph2xoptt+SzpaWIE=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1708106212; v=1; b=ekjEGNwOdiQpP0sfZ/ZbN4xvN2vmLG0wB6js4Eyn5c6/ii4GzH3Qlfq2R7MWcsRbuSG5OdE2 3QLCfPewVqGFGULk5R5IHcKJ0JgnQqzlBYhxUN0fjrPDJhi7/HSDeQIrsfUijzW6xGuoRCk3NR9 W058vvJInEwm+em1j6qNaG2Y= X-Received: by 127.0.0.2 with SMTP id V4S1YY7687511x6FPpUtjPMV; Fri, 16 Feb 2024 09:56:52 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.3612.1708106211471989731 for ; Fri, 16 Feb 2024 09:56:51 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-465-wTHAxxnaMBWmgLlPy__Jng-1; Fri, 16 Feb 2024 12:56:47 -0500 X-MC-Unique: wTHAxxnaMBWmgLlPy__Jng-1 X-Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id BDB758489A0; Fri, 16 Feb 2024 17:56:46 +0000 (UTC) X-Received: from [10.39.194.129] (unknown [10.39.194.129]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B0A042166B4F; Fri, 16 Feb 2024 17:56:44 +0000 (UTC) Message-ID: <781606c6-b15e-525b-7deb-364af8c1fc9c@redhat.com> Date: Fri, 16 Feb 2024 18:56:43 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v2 12/12] OvmfPkg: only add shell to FV in case secure boot is disabled To: devel@edk2.groups.io, kraxel@redhat.com Cc: Jiewen Yao , Min Xu , Tom Lendacky , Oliver Steffen , Erdem Aktas , Ard Biesheuvel , Michael Roth References: <20240215102503.273275-1-kraxel@redhat.com> <20240215102503.273275-13-kraxel@redhat.com> From: "Laszlo Ersek" In-Reply-To: <20240215102503.273275-13-kraxel@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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 Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: wLKNMnKlizPIPfjJhqn5nlIzx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ekjEGNwO; 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 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 2/15/24 11:25, Gerd Hoffmann wrote: > The EFI Shell allows to bypass secure boot, do not allow > to include the shell in the firmware images of secure boot > enabled builds. > > This prevents misconfigured downstream builds. > > Ref: https://bugs.launchpad.net/ubuntu/+source/edk2/+bug/2040137 > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4641 > Signed-off-by: Gerd Hoffmann > --- > OvmfPkg/Include/Fdf/ShellDxe.fdf.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc b/OvmfPkg/Include/Fdf/S= hellDxe.fdf.inc > index 3081ac41780a..38f69747b02c 100644 > --- a/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc > +++ b/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc > @@ -2,7 +2,7 @@ > # SPDX-License-Identifier: BSD-2-Clause-Patent > ## > > -!if $(BUILD_SHELL) =3D=3D TRUE > +!if $(BUILD_SHELL) =3D=3D TRUE && $(SECURE_BOOT_ENABLE) =3D=3D FALSE > > !if $(TOOL_CHAIN_TAG) !=3D "XCODE5" > !if $(NETWORK_ENABLE) =3D=3D TRUE This does the job: Reviewed-by: Laszlo Ersek An alternative could be (perhaps informing the user better): !if $(BUILD_SHELL) =3D=3D TRUE !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE !error BUILD_SHELL and SECURE_BOOT_ENABLE conflict !endif ... !endif If you prefer that approach, feel free to submit a v3 (you can add my R-b for that variant immediately). A disadvantage might be that, with such a patch in place, people having built OVMF with "-D SECURE_BOOT_ENABLE" thus far would start getting build failures, and they'd have to explicitly pass "-D BUILD_SHELL=3DFALSE", IIUC. (Well, some might consider such a build failure an advantage actually: near the BUILD_SHELL define, we have a comment saying "Shell can be useful for debugging but should not be enabled for production". Pick your poison, I guess...) A repost might be worth your while either way, because some of the patches are identical to their first versions, and Jiewen's v1 Acked-by, from [1], is missing from the unchanged (or trivially rebased) patches in v2. I strongly prefer capturing all feedback tags in the git history; after all, that keeps a record of reviewer *work* (not just the mere approval itself). [1] https://edk2.groups.io/g/devel/message/114362 msgid Thanks, Laszlo -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115551): https://edk2.groups.io/g/devel/message/115551 Mute This Topic: https://groups.io/mt/104370218/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-