From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C44C181787 for ; Tue, 17 Jan 2017 00:03:32 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 17 Jan 2017 00:03:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,243,1477983600"; d="scan'208";a="214222490" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 17 Jan 2017 00:03:32 -0800 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 17 Jan 2017 00:03:32 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 17 Jan 2017 00:03:31 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by shsmsx102.ccr.corp.intel.com ([169.254.2.88]) with mapi id 14.03.0248.002; Tue, 17 Jan 2017 16:03:28 +0800 From: "Wu, Jiaxin" To: Gary Lin , "edk2-devel@lists.01.org" CC: Laszlo Ersek , "Justen, Jordan L" , "Long, Qin" Thread-Topic: [PATCH 1/3] OvmfPkg: always resolve OpenSslLib, IntrinsicLib and BaseCryptLib Thread-Index: AQHScH2ZnO7k4H/Tj0mC3eCYNVkFTqE8TVCw Date: Tue, 17 Jan 2017 08:03:27 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B727416294689@SHSMSX103.ccr.corp.intel.com> References: <20170117045232.4765-1-glin@suse.com> <20170117045232.4765-2-glin@suse.com> In-Reply-To: <20170117045232.4765-2-glin@suse.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzBiNzMzYWEtZTUwMi00NTJkLTk1NjgtZTM0MmJkYTY5OGE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS45LjYuNiIsIlRydXN0ZWRMYWJlbEhhc2giOiJNUlBcL3JQYjZUdTd5WXJHNnM5QkdHelA2MExwQVk2aDVBVnZlWHhlcFZkaz0ifQ== x-ctpclassification: CTP_PUBLIC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 1/3] OvmfPkg: always resolve OpenSslLib, IntrinsicLib and BaseCryptLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2017 08:03:32 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Wu Jiaxin > -----Original Message----- > From: Gary Lin [mailto:glin@suse.com] > Sent: Tuesday, January 17, 2017 12:53 PM > To: edk2-devel@lists.01.org > Cc: Laszlo Ersek ; Justen, Jordan L > ; Wu, Jiaxin ; Long, Qin > > Subject: [PATCH 1/3] OvmfPkg: always resolve OpenSslLib, IntrinsicLib and > BaseCryptLib >=20 > This commit provides unconditional library resolutions for the OpenSslLib= , > IntrinsicLib and BaseCryptLib classes, regardless of whether those classe= s > are actually used by any module. >=20 > Although those libraries depends on OpenSSL, they won't be built unless > a module really uses them. Thus, missing OpenSSL from the tree won't > cause any build failure as long as SECURE_BOOT_ENABLE is false. >=20 > (Based on Jiaxin's patch and Laszlo's suggestion) >=20 > Cc: Laszlo Ersek > Cc: Justen Jordan L > Cc: Wu Jiaxin > Cc: Long Qin > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Gary Lin > --- > OvmfPkg/OvmfPkgIa32.dsc | 9 +++------ > OvmfPkg/OvmfPkgIa32X64.dsc | 9 +++------ > OvmfPkg/OvmfPkgX64.dsc | 9 +++------ > 3 files changed, 9 insertions(+), 18 deletions(-) >=20 > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index e97f7f0262..9aa66eb951 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -141,10 +141,11 @@ [LibraryClasses] >=20 > LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf >=20 > DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD > ebugPrintErrorLevelLib.inf >=20 > -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > - > PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf > IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > + > +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > + > PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf >=20 > TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmM > easurementLib.inf > AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.in= f > !if $(NETWORK_IP6_ENABLE) =3D=3D TRUE > @@ -166,9 +167,7 @@ [LibraryClasses] > XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf >=20 > [LibraryClasses.common] > -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > -!endif >=20 > [LibraryClasses.common.SEC] > TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf > @@ -258,9 +257,7 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >=20 > DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i > nf > !endif > UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf > -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf > -!endif > PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf >=20 > [LibraryClasses.common.UEFI_DRIVER] > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index 8e3e04c135..9537e92077 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -146,10 +146,11 @@ [LibraryClasses] >=20 > LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf >=20 > DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD > ebugPrintErrorLevelLib.inf >=20 > -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > - > PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf > IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > + > +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > + > PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf >=20 > TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmM > easurementLib.inf > AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.in= f > !if $(NETWORK_IP6_ENABLE) =3D=3D TRUE > @@ -171,9 +172,7 @@ [LibraryClasses] > XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf >=20 > [LibraryClasses.common] > -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > -!endif >=20 > [LibraryClasses.common.SEC] > TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf > @@ -263,9 +262,7 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >=20 > DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i > nf > !endif > UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf > -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf > -!endif > PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf >=20 > [LibraryClasses.common.UEFI_DRIVER] > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index 6ec3fe050d..d15294eb72 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -146,10 +146,11 @@ [LibraryClasses] >=20 > LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf >=20 > DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD > ebugPrintErrorLevelLib.inf >=20 > -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > - > PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf > IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > + > +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > + > PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf >=20 > TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmM > easurementLib.inf > AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.in= f > !if $(NETWORK_IP6_ENABLE) =3D=3D TRUE > @@ -171,9 +172,7 @@ [LibraryClasses] > XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf >=20 > [LibraryClasses.common] > -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > -!endif >=20 > [LibraryClasses.common.SEC] > TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf > @@ -263,9 +262,7 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >=20 > DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i > nf > !endif > UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf > -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf > -!endif > PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf >=20 > [LibraryClasses.common.UEFI_DRIVER] > -- > 2.11.0