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 5130C7803CC for ; Mon, 29 Jan 2024 11:25:41 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=OZmS/5S5+sME7p+8XSqK4o0MSoyoSa7Zf1MCE856vYc=; 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=1706527539; v=1; b=I3w5iwDMv9+OyS93XOrtkMoMYn/DUBDUNIMEnMX89j8LE56pM9ko0Q3iVQnfZuE3uCZu0agh htl7GmI1BJgkcRFZb0tcf4MaDUw1WZUeESLxblJHV7KyzZrriSkOuFz5odXqKuQ4/WAvtmmD8q3 suuF9lfSXJ1AyJ052DIUm/jQ= X-Received: by 127.0.0.2 with SMTP id PGl8YY7687511xBnXBbJtrxY; Mon, 29 Jan 2024 03:25:39 -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.web10.12629.1706527539258066558 for ; Mon, 29 Jan 2024 03:25:39 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-206-xDFo1pD3OwyF-Tghhgb-cQ-1; Mon, 29 Jan 2024 06:25:35 -0500 X-MC-Unique: xDFo1pD3OwyF-Tghhgb-cQ-1 X-Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 A9E1B29AA390; Mon, 29 Jan 2024 11:25:34 +0000 (UTC) X-Received: from [10.39.193.158] (unknown [10.39.193.158]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6CF041C060AF; Mon, 29 Jan 2024 11:25:33 +0000 (UTC) Message-ID: <0e3aed3d-f1a5-e400-01bf-26c87445089f@redhat.com> Date: Mon, 29 Jan 2024 12:25:32 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH 02/11] OvmfPkg: add ShellLibs.dsc.inc To: Gerd Hoffmann Cc: devel@edk2.groups.io, Jiewen Yao , Ard Biesheuvel , Michael Roth , Erdem Aktas , Min Xu , Tom Lendacky , Oliver Steffen References: <20240124163802.2160303-1-kraxel@redhat.com> <20240124163802.2160303-3-kraxel@redhat.com> <53e77c3c-86ad-b3fb-9474-0a4a7cdcb80f@redhat.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 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: XzIWBnlmi5grwIQiHpZXBJgsx7686176AA= 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=I3w5iwDM; 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 1/26/24 14:59, Gerd Hoffmann wrote: > Hi, >=20 >> My preferred style is observed for example in: >> >> - NetworkPkg/NetworkLibs.dsc.inc >> - RedfishPkg/RedfishLibs.dsc.inc >> >> Alas, it is not observed in: >> >> - MdePkg/MdeLibs.dsc.inc >> - OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc >> >> At least, from the last two, OvmfTpmLibs.dsc.inc has an excuse: it >> provides library class resolutions for different module types. >=20 > Which is why I did it that way for TPM. A single include file is enough > instead of having multiple include files for multiple module types. The > OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc is placed in a location where > this works without problems, and I've placed the new shell include at > the same location. >=20 > I also have a WIP patch series (need to undust and rebase it ...) doing > the same for the crypto stuff, and that has the same problem the TPM > include has: We have different configurations for PEI (stripped down > config, with only the hash functions for measurements) and DXE (full > TLS support). And it is a single file with multiple sections too ... >=20 > tl;dr: I prefer the with-sections style. OK! >=20 >> (2) This change makes the ShellCEntryLib resolution dependent on >> BUILD_SHELL, which is a functional change, and it is not justified, >> AFAICT. >=20 >> (2.1) "Bare bones" is for example >> "MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.in= f". >> [ ... ] >=20 >> (2.2) shell app is for example >> "OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf". >> [ ... ] >=20 > Thanks for all this background info, much appreciated. >=20 >> Our BUILD_SHELL macro controls whether we build the shell itself, but >> that is independent of whether we build applications that require the >> shell to launch them. Making the ShellCEntryLib class resolution >> dependent on BUILD_SHELL would only be valid if we also built all the >> shell applications dependent on the BUILD_SHELL macro -- which is not >> the case. >=20 > Given that EnrollDefaultKeys depends on the shell to launch > I'm wondering whenever we should just change that and make the > EnrollDefaultKeys build depend on BUILD_SHELL This certainly sounds justified. It's hard to imagine a use case where someone wanted an EnrollDefaultKeys.efi binary, but not a fresh shell.efi. > (and also move it into Shell*.inc) ? Seems to make sense, technically speaking; it's again the naming that annoys me a bit. :( It's a utility that's supposed to be run from under the shell, but not related to the shell itself. Hmm. :/ I guess we can live with it. 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 (#114685): https://edk2.groups.io/g/devel/message/114685 Mute This Topic: https://groups.io/mt/103935344/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-