From nobody Tue Nov 26 14:23:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50607+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50607+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573697872; cv=none; d=zoho.com; s=zohoarc; b=NwnRCEhr9V20i0EoGtnGtfhaIVC/d0/XJk8h8J5YTUE62BKyktD69UNjU+hzO9sDd2DgUKcXDvEctX3sf3jJ5mMZ3PF1r1lqp8Afd6mMKELb+3NTYaLVj6fM9jzsHZpb9c6RPLt6I7RpCphtUwCM3sFIfUjsQIccD3VzBO+BJFQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573697872; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=K3OmsCRcvBEkw9s2hTjhY7pObPGj/MDf5W6qz8i0dMk=; b=Ok5WqG8MSGK158u2IQKmPLTtpvGJArpL9sb5OHYeHoEVpNADiD9zHhzgZ7Irc9tw/pC24Zxnk9el9oT+1ILr5wJVR/ELrVAJyyrgb/vLZVoprYBvCccqfaqzwP867A85jwOXJ6bBHbsOOblrz223u4V5o+ZF639fKd3uoyL6Vu8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50607+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1573697871663415.4843398693231; Wed, 13 Nov 2019 18:17:51 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id q7NEYY1788612xmZVqkdwmvo; Wed, 13 Nov 2019 18:17:51 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:17:50 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 18:17:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500464" X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:17:47 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Jiaxin Wu , Siyuan Fu , Maciej Rabeda , Liming Gao , Ray Ni Subject: [edk2-devel] [PATCH 01/11] NetworkPkg/NetworkPkg.dsc: specify RngLib instance for build Date: Thu, 14 Nov 2019 10:17:33 +0800 Message-Id: <20191114021743.3876-2-jian.j.wang@intel.com> In-Reply-To: <20191114021743.3876-1-jian.j.wang@intel.com> References: <20191114021743.3876-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: 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,jian.j.wang@intel.com X-Gm-Message-State: ZOdgq4xsfYzSJszem88He4r3x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573697871; bh=CKUfTWqaK2yoxRIId+77A+BesPJe0zLOTyetERTNTTA=; h=Cc:Date:From:Reply-To:Subject:To; b=t5DtcR3KVcLGsnZXgvcMptRLRPNGvzTdz6jKH1Hee7Azbn+ej1H1ETgYpWOGV2fZjBx vLk33tt62sf3flLDLNH6TFckXqpegi9FHPUOfqvzxTxtSAJ7zPfasrUZ5pRTW3kfwpVqL AWz2qzCmZ5lXwQEN/RexmTfjUsWudXJJGAs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Per BZ1871, OpensslLib will depend on RngLib instead of TimerLib. RngLibNull is used by default. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1871 Cc: Jiaxin Wu Cc: Siyuan Fu Cc: Maciej Rabeda Cc: Liming Gao Cc: Ray Ni Signed-off-by: Jian J Wang --- NetworkPkg/NetworkPkg.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc index b149453d26..bc324a06a1 100644 --- a/NetworkPkg/NetworkPkg.dsc +++ b/NetworkPkg/NetworkPkg.dsc @@ -47,6 +47,7 @@ !else BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf !endif --=20 2.17.1.windows.2 -=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 (#50607): https://edk2.groups.io/g/devel/message/50607 Mute This Topic: https://groups.io/mt/56714038/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue Nov 26 14:23:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50608+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50608+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573697874; cv=none; d=zoho.com; s=zohoarc; b=m5mB0oPrgpnrWgExjAf7YXCc3TwCFCbmiljxQoTFtO41rArUuNbzw8GFk9kW7xn5lrMAfyTOE1NTJRjpTDglS+Zr2HiJEekccDfHt+NNSnjAdyBAAMBRi/nPtNLNeany3u8PhL8UE6rytu9APRH2duQAQWgsI9jmhsyqVZBJk28= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573697874; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=YvAzUN09/ZxfVtVHTeaW59oqJttSJmREaREMMu7XsN4=; b=geBVFm9FCLssncztkKmjynmACqDB0wCHrBHTGh4R5u2CE3LA7bY7dwwrfVN7JEQ3HxmYFFxHI6M/gWgpcItjBPrryuW9jZ806U1HMPVivLSWtjb11AKTxrsBkwx3NQSJl5LmQWOxdq5JD3Qek/UC+QHEd070PpHtHY8iEc6Mj3c= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50608+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1573697874368470.3479158231486; Wed, 13 Nov 2019 18:17:54 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 1MXsYY1788612xQQxBkqmi3i; Wed, 13 Nov 2019 18:17:51 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:17:51 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 18:17:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500473" X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:17:49 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Liming Gao , Michael D Kinney , Ray Ni Subject: [edk2-devel] [PATCH 02/11] SignedCapsulePkg/SignedCapsulePkg.dsc: specify RngLib instances Date: Thu, 14 Nov 2019 10:17:34 +0800 Message-Id: <20191114021743.3876-3-jian.j.wang@intel.com> In-Reply-To: <20191114021743.3876-1-jian.j.wang@intel.com> References: <20191114021743.3876-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: 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,jian.j.wang@intel.com X-Gm-Message-State: 12ktAaTfAbgD1wOMMVlHmdfLx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573697871; bh=1hEjFZlAHVE6IgVt5FvQTONtDmmmTRAsSRLLTZD+HRc=; h=Cc:Date:From:Reply-To:Subject:To; b=DCWdY7g8Q5O221ekqACJFvGTmKPBi/LuSFArWPDVQt6bBgf9LJPqx73KrRtQ3Fv2rqR VgQdNsZxGEKPghduH1cQX1Qzl9wU8OyM6TTBuRtlDOUgheeg139UZlz+UGjNd4/G1yYGS r5nfgqhcJ6u3RcSBJGGMZrD2ooxStcp6AqQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Per BZ1871, OpensslLib will depend on RngLib instead of TimerLib. RngLibNull is used by default just for build. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1871 Cc: Liming Gao Cc: Michael D Kinney Cc: Liming Gao Cc: Ray Ni Signed-off-by: Jian J Wang --- SignedCapsulePkg/SignedCapsulePkg.dsc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SignedCapsulePkg/SignedCapsulePkg.dsc b/SignedCapsulePkg/Signe= dCapsulePkg.dsc index c5080ec1dd..e8af37be8c 100644 --- a/SignedCapsulePkg/SignedCapsulePkg.dsc +++ b/SignedCapsulePkg/SignedCapsulePkg.dsc @@ -119,6 +119,7 @@ !else IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf !endif =20 @@ -134,6 +135,7 @@ !else IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif =20 @@ -148,6 +150,7 @@ !else IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif =20 @@ -171,6 +174,7 @@ !else IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf !endif =20 @@ -183,6 +187,7 @@ !else IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif =20 @@ -195,6 +200,7 @@ !else IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif =20 --=20 2.17.1.windows.2 -=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 (#50608): https://edk2.groups.io/g/devel/message/50608 Mute This Topic: https://groups.io/mt/56714043/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue Nov 26 14:23:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50609+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50609+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573697875; cv=none; d=zoho.com; s=zohoarc; b=T65vcY0jKgXNxXcViDoY/D7k+gHPSmfaq/WJnDnn9m19k2JuEqEsyZHyYyzz2BKzeEhHqATN/A74vWWU7Vu8hl5Ck8frokj6zRdVWBLc9N/qBiz/ZBw7RVEyDzphXBc5JGnOAXJ2OwsUUYmuTU3q5jW7qssFW5NgMyc1QwQL078= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573697875; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=a67AyBG0/jV46gkjOjtDeV8neYb7arKiX5aVr91drho=; b=KXCq+w4tlzoEEyORC9GoSjoks3Ytts9wuB+HaW6CTLB4uE9fbOeUQiCk5Mtc2y3djTyoowUSauxWc9abjSUo/8Hayx6p0JQRmr+BwWHSvkxX6xdx5M56x5fl4oyoVJ6r61gI+5KSZ9KiCFiuzzs1Gzldy0DadmG8g4XCxWoylcY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50609+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 15736978754350.35734017396021045; Wed, 13 Nov 2019 18:17:55 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 9o88YY1788612xgKPMgpaPIu; Wed, 13 Nov 2019 18:17:52 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:17:52 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 18:17:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500484" X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:17:50 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Liming Gao , Michael D Kinney , Ray Ni Subject: [edk2-devel] [PATCH 03/11] FmpDevicePkg/FmpDevicePkg.dsc: specify RngLib instances in dsc files Date: Thu, 14 Nov 2019 10:17:35 +0800 Message-Id: <20191114021743.3876-4-jian.j.wang@intel.com> In-Reply-To: <20191114021743.3876-1-jian.j.wang@intel.com> References: <20191114021743.3876-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: 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,jian.j.wang@intel.com X-Gm-Message-State: olAckeE28datgpxYEnhV5qjAx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573697872; bh=RbDDk3OGeZF+Rxzo6Wfhhe86b/rO3rbCoZCnsY6cXyc=; h=Cc:Date:From:Reply-To:Subject:To; b=JdiiLO9ikifXkYk9TUNwrM6gG2tvBQC7PInoA6oDLHAKaQGL4FjtGPFWQxWHfoT1PF9 Zkw0VRsco5qlIfT1lvkCf4gzXCCV7ZTR512PxRCdCDe8XnGkMIvO8WaAGAOk+fHRyrWgo Y7ok/IhstU2mFIoKaD6V0gLhPCsc9mcYOn0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Per BZ1871, OpensslLib will depend on RngLib instead of TimerLib. RngLibNull is used by default. TimerLib will be removed once its dependency is removed. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1871 Cc: Liming Gao Cc: Michael D Kinney Cc: Liming Gao Cc: Ray Ni Signed-off-by: Jian J Wang --- FmpDevicePkg/FmpDevicePkg.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/FmpDevicePkg/FmpDevicePkg.dsc b/FmpDevicePkg/FmpDevicePkg.dsc index f4093d3837..201ea00f63 100644 --- a/FmpDevicePkg/FmpDevicePkg.dsc +++ b/FmpDevicePkg/FmpDevicePkg.dsc @@ -53,6 +53,7 @@ !else IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAu= thenticationLibPkcs7.inf --=20 2.17.1.windows.2 -=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 (#50609): https://edk2.groups.io/g/devel/message/50609 Mute This Topic: https://groups.io/mt/56714057/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue Nov 26 14:23:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50610+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50610+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573697875; cv=none; d=zoho.com; s=zohoarc; b=Ijnv4S63lMKYjCr6IDinuli5/BqJLvqgQrajtcTGT89iTU1tY0fNXgitn44WeFF2mDLBMQsr+YskPh7VZtVsOjJ1KV0dNsntgoAV+E68Ualh3ioz9j9PtueMJKD+/ueY9fcHtf+v3S/z9xQ2ey0lwah/gfInlCIddFrheeq/UCc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573697875; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=eJkOZxjgOnA7+ASOfZHa9lSCPzRA6c2abwyVCS5VWhY=; b=olJVu2wUPZ/6Bl37n+xiiH6Sa9a5/GC1uJhw/FJinhGZEQqtwjYRv5urkS0M6JNWNbUuGAVnQeR/0M6aVwRIYR/nJ+j4dYXokP9pvaHe6YjGaexp4grIref9ciEjekQmjHynzpR4VZO14vGAvl0YExwmdPkFMsSClK+8uBlciAc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50610+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1573697875263725.7237404500319; Wed, 13 Nov 2019 18:17:55 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id etDeYY1788612xSyY2KoDU5J; Wed, 13 Nov 2019 18:17:54 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:17:53 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 18:17:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500492" X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:17:51 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Ray Ni Subject: [edk2-devel] [PATCH 04/11] MdePkg/BaseLib: add interface to wrap rdseed IA instruction Date: Thu, 14 Nov 2019 10:17:36 +0800 Message-Id: <20191114021743.3876-5-jian.j.wang@intel.com> In-Reply-To: <20191114021743.3876-1-jian.j.wang@intel.com> References: <20191114021743.3876-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: 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,jian.j.wang@intel.com X-Gm-Message-State: zM6guZLkmWVHptbLB9ztHDw7x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573697874; bh=eBZa4jBW7u/VxlWgKQ0r6PtIxpi3sxUeNTr9+/RWKJU=; h=Cc:Date:From:Reply-To:Subject:To; b=w7h1aczeu1vcWW9++1EHSP1OQQJOPeYZBFsFGuVX5xbi9dIVnXer6bm5FSpHw0kX6Cc DoGIn1KYXs298OXFXmyMBJ4jCMl0W7iNHyPeqGVAURNe5hbECTnjU4VwhWq4+dv8v/OXk NpuasQ76AHMmU/MCzZMP5Vv4bfvFnsk8JLU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" BaseRngLib uses rdrand instruction to get random number from DRNG in the processor, which is not a good candidate for seeding openssl rand interface. rdseed in x86 cpu provides non-deterministic random number (NRBG) which meets NIST SP 800-90B and NIST SP800-90C standards and can be used as seed for other software DRNG. This patch adds a C interface AsmRdSeed() to wrap it in BaseLib so that we can add a new RngLib for users to choose in their platform, if their processor support rdseed instruction. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1871 Cc: Michael D Kinney Cc: Liming Gao Cc: Ray Ni Signed-off-by: Jian J Wang --- MdePkg/Include/Library/BaseLib.h | 51 +++++++++++++ MdePkg/Library/BaseLib/BaseLib.inf | 4 ++ MdePkg/Library/BaseLib/BaseLibInternals.h | 46 ++++++++++++ MdePkg/Library/BaseLib/Ia32/RdSeed.nasm | 87 +++++++++++++++++++++++ MdePkg/Library/BaseLib/X64/RdSeed.nasm | 80 +++++++++++++++++++++ MdePkg/Library/BaseLib/X86RdSeed.c | 73 +++++++++++++++++++ 6 files changed, 341 insertions(+) create mode 100644 MdePkg/Library/BaseLib/Ia32/RdSeed.nasm create mode 100644 MdePkg/Library/BaseLib/X64/RdSeed.nasm create mode 100644 MdePkg/Library/BaseLib/X86RdSeed.c diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/Base= Lib.h index 2a75bc023f..e2f9bf121e 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -7856,6 +7856,57 @@ AsmRdRand64 ( OUT UINT64 *Rand ); =20 +/** + Generates a 16-bit random seed through RDSEED instruction. + + if Seed is NULL, then ASSERT(). + + @param[out] Seed Buffer pointer to store the seed data. + + @retval TRUE RDSEED call was successful. + @retval FALSE Failed attempts to call RDSEED. + + **/ +BOOLEAN +EFIAPI +AsmRdSeed16 ( + OUT UINT16 *Seed + ); + +/** + Generates a 32-bit random seed through RDSEED instruction. + + if Seed is NULL, then ASSERT(). + + @param[out] Seed Buffer pointer to store the seed data. + + @retval TRUE RDSEED call was successful. + @retval FALSE Failed attempts to call RDSEED. + +**/ +BOOLEAN +EFIAPI +AsmRdSeed32 ( + OUT UINT32 *Seed + ); + +/** + Generates a 64-bit random seed through RDSEED instruction. + + if Seed is NULL, then ASSERT(). + + @param[out] Seed Buffer pointer to store the seed data. + + @retval TRUE RDSEED call was successful. + @retval FALSE Failed attempts to call RDSEED. + +**/ +BOOLEAN +EFIAPI +AsmRdSeed64 ( + OUT UINT64 *Seed + ); + /** Load given selector into TR register. =20 diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/Ba= seLib.inf index 3586beb0ab..5e12093ba3 100644 --- a/MdePkg/Library/BaseLib/BaseLib.inf +++ b/MdePkg/Library/BaseLib/BaseLib.inf @@ -181,6 +181,7 @@ Ia32/EnableCache.nasm| GCC Ia32/DisableCache.nasm| GCC Ia32/RdRand.nasm + Ia32/RdSeed.nasm =20 Ia32/DivS64x64Remainder.c Ia32/InternalSwitchStack.c | MSFT @@ -202,6 +203,7 @@ X86DisablePaging64.c X86DisablePaging32.c X86RdRand.c + X86RdSeed.c X86PatchInstruction.c X86SpeculationBarrier.c =20 @@ -306,12 +308,14 @@ X86DisablePaging64.c X86DisablePaging32.c X86RdRand.c + X86RdSeed.c X86PatchInstruction.c X86SpeculationBarrier.c X64/GccInline.c | GCC X64/EnableDisableInterrupts.nasm X64/DisablePaging64.nasm X64/RdRand.nasm + X64/RdSeed.nasm ChkStkGcc.c | GCC =20 [Sources.EBC] diff --git a/MdePkg/Library/BaseLib/BaseLibInternals.h b/MdePkg/Library/Bas= eLib/BaseLibInternals.h index 6837d67d90..7b18b192c9 100644 --- a/MdePkg/Library/BaseLib/BaseLibInternals.h +++ b/MdePkg/Library/BaseLib/BaseLibInternals.h @@ -862,6 +862,52 @@ InternalX86RdRand64 ( OUT UINT64 *Rand ); =20 +/** + Generates a 16-bit random seed through RDSEED instruction. + + @param[out] Seed Buffer pointer to store the seed data. + + @retval TRUE RDSEED call was successful. + @retval FALSE Failed attempts to call RDSEED. + + **/ +BOOLEAN +EFIAPI +InternalX86RdSeed16 ( + OUT UINT16 *Seed + ); + +/** + Generates a 32-bit random seed through RDSEED instruction. + + @param[out] Seed Buffer pointer to store the seed data. + + @retval TRUE RDSEED call was successful. + @retval FALSE Failed attempts to call RDSEED. + +**/ +BOOLEAN +EFIAPI +InternalX86RdSeed32 ( + OUT UINT32 *Seed + ); + +/** + Generates a 64-bit random seed through RDSEED instruction. + + + @param[out] Seed Buffer pointer to store the seed data. + + @retval TRUE RDSEED call was successful. + @retval FALSE Failed attempts to call RDSEED. + +**/ +BOOLEAN +EFIAPI +InternalX86RdSeed64 ( + OUT UINT64 *Seed + ); + #else =20 #endif diff --git a/MdePkg/Library/BaseLib/Ia32/RdSeed.nasm b/MdePkg/Library/BaseL= ib/Ia32/RdSeed.nasm new file mode 100644 index 0000000000..0a4de30db6 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/RdSeed.nasm @@ -0,0 +1,87 @@ +;-------------------------------------------------------------------------= ----- +; +; Copyright (c) 2019, Intel Corporation. All rights reserved.
+; SPDX-License-Identifier: BSD-2-Clause-Patent +; +; Module Name: +; +; RdSeed.nasm +; +; Abstract: +; +; Generates random seed through CPU RdSeed instruction under 32-bit plat= form. +; +; Notes: +; +;-------------------------------------------------------------------------= ----- + +SECTION .text + +;-------------------------------------------------------------------------= ----- +; Generates a 16 bit random seed through RDSEED instruction. +; Return TRUE if Seed generated successfully, or FALSE if not. +; +; BOOLEAN EFIAPI InternalX86RdSeed16 (UINT16 *Seed); +;-------------------------------------------------------------------------= ----- +global ASM_PFX(InternalX86RdSeed16) +ASM_PFX(InternalX86RdSeed16): + ; rdseed ax ; generate a 16 bit RN into ax + ; CF=3D1 if RN generated ok, otherwise = CF=3D0 + db 0xf, 0xc7, 0xf8 ; rdseed r16: "0f c7 /7 ModRM:r/m(w)" + jc rn16_ok ; jmp if CF=3D1 + xor eax, eax ; reg=3D0 if CF=3D0 + pause + ret ; return with failure status +rn16_ok: + mov edx, dword [esp + 4] + mov [edx], ax + mov eax, 1 + ret + +;-------------------------------------------------------------------------= ----- +; Generates a 32 bit random seed through RDSEED instruction. +; Return TRUE if Seed generated successfully, or FALSE if not. +; +; BOOLEAN EFIAPI InternalX86RdSeed32 (UINT32 *Seed); +;-------------------------------------------------------------------------= ----- +global ASM_PFX(InternalX86RdSeed32) +ASM_PFX(InternalX86RdSeed32): + ; rdseed eax ; generate a 32 bit RN into eax + ; CF=3D1 if RN generated ok, otherwise = CF=3D0 + db 0xf, 0xc7, 0xf8 ; rdseed r32: "0f c7 /7 ModRM:r/m(w)" + jc rn32_ok ; jmp if CF=3D1 + xor eax, eax ; reg=3D0 if CF=3D0 + pause + ret ; return with failure status +rn32_ok: + mov edx, dword [esp + 4] + mov [edx], eax + mov eax, 1 + ret + +;-------------------------------------------------------------------------= ----- +; Generates a 64 bit random seed through RDSEED instruction. +; Return TRUE if Seed generated successfully, or FALSE if not. +; +; BOOLEAN EFIAPI InternalX86RdSeed64 (UINT64 *Seed); +;-------------------------------------------------------------------------= ----- +global ASM_PFX(InternalX86RdSeed64) +ASM_PFX(InternalX86RdSeed64): + ; rdseed eax ; generate a 32 bit RN into eax + ; CF=3D1 if RN generated ok, otherwise = CF=3D0 + db 0xf, 0xc7, 0xf8 ; rdseed r32: "0f c7 /7 ModRM:r/m(w)" + jnc rn64_ret ; jmp if CF=3D0 + mov edx, dword [esp + 4] + mov [edx], eax + + db 0xf, 0xc7, 0xf0 ; generate another 32 bit RN + jnc rn64_ret ; jmp if CF=3D0 + mov [edx + 4], eax + + mov eax, 1 + ret +rn64_ret: + xor eax, eax + pause + ret ; return with failure status + diff --git a/MdePkg/Library/BaseLib/X64/RdSeed.nasm b/MdePkg/Library/BaseLi= b/X64/RdSeed.nasm new file mode 100644 index 0000000000..a60acfeace --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/RdSeed.nasm @@ -0,0 +1,80 @@ +;-------------------------------------------------------------------------= ----- +; +; Copyright (c) 2019, Intel Corporation. All rights reserved.
+; SPDX-License-Identifier: BSD-2-Clause-Patent +; +; Module Name: +; +; RdSeed.nasm +; +; Abstract: +; +; Generates random seed through CPU RdSeed instruction under 64-bit plat= form. +; +; Notes: +; +;-------------------------------------------------------------------------= ----- + + DEFAULT REL + SECTION .text + +;-------------------------------------------------------------------------= ----- +; Generates a 16 bit random seed through RDSEED instruction. +; Return TRUE if Seed generated successfully, or FALSE if not. +; +; BOOLEAN EFIAPI InternalX86RdSeed16 (UINT16 *Seed); +;-------------------------------------------------------------------------= ----- +global ASM_PFX(InternalX86RdSeed16) +ASM_PFX(InternalX86RdSeed16): + ; rdseed ax ; generate a 16 bit RN into eax, + ; CF=3D1 if RN generated ok, otherwise = CF=3D0 + db 0xf, 0xc7, 0xf8 ; rdseed r16: "0f c7 /7 ModRM:r/m(w)" + jc rn16_ok ; jmp if CF=3D1 + xor rax, rax ; reg=3D0 if CF=3D0 + pause + ret ; return with failure status +rn16_ok: + mov [rcx], ax + mov rax, 1 + ret + +;-------------------------------------------------------------------------= ----- +; Generates a 32 bit random seed through RDSEED instruction. +; Return TRUE if Seed generated successfully, or FALSE if not. +; +; BOOLEAN EFIAPI InternalX86RdSeed32 (UINT32 *Seed); +;-------------------------------------------------------------------------= ----- +global ASM_PFX(InternalX86RdSeed32) +ASM_PFX(InternalX86RdSeed32): + ; rdseed eax ; generate a 32 bit RN into eax, + ; CF=3D1 if RN generated ok, otherwise = CF=3D0 + db 0xf, 0xc7, 0xf8 ; rdseed r32: "0f c7 /7 ModRM:r/m(w)" + jc rn32_ok ; jmp if CF=3D1 + xor rax, rax ; reg=3D0 if CF=3D0 + pause + ret ; return with failure status +rn32_ok: + mov [rcx], eax + mov rax, 1 + ret + +;-------------------------------------------------------------------------= ----- +; Generates a 64 bit random seed through one RDSEED instruction. +; Return TRUE if Seed generated successfully, or FALSE if not. +; +; BOOLEAN EFIAPI InternalX86RdSeed64 (UINT64 *Seed); +;-------------------------------------------------------------------------= ----- +global ASM_PFX(InternalX86RdSeed64) +ASM_PFX(InternalX86RdSeed64): + ; rdseed rax ; generate a 64 bit RN into rax, + ; CF=3D1 if RN generated ok, otherwise = CF=3D0 + db 0x48, 0xf, 0xc7, 0xf8 ; rdseed r64: "REX.W + 0f c7 /7 ModRM:r= /m(w)" + jc rn64_ok ; jmp if CF=3D1 + xor rax, rax ; reg=3D0 if CF=3D0 + pause + ret ; return with failure status +rn64_ok: + mov [rcx], rax + mov rax, 1 + ret + diff --git a/MdePkg/Library/BaseLib/X86RdSeed.c b/MdePkg/Library/BaseLib/X8= 6RdSeed.c new file mode 100644 index 0000000000..9fa7948ff1 --- /dev/null +++ b/MdePkg/Library/BaseLib/X86RdSeed.c @@ -0,0 +1,73 @@ +/** @file + IA-32/x64 AsmRdSeedxx() + Generates random seed through CPU RdSeed instruction. + + Copyright (c) 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "BaseLibInternals.h" + +/** + Generates a 16-bit random seed through RDSEED instruction. + + if Seed is NULL, then ASSERT(). + + @param[out] Seed Buffer pointer to store the seed data. + + @retval TRUE RDSEED call was successful. + @retval FALSE Failed attempts to call RDSEED. + + **/ +BOOLEAN +EFIAPI +AsmRdSeed16 ( + OUT UINT16 *Seed + ) +{ + ASSERT (Seed !=3D NULL); + return InternalX86RdSeed16 (Seed); +} + +/** + Generates a 32-bit random seed through RDSEED instruction. + + if Seed is NULL, then ASSERT(). + + @param[out] Seed Buffer pointer to store the seed data. + + @retval TRUE RDSEED call was successful. + @retval FALSE Failed attempts to call RDSEED. + +**/ +BOOLEAN +EFIAPI +AsmRdSeed32 ( + OUT UINT32 *Seed + ) +{ + ASSERT (Seed !=3D NULL); + return InternalX86RdSeed32 (Seed); +} + +/** + Generates a 64-bit random seed through RDSEED instruction. + + if Seed is NULL, then ASSERT(). + + @param[out] Seed Buffer pointer to store the seed data. + + @retval TRUE RDSEED call was successful. + @retval FALSE Failed attempts to call RDSEED. + +**/ +BOOLEAN +EFIAPI +AsmRdSeed64 ( + OUT UINT64 *Seed + ) +{ + ASSERT (Seed !=3D NULL); + return InternalX86RdSeed64 (Seed); +} --=20 2.17.1.windows.2 -=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 (#50610): https://edk2.groups.io/g/devel/message/50610 Mute This Topic: https://groups.io/mt/56714069/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue Nov 26 14:23:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50611+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50611+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573697875; cv=none; d=zoho.com; s=zohoarc; b=lMR/ZcDJyd48FYVJnYkqt/l4cbfy6utF1ITtg+N1PW/jqDuwPvZQ3Ln9kYy9XATjFFPpih660spNysbO4KXY5iah+Aar7Dy2CehTxKIVVH/C1F+61h8wqC+kd9rzBxrVq9sKDlWa42wI2AM3KAGxyhDtrGQtyAZ6KyRcKE1n1MY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573697875; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=qRuiRmHlHF0R03aFsUFSLDSdWUjGtk6INVxgJyQueHs=; b=eUDyGianxtCuDXyb06H+o4PuK21lXdrr14hW1qLMm7qMwrNJzjC/3TxxaxqfOsvk5bsA6UavMoQp2dg0i6pxzYEwFNk/O4WlYSu5Uz18DlqUwesBz9sP1oAQZaqFbX9gJVEURXm6LM2fC51B2h9MYcmpYQy37tABIYXsvNMdYPE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50611+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1573697875733873.8079792153918; Wed, 13 Nov 2019 18:17:55 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id oijYYY1788612xUV0MPVju9P; Wed, 13 Nov 2019 18:17:55 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:17:54 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 18:17:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500512" X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:17:53 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Jiewen Yao , Chao Zhang , Michael D Kinney , Liming Gao , Ray Ni Subject: [edk2-devel] [PATCH 05/11] SecurityPkg/RngLibRdSeed: add an instance of RngLib to make use rdseed Date: Thu, 14 Nov 2019 10:17:37 +0800 Message-Id: <20191114021743.3876-6-jian.j.wang@intel.com> In-Reply-To: <20191114021743.3876-1-jian.j.wang@intel.com> References: <20191114021743.3876-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: 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,jian.j.wang@intel.com X-Gm-Message-State: OE2qZenBliI6gbdY2yBWme1fx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573697875; bh=i/ACrtkzbWRq7cf+4yHT1rmjkJo0ltd58Wm403TmIeY=; h=Cc:Date:From:Reply-To:Subject:To; b=e1gsoM1XQSd0IXw9cA5SFSOqd5HLs5nxBL/9A5JgWYQTNy5k9Mvo+sfOfnnT4Lmpou9 295dFl1a6D20ikiTfkT0QwVnIEKYiZM6lpA+pv+ynXf/kZfK4BhyIVQUW6600N6mbw4pJ kl0oQ6eJ/3dBhimOeSu9ILf8Po0JGNsQ9rs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This version of RngLib makes use of AsmRdSeed to get non-deterministic random number, which can be used for seeding other software DRNG like rand interface in openssl. It can be used only on IA32/X64 processors which supports rdseed instruction. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1871 Cc: Jiewen Yao Cc: Chao Zhang Cc: Michael D Kinney Cc: Liming Gao Cc: Ray Ni Signed-off-by: Jian J Wang --- .../RngLibRdSeed/RngLibRdSeed.inf | 37 ++++ .../RngLibRdSeed/RngLibRdSeed.uni | 18 ++ .../RngLibRdSeed/RngRdSeed.c | 189 ++++++++++++++++++ 3 files changed, 244 insertions(+) create mode 100644 SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngLibRd= Seed.inf create mode 100644 SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngLibRd= Seed.uni create mode 100644 SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngRdSee= d.c diff --git a/SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngLibRdSeed.in= f b/SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngLibRdSeed.inf new file mode 100644 index 0000000000..8162408775 --- /dev/null +++ b/SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngLibRdSeed.inf @@ -0,0 +1,37 @@ +## @file +# Instance of RNG (Random Number Generator) Library. +# +# Rng RdSeed Library that uses CPU RdSeed instruction access to provide +# non-deterministic random number which can be used as seed for other +# software deterministic RNGs. +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +## + +[Defines] + INF_VERSION =3D 0x00010029 + BASE_NAME =3D RngLibRdSeed + MODULE_UNI_FILE =3D RngLibRdSeed.uni + FILE_GUID =3D 8B613B2E-B944-40F9-B979-1B60D7CAA73C + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D RngLib + CONSTRUCTOR =3D RngLibRdSeedConstructor + +# +# VALID_ARCHITECTURES =3D IA32 X64 +# + +[Sources.Ia32, Sources.X64] + RngRdSeed.c + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + BaseLib + DebugLib diff --git a/SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngLibRdSeed.un= i b/SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngLibRdSeed.uni new file mode 100644 index 0000000000..051a3019bc --- /dev/null +++ b/SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngLibRdSeed.uni @@ -0,0 +1,18 @@ +// /** @file +// Instance of RNG (Random Number Generator) Library. +// +// Rng RdSeed Library that uses CPU RdSeed instruction access to provide +// non-deterministic random number which can be used as seed for other +// software deterministic RNGs. +// +// Copyright (c) 2019, Intel Corporation. All rights reserved.
+// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + + +#string STR_MODULE_ABSTRACT #language en-US "Instance of RNG L= ibrary" + +#string STR_MODULE_DESCRIPTION #language en-US "RngRdSeed Library= that uses CPU RdSeed instruction access to provide non-deterministic rando= m numbers." + diff --git a/SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngRdSeed.c b/S= ecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngRdSeed.c new file mode 100644 index 0000000000..0036faa050 --- /dev/null +++ b/SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngRdSeed.c @@ -0,0 +1,189 @@ +/** @file + Random number generator services that uses RdSeed instruction access + to provide non-deterministic random numbers, which are usually used + for seeding other pseudo-random number generators. + +Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include + +// +// Bit mask used to determine if RdSeed instruction is supported. +// +#define RDSEED_MASK BIT18 + +// +// Limited retry number when valid random data is returned. +// It varies between 1 and 100 according to "Intel(R) DRGN Software Implem= entation +// Guide". Let's use the same value as RDRAND in BaseRngLib. +// +#define RDSEED_RETRY_LIMIT 10 + +/** + The constructor function checks whether or not RDSEED instruction is sup= ported + by the host hardware. + + The constructor function checks whether or not RDSEED instruction is sup= ported. + It will ASSERT() if RDSEED instruction is not supported. + + @retval RETURN_SUCCESS The processor supports RDSEED instruction. + @retval RETURN_UNSUPPORTED RDSEED instruction is not supported. + +**/ +RETURN_STATUS +EFIAPI +RngLibRdSeedConstructor ( + VOID + ) +{ + UINT32 RegEbx; + + // + // Determine RDSEED support by examining bit 18 of the EBX register retu= rned by + // CPUID(EAX=3D7, ECX=3D0). BIT18 of EBX indicates that processor suppor= t RDSEED + // instruction. + // + AsmCpuidEx (7, 0, NULL, &RegEbx, NULL, NULL); + if ((RegEbx & RDSEED_MASK) !=3D RDSEED_MASK) { + ASSERT ((RegEbx & RDSEED_MASK) =3D=3D RDSEED_MASK); + return RETURN_UNSUPPORTED; + } + + return RETURN_SUCCESS; +} + +/** + Generates a 16-bit random number. + + if Rand is NULL, then ASSERT(). + + @param[out] Rand Buffer pointer to store the 16-bit random value. + + @retval TRUE Random number generated successfully. + @retval FALSE Failed to generate the random number. + +**/ +BOOLEAN +EFIAPI +GetRandomNumber16 ( + OUT UINT16 *Rand + ) +{ + UINT32 Index; + + ASSERT (Rand !=3D NULL); + + // + // A loop to fetch a 16 bit random value with a retry count limit. + // + for (Index =3D 0; Index < RDSEED_RETRY_LIMIT; Index++) { + if (AsmRdSeed16 (Rand)) { + return TRUE; + } + } + + return FALSE; +} + +/** + Generates a 32-bit random number. + + if Rand is NULL, then ASSERT(). + + @param[out] Rand Buffer pointer to store the 32-bit random value. + + @retval TRUE Random number generated successfully. + @retval FALSE Failed to generate the random number. + +**/ +BOOLEAN +EFIAPI +GetRandomNumber32 ( + OUT UINT32 *Rand + ) +{ + UINT32 Index; + + ASSERT (Rand !=3D NULL); + + // + // A loop to fetch a 32 bit random value with a retry count limit. + // + for (Index =3D 0; Index < RDSEED_RETRY_LIMIT; Index++) { + if (AsmRdSeed32 (Rand)) { + return TRUE; + } + } + + return FALSE; +} + +/** + Generates a 64-bit random number. + + if Rand is NULL, then ASSERT(). + + @param[out] Rand Buffer pointer to store the 64-bit random value. + + @retval TRUE Random number generated successfully. + @retval FALSE Failed to generate the random number. + +**/ +BOOLEAN +EFIAPI +GetRandomNumber64 ( + OUT UINT64 *Rand + ) +{ + UINT32 Index; + + ASSERT (Rand !=3D NULL); + + // + // A loop to fetch a 64 bit random value with a retry count limit. + // + for (Index =3D 0; Index < RDSEED_RETRY_LIMIT; Index++) { + if (AsmRdSeed64 (Rand)) { + return TRUE; + } + } + + return FALSE; +} + +/** + Generates a 128-bit random number. + + if Rand is NULL, then ASSERT(). + + @param[out] Rand Buffer pointer to store the 128-bit random value. + + @retval TRUE Random number generated successfully. + @retval FALSE Failed to generate the random number. + +**/ +BOOLEAN +EFIAPI +GetRandomNumber128 ( + OUT UINT64 *Rand + ) +{ + ASSERT (Rand !=3D NULL); + + // + // Read first 64 bits + // + if (!GetRandomNumber64 (Rand)) { + return FALSE; + } + + // + // Read second 64 bits + // + return GetRandomNumber64 (++Rand); +} --=20 2.17.1.windows.2 -=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 (#50611): https://edk2.groups.io/g/devel/message/50611 Mute This Topic: https://groups.io/mt/56714084/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue Nov 26 14:23:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50612+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50612+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573697880; cv=none; d=zoho.com; s=zohoarc; b=nCyUlQ6cx4U4AeED7XjG/ALir4z1BswtDrW4QkkWl4MT6sqmTOuQnxOrw2RquGZtehUXY9eMV1atcdv5KOoWNcxkUdi8aCSdLyebbkq9nLYZiCK6qfHZkRJI90uh6BuoFVv8hkhlTzlyPb5/BEmzVqL6zdQSmVlzouXUi4gU7n4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573697880; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=pjSogBCds4KTrcqL8qEHduFS+c1QBaZnhy8o2XtNXFI=; b=RGYrztU3zPciHlBpvXU+/qLOtUmAEmg3WOjXPxFSh477DEeKx/tTV8PBXRdunkri+T9KumDKDD7Abszc4+jvERKjjuQZHGKZ8849tSeR0ZpL7klU5Q27hRzkOFopdIHdDzX35nMpLDALgwqHVd77PdLa1xXOAki0SsvrFHLErAY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50612+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1573697880158871.6153204575626; Wed, 13 Nov 2019 18:18:00 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 5Z5UYY1788612xr5sycQZ4UF; Wed, 13 Nov 2019 18:17:57 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:17:56 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 18:17:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500541" X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:17:54 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Jiewen Yao , Chao Zhang , Laszlo Ersek , Ard Biesheuvel , Matthew Carlson , Sean Brogan , Bret Barkelew , Liming Gao , Ray Ni Subject: [edk2-devel] [PATCH 06/11] SecurityPkg/DxeRngLibRngProtocol: add RNG protocol version of RngLib Date: Thu, 14 Nov 2019 10:17:38 +0800 Message-Id: <20191114021743.3876-7-jian.j.wang@intel.com> In-Reply-To: <20191114021743.3876-1-jian.j.wang@intel.com> References: <20191114021743.3876-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: 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,jian.j.wang@intel.com X-Gm-Message-State: ZJPzw0HM2bCvxwTvhnw7yFByx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573697877; bh=eUrZ2UxMLefc+ekOwpjhrWGBRpapM1G2Pqng8SBY7FY=; h=Cc:Date:From:Reply-To:Subject:To; b=p/OgDeUY4JzXcKNYQSwQuIsDz5IjxO8i2yv56i7p2LyheraLG6d9FUZVVZLIILtjsGY rEQHUyAYR4/ocJ3tzbQgYhQg1YWozXl1k42oXotcrx4ppULBMTzMLqmU0dtYCp7dhzak+ ssUC4Z5vrgWZT/cszx1NfvYP4lApHs6+ZCk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Matthew Carlson This version of RngLib makes use of EFI_RNG_PROTOCOL to provide random number. According to UEFI spec, EFI_RNG_PROTOCOL should meet NIST SP 800-90 and/or ANSI X9.31 standards. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1871 Cc: Jiewen Yao Cc: Chao Zhang Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Matthew Carlson Cc: Sean Brogan Cc: Bret Barkelew Cc: Liming Gao Cc: Ray Ni Signed-off-by: Jian J Wang --- .../DxeRngLibRngProtocol.c | 200 ++++++++++++++++++ .../DxeRngLibRngProtocol.inf | 42 ++++ .../DxeRngLibRngProtocol.uni | 14 ++ 3 files changed, 256 insertions(+) create mode 100644 SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/= DxeRngLibRngProtocol.c create mode 100644 SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/= DxeRngLibRngProtocol.inf create mode 100644 SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/= DxeRngLibRngProtocol.uni diff --git a/SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRngL= ibRngProtocol.c b/SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/Dx= eRngLibRngProtocol.c new file mode 100644 index 0000000000..8ce4a7050d --- /dev/null +++ b/SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRngLibRngPr= otocol.c @@ -0,0 +1,200 @@ +/** @file + Provides an implementation of the library class RngLib that uses the Rng = protocol. + +Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) 2019, Intel Corporation. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#include +#include +#include +#include +#include + +/** + Generates a random number via the NIST 800-9A algorithm. Refer to + http://csrc.nist.gov/groups/STM/cavp/documents/drbg/DRBGVS.pdf + for more information. + + @param[out] Buffer Buffer to receive the random number. + @param[in] BufferSize Number of bytes in Buffer. + + @retval EFI_SUCCESS Random data generated successfully. + @retval Others Failed to generate the random number. + +**/ +STATIC +EFI_STATUS +GenerateRandomNumberViaNist800Algorithm( + OUT UINT8* Buffer, + IN UINTN BufferSize + ) +{ + EFI_STATUS Status; + EFI_RNG_PROTOCOL* RngProtocol; + + Status =3D EFI_UNSUPPORTED; + RngProtocol =3D NULL; + + if (Buffer =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "[%a] Buffer =3D=3D NULL.\n", __FUNCTION__)); + return EFI_INVALID_PARAMETER; + } + + if (gBS =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "[%a] GenerateRandomNumber, gBS =3D=3D NULL. Cal= led too soon.\n", __FUNCTION__)); + return EFI_LOAD_ERROR; + } + + Status =3D gBS->LocateProtocol (&gEfiRngProtocolGuid, NULL, (VOID **)&Rn= gProtocol); + if (EFI_ERROR (Status) || RngProtocol =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "[%a] Could not locate RNG prototocol, Status =3D= %r\n", __FUNCTION__, Status)); + return Status; + } + + Status =3D RngProtocol->GetRNG (RngProtocol, &gEfiRngAlgorithmSp80090Ctr= 256Guid, BufferSize, Buffer); + DEBUG ((DEBUG_VERBOSE, "[%a] GetRNG algorithm CTR-256 - Status =3D %r\n"= , __FUNCTION__, Status)); + if (!EFI_ERROR (Status)) { + return Status; + } + + Status =3D RngProtocol->GetRNG (RngProtocol, &gEfiRngAlgorithmSp80090Hma= c256Guid, BufferSize, Buffer); + DEBUG ((DEBUG_VERBOSE, "[%a] GetRNG algorithm HMAC-256 - Status =3D %r\n= ", __FUNCTION__, Status)); + if (!EFI_ERROR (Status)) { + return Status; + } + + Status =3D RngProtocol->GetRNG (RngProtocol, &gEfiRngAlgorithmSp80090Has= h256Guid, BufferSize, Buffer); + DEBUG ((DEBUG_VERBOSE, "[%a] GetRNG algorithm Hash-256 - Status =3D %r\n= ", __FUNCTION__, Status)); + if (!EFI_ERROR (Status)) { + return Status; + } + // + // If we get to this point, we have failed + // + DEBUG((DEBUG_ERROR, "[%a] GetRNG() failed, staus =3D %r\n", __FUNCTION__= , Status)); + + return Status; +} + + +/** + Generates a 16-bit random number. + + if Rand is NULL, return FALSE. + + @param[out] Rand Buffer pointer to store the 16-bit random value. + + @retval TRUE Random number generated successfully. + @retval FALSE Failed to generate the random number. + +**/ +BOOLEAN +EFIAPI +GetRandomNumber16 ( + OUT UINT16 *Rand + ) +{ + EFI_STATUS Status; + + if (Rand =3D=3D NULL) { + return FALSE; + } + + Status =3D GenerateRandomNumberViaNist800Algorithm ((UINT8 *)Rand, 2); + if (EFI_ERROR (Status)) { + return FALSE; + } + return TRUE; +} + +/** + Generates a 32-bit random number. + + if Rand is NULL, return FALSE. + + @param[out] Rand Buffer pointer to store the 32-bit random value. + + @retval TRUE Random number generated successfully. + @retval FALSE Failed to generate the random number. + +**/ +BOOLEAN +EFIAPI +GetRandomNumber32 ( + OUT UINT32 *Rand + ) +{ + EFI_STATUS Status; + + if (Rand =3D=3D NULL) { + return FALSE; + } + + Status =3D GenerateRandomNumberViaNist800Algorithm ((UINT8 *)Rand, 4); + if (EFI_ERROR (Status)) { + return FALSE; + } + return TRUE; +} + +/** + Generates a 64-bit random number. + + if Rand is NULL, return FALSE. + + @param[out] Rand Buffer pointer to store the 64-bit random value. + + @retval TRUE Random number generated successfully. + @retval FALSE Failed to generate the random number. + +**/ +BOOLEAN +EFIAPI +GetRandomNumber64 ( + OUT UINT64 *Rand + ) +{ + EFI_STATUS Status; + + if (Rand =3D=3D NULL) { + return FALSE; + } + + Status =3D GenerateRandomNumberViaNist800Algorithm ((UINT8 *)Rand, 8); + if (EFI_ERROR (Status)) { + return FALSE; + } + return TRUE; +} + +/** + Generates a 128-bit random number. + + if Rand is NULL, return FALSE. + + @param[out] Rand Buffer pointer to store the 128-bit random value. + + @retval TRUE Random number generated successfully. + @retval FALSE Failed to generate the random number. + +**/ +BOOLEAN +EFIAPI +GetRandomNumber128 ( + OUT UINT64 *Rand + ) +{ + EFI_STATUS Status; + + if (Rand =3D=3D NULL) { + return FALSE; + } + + Status =3D GenerateRandomNumberViaNist800Algorithm ((UINT8 *)Rand, 16); + if (EFI_ERROR (Status)) { + return FALSE; + } + return TRUE; +} diff --git a/SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRngL= ibRngProtocol.inf b/SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/= DxeRngLibRngProtocol.inf new file mode 100644 index 0000000000..d47fe3be53 --- /dev/null +++ b/SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRngLibRngPr= otocol.inf @@ -0,0 +1,42 @@ +# @file +# Provides implementation of the library class RngLib that uses the RngPro= tocol +# +# @copyright +# Copyright (c) Microsoft Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x00010029 + BASE_NAME =3D DxeRngLibRngProtocol + MODULE_UNI_FILE =3D DxeRngLibRngProtocol.uni + FILE_GUID =3D FF9F84C5-A33E-44E3-9BB5-0D654B2D4149 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D RngLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER = UEFI_APPLICATION UEFI_DRIVER + +# +# VALID_ARCHITECTURES =3D IA32 X64 EBC ARM AARCH64 +# + +[Packages] + MdePkg/MdePkg.dec + +[Sources] + DxeRngLibRngProtocol.c + +[LibraryClasses] + DebugLib + UefiBootServicesTableLib + +[Protocols] + gEfiRngProtocolGuid ## CONSUMES + +[Depex] + gEfiRngProtocolGuid + +[Guids] + gEfiRngAlgorithmSp80090Ctr256Guid ## CONSUMES + gEfiRngAlgorithmSp80090Hash256Guid ## CONSUMES + gEfiRngAlgorithmSp80090Hmac256Guid ## CONSUMES diff --git a/SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRngL= ibRngProtocol.uni b/SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/= DxeRngLibRngProtocol.uni new file mode 100644 index 0000000000..09af056bd3 --- /dev/null +++ b/SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRngLibRngPr= otocol.uni @@ -0,0 +1,14 @@ +// /** @file +// Instance of RNG (Random Number Generator) Library Based on EFI_RNG_PROT= OCOL. +// +// Copyright (c) 2019, Intel Corporation. All rights reserved.
+// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + + +#string STR_MODULE_ABSTRACT #language en-US "Instance of RNG L= ibrary Based on EFI_RNG_PROTOCOL." + +#string STR_MODULE_DESCRIPTION #language en-US "This version of R= NG library makes use of EFI_RNG_PROTOCOL to generate random number complian= t with NIST 800-9A." + --=20 2.17.1.windows.2 -=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 (#50612): https://edk2.groups.io/g/devel/message/50612 Mute This Topic: https://groups.io/mt/56714115/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue Nov 26 14:23:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50613+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50613+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573697881; cv=none; d=zoho.com; s=zohoarc; b=DgHGcc36Rq6qybdMJ7UaWG1ObotbxGswFnK+fkk5gT7ZCeETkmT90jFinK8Ocv4kVnFDAIOhrl+H9yJPPB6WO/4UEfj24EUNQh6PTTaFFn/LX8VhkVLLtxiYkBlXzHUCtmfjwSwxkOlVWEfs4nHwLdRF64baDm94sPxoGYaVkMA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573697881; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=Pe0pgs68aLLHSUaVfN6ZpwQ//pMIV3OM91zf99+OJ0E=; b=FWjGCM/BPzO3m9gb9VFyt1bOW0g6iMs71cQpke8FgQul2LVDaIuZMb62HWbchGJC1/zjMn7zyvENOQ+g61Pzj3GMLVULYmoUW6msXCJS3ZvXWj2+hllV/JfQdANyF237f0EfMNX5SkHnwNpuONMeTk3lfaRyqyseY4siAG4Ijlo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50613+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1573697881250528.4426369613738; Wed, 13 Nov 2019 18:18:01 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id og8zYY1788612xFLT0BN7BIC; Wed, 13 Nov 2019 18:17:58 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:17:58 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 18:17:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500553" X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:17:56 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Jiewen Yao , Chao Zhang , Liming Gao , Ray Ni Subject: [edk2-devel] [PATCH 07/11] SecurityPkg/SecurityPkg.dsc: add new RngLib instances for build Date: Thu, 14 Nov 2019 10:17:39 +0800 Message-Id: <20191114021743.3876-8-jian.j.wang@intel.com> In-Reply-To: <20191114021743.3876-1-jian.j.wang@intel.com> References: <20191114021743.3876-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: 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,jian.j.wang@intel.com X-Gm-Message-State: Tluv4MywXYv13BQnemkbhibLx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573697878; bh=S0RBbYkb5xAlUOjJ/U8GSHBGjui9+KdisgtJslzkwJA=; h=Cc:Date:From:Reply-To:Subject:To; b=h5+Xnu8dAnyoRo9fuzgH/UUG8RTMyML3jLjS6mada1Y/OYLMCi1tWPoT+noamtwUY2j nW+Qf9+UxQ6YQOd6IM35HdXrFoW3SZkYg1PdZC7QwEwfI/t5Jkixn/Y2C8IJ3Fl+yXW7u AZbPC+TXxxOqHqoDcj25dKh10ivVuzF/ax8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add new libraries DxeRngLibRngProtocol and RngLibRdSeed into SecurityPkg.dsc. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1871 Cc: Jiewen Yao Cc: Chao Zhang Cc: Liming Gao Cc: Ray Ni Signed-off-by: Jian J Wang --- SecurityPkg/SecurityPkg.dsc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc index a2eeadda7a..21b454f80d 100644 --- a/SecurityPkg/SecurityPkg.dsc +++ b/SecurityPkg/SecurityPkg.dsc @@ -231,6 +231,11 @@ SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.inf =20 + # + # General Random Number Generator + # + SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRngLibRngProto= col.inf + [Components.IA32, Components.X64, Components.ARM, Components.AARCH64] SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf =20 @@ -309,6 +314,7 @@ # Random Number Generator # SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf + SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngLibRdSeed.inf =20 # # Opal Password solution --=20 2.17.1.windows.2 -=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 (#50613): https://edk2.groups.io/g/devel/message/50613 Mute This Topic: https://groups.io/mt/56714131/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue Nov 26 14:23:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50614+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50614+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573697880; cv=none; d=zoho.com; s=zohoarc; b=S3PuHXMNhUwOUzsHxJg74qgNbIfceNU3jZD/bOlJrC+kqn1241RgF+3g7Qkr1AhAm7BeSLMi8HR7M0BwlsCuISn4iPj5yzmfiaKzqKp2e3PAyksqXTxGHyU1cWAcdQK7faYtsClgKnFRuN8m8VJyao2WX/DnwbRv02ZQIg3OM48= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573697880; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=lFobn15quJhAD918kYp2XWcHeoTnXpi+qAKVs/RiyfM=; b=SItmINEqye8PKu+JqFotPHGCMpUUJNb3NCeF4HCOTvpOqXUzfY/OshpTsXI5P3DEOgFtpR8NfBmq+zONLT6O4v+dLtIICGbUlmMLrfc8dk9loyG5Jw+kHJ7ztzt6IKUcXJveQzaA2fsFMG++yaqeKXeu0Q3k2bBGwKBM1SRG2mo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50614+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1573697880047662.0298626997073; Wed, 13 Nov 2019 18:18:00 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id lvp6YY1788612xL057fBOpI8; Wed, 13 Nov 2019 18:17:59 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:17:59 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 18:17:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500582" X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:17:57 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Liming Gao , Ray Ni Subject: [edk2-devel] [PATCH 08/11] OvmfPkg: specify RngLib instances in dsc files Date: Thu, 14 Nov 2019 10:17:40 +0800 Message-Id: <20191114021743.3876-9-jian.j.wang@intel.com> In-Reply-To: <20191114021743.3876-1-jian.j.wang@intel.com> References: <20191114021743.3876-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: 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,jian.j.wang@intel.com X-Gm-Message-State: EolgG9Vq9dUEYGjhnnTYbyw1x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573697879; bh=3gDZesJETc9puAhMz8+2PdkYegA+Sozs10FASH15kcY=; h=Cc:Date:From:Reply-To:Subject:To; b=R//quNU7JatnfLXmdTRGNd/ppCxJo4K0oh/XrgVdWjxhLsk1nWYWANyKh00PAZZtlVG PR3I/YauBAEBPGSLcV/Kc6B0Hm4hgyTdg1Qag3g/jY0j1sKNOXc441Z3ANNcCUzXUeC5I FErPPgPziqGcnhuuPs39DYO1g+1ZZG94O90= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Per BZ1871, OpensslLib will depend on RngLib instead of TimerLib. Update OVMF dsc files to accommodate the coming changes. It's supposed that only TlsDxe needs random number. The DxeRngLibRngProtocol is added for it. For all other drivers, BaseRngLibNull is used by default. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1871 Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Liming Gao Cc: Ray Ni Signed-off-by: Jian J Wang --- OvmfPkg/OvmfPkgIa32.dsc | 5 +++++ OvmfPkg/OvmfPkgIa32X64.dsc | 5 +++++ OvmfPkg/OvmfPkgX64.dsc | 5 +++++ OvmfPkg/OvmfXen.dsc | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index d350b75630..5a709a95b2 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -217,6 +217,7 @@ =20 [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf =20 [LibraryClasses.common.SEC] TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf @@ -786,6 +787,10 @@ NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf } + NetworkPkg/TlsDxe/TlsDxe.inf { + + RngLib|SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRng= LibRngProtocol.inf + } !endif OvmfPkg/VirtioNetDxe/VirtioNet.inf =20 diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 1ef82cafe4..16ff25fd2c 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -222,6 +222,7 @@ =20 [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf =20 [LibraryClasses.common.SEC] TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf @@ -799,6 +800,10 @@ NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf } + NetworkPkg/TlsDxe/TlsDxe.inf { + + RngLib|SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRng= LibRngProtocol.inf + } !endif OvmfPkg/VirtioNetDxe/VirtioNet.inf =20 diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 232815c08e..c9c2af740f 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -222,6 +222,7 @@ =20 [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf =20 [LibraryClasses.common.SEC] TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf @@ -797,6 +798,10 @@ NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf } + NetworkPkg/TlsDxe/TlsDxe.inf { + + RngLib|SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRng= LibRngProtocol.inf + } !endif OvmfPkg/VirtioNetDxe/VirtioNet.inf =20 diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index 8c11efe9b7..557dff7744 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -204,6 +204,7 @@ =20 [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf =20 [LibraryClasses.common.SEC] QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf @@ -666,6 +667,10 @@ NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf } + NetworkPkg/TlsDxe/TlsDxe.inf { + + RngLib|SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRng= LibRngProtocol.inf + } !endif =20 # --=20 2.17.1.windows.2 -=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 (#50614): https://edk2.groups.io/g/devel/message/50614 Mute This Topic: https://groups.io/mt/56714143/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue Nov 26 14:23:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50615+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50615+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573697885; cv=none; d=zoho.com; s=zohoarc; b=A3U6LFB4u0wZRxHRbSlw/6eKf9pa79ZW0ka23gqsC/VVlYll98ATkiVhb2LBl/bzw3rUPs3FjBppltGqdj4ujrHD9EUlTuHsEWBBvwy4PxVK+oklXMa/bY5pucSyYLV8I7LMXoXIWcECmj1T/wSSbumDys12RDkFFahhcWWQ6YY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573697885; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=TcBpwXgHNHTnq5kFVCYxN0TnaGFLd6sgoUcKXPgPmeQ=; b=loH09iWdHCU3B5+TsZf4LQHev91Z74S74wX1xuITP7CHt+VpyZn/sSFy9xo0y5TAzc4P5TTNTCjcO8zcmluowzM73o4HXg4W2IjLMBkAPWsZWDueTaFmA1M8VAiM74aS4HR2BP46BedzJ7NSUNkM9GNDvjJFB2jqwLUmqsFRGWY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50615+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1573697885586936.1210950977829; Wed, 13 Nov 2019 18:18:05 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 24HtYY1788612xMTIq85Tdii; Wed, 13 Nov 2019 18:18:01 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:18:00 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 18:18:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500585" X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:17:58 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Leif Lindholm , Laszlo Ersek , Ard Biesheuvel Subject: [edk2-devel] [PATCH 09/11] ArmVirtPkg/ArmVirt.dsc.inc: specify RngLib instances in dsc files Date: Thu, 14 Nov 2019 10:17:41 +0800 Message-Id: <20191114021743.3876-10-jian.j.wang@intel.com> In-Reply-To: <20191114021743.3876-1-jian.j.wang@intel.com> References: <20191114021743.3876-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: 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,jian.j.wang@intel.com X-Gm-Message-State: 8q8aRPUMEfWXBwScCFVSDycjx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573697881; bh=bOWMAELj+GXAP7mcKln/Z93eWcFSMQK8jiXRry4a0n4=; h=Cc:Date:From:Reply-To:Subject:To; b=wOoYmAluMJk1H/oZ3mMqQgFKF6pQR0bIrYObCvUMFv0N82zYpHgvhizU6J58VOZyyag 0d6kqhUv/PyKXz5rbprB9z0LoETdlheQPPC0e44vCViZ5ibMlcZC3CDFkwaYWxTNwOF1a OiEl06LlanT0RvLdjO9DGN2wuluji55flvc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Per BZ1871, OpensslLib will depend on RngLib instead of TimerLib. Update ArmVirt.dsc.inc file to accommodate the coming changes. It's supposed that only TlsDxe needs random number. The RngDxeLib is added for it. For all other drivers, RngLibNull is used by default. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1871 Cc: Leif Lindholm Cc: Laszlo Ersek Cc: Ard Biesheuvel Signed-off-by: Jian J Wang --- ArmVirtPkg/ArmVirt.dsc.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 10037c938e..10e0890699 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -156,8 +156,10 @@ IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + RngLib|SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRngLibR= ngProtocol.inf !else OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf !endif BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf =20 --=20 2.17.1.windows.2 -=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 (#50615): https://edk2.groups.io/g/devel/message/50615 Mute This Topic: https://groups.io/mt/56714162/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue Nov 26 14:23:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50616+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50616+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573697886; cv=none; d=zoho.com; s=zohoarc; b=IhSa/K0I/2laFzFMZyeSqwmij2hHIB58VuXMeaxTXVE9jWveqJJXBZHzBOfpg+ZVOqoarcbJI9LQoR4qqO4clbF/RAm/w+qL53mNyTJZnewNNwKvEg9sMKe7iT+CSFTjHdOmLkMX9fn2Z2qoLx2oVW6CbQfKCstMMgJyo0TA2YU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573697886; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=qCcIK5bcBCmn6pzXMmztos82Ngs3im9tigHMtwGKPC4=; b=b4fZCT3fTaG8IecJkILQJps/Fygi0JfMdIGniYoBOogueT3BvkPwx3pTpuX0EGjuTj26+sD2zwXlza9UsBZMif0wa7yJi21OERjx1hu77W7xFLJjhEbeszoKe88EC9EVZVLcY64m8UN0jRWNlwac85aYqigZ4mhURgVKtahNhjM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50616+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1573697886077769.6667638862648; Wed, 13 Nov 2019 18:18:06 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id dun5YY1788612xN8ciO7uEmH; Wed, 13 Nov 2019 18:18:02 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:18:02 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 18:18:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500616" X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:18:00 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Xiaoyu Lu , Laszlo Ersek , Ard Biesheuvel , Jiewen Yao , Chao Zhang , Liming Gao , Ray Ni Subject: [edk2-devel] [PATCH 10/11] CryptoPkg/OpensslLib: use RngLib to get high quality random entropy Date: Thu, 14 Nov 2019 10:17:42 +0800 Message-Id: <20191114021743.3876-11-jian.j.wang@intel.com> In-Reply-To: <20191114021743.3876-1-jian.j.wang@intel.com> References: <20191114021743.3876-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: 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,jian.j.wang@intel.com X-Gm-Message-State: 3bFhlqFnmV70EYpd7av6nqihx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573697882; bh=PR9KWs+KiqoOMziKk0QWIHurz6nIL7PwUTT5gpJy9/k=; h=Cc:Date:From:Reply-To:Subject:To; b=oZ1UuYEJV7IBhuSEEfb7GkfRpI78EMVLkqezmpOLOUti0E/6m7UQEhyylarKdFWH5qX 61Inchr48gJfaDtHOFz+RbLU9X+M9vr7/FfURyIXfoceR8wxZms2bKwpCGxQ5+pR9AToD ZStthnJnbpmyoYxS2BltMyhX5F39QJJhY+c= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Per BZ1871, OpensslLib should use RngLib to get high quality of random entropy. This patch remove all code depending on TimerLib for this job, and add RngLib interface to implement the rand interface required by openssl. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1871 Cc: Xiaoyu Lu Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Chao Zhang Cc: Liming Gao Cc: Ray Ni Signed-off-by: Jian J Wang Acked-by: Ard Biesheuvel --- CryptoPkg/CryptoPkg.dsc | 1 + CryptoPkg/Library/OpensslLib/OpensslLib.inf | 15 +- .../Library/OpensslLib/OpensslLibCrypto.inf | 15 +- CryptoPkg/Library/OpensslLib/rand_pool.c | 253 ++---------------- .../Library/OpensslLib/rand_pool_noise.c | 29 -- .../Library/OpensslLib/rand_pool_noise.h | 29 -- .../Library/OpensslLib/rand_pool_noise_tsc.c | 43 --- 7 files changed, 32 insertions(+), 353 deletions(-) delete mode 100644 CryptoPkg/Library/OpensslLib/rand_pool_noise.c delete mode 100644 CryptoPkg/Library/OpensslLib/rand_pool_noise.h delete mode 100644 CryptoPkg/Library/OpensslLib/rand_pool_noise_tsc.c diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc index ec43c1f0a4..54f892996a 100644 --- a/CryptoPkg/CryptoPkg.dsc +++ b/CryptoPkg/CryptoPkg.dsc @@ -44,6 +44,7 @@ =20 IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf =20 [LibraryClasses.ARM, LibraryClasses.AARCH64] # diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Librar= y/OpensslLib/OpensslLib.inf index b28dd9e480..4c535dc1e6 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -23,7 +23,6 @@ =20 [Sources] buildinf.h - rand_pool_noise.h $(OPENSSL_PATH)/e_os.h # Autogenerated files list starts here $(OPENSSL_PATH)/crypto/aes/aes_cbc.c @@ -602,18 +601,6 @@ ossl_store.c rand_pool.c =20 -[Sources.Ia32] - rand_pool_noise_tsc.c - -[Sources.X64] - rand_pool_noise_tsc.c - -[Sources.ARM] - rand_pool_noise.c - -[Sources.AARCH64] - rand_pool_noise.c - [Packages] MdePkg/MdePkg.dec CryptoPkg/CryptoPkg.dec @@ -621,7 +608,7 @@ [LibraryClasses] BaseLib DebugLib - TimerLib + RngLib PrintLib =20 [LibraryClasses.ARM] diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/= Library/OpensslLib/OpensslLibCrypto.inf index 1b6ff5ed54..51159a6f2d 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -547,22 +547,9 @@ $(OPENSSL_PATH)/crypto/objects/obj_xref.h # Autogenerated files list ends here buildinf.h - rand_pool_noise.h ossl_store.c rand_pool.c =20 -[Sources.Ia32] - rand_pool_noise_tsc.c - -[Sources.X64] - rand_pool_noise_tsc.c - -[Sources.ARM] - rand_pool_noise.c - -[Sources.AARCH64] - rand_pool_noise.c - [Packages] MdePkg/MdePkg.dec CryptoPkg/CryptoPkg.dec @@ -570,7 +557,7 @@ [LibraryClasses] BaseLib DebugLib - TimerLib + RngLib PrintLib =20 [LibraryClasses.ARM] diff --git a/CryptoPkg/Library/OpensslLib/rand_pool.c b/CryptoPkg/Library/O= pensslLib/rand_pool.c index 9d2a4ad138..f57c238fc4 100644 --- a/CryptoPkg/Library/OpensslLib/rand_pool.c +++ b/CryptoPkg/Library/OpensslLib/rand_pool.c @@ -11,213 +11,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =20 #include -#include - -#include "rand_pool_noise.h" - -/** - Get some randomness from low-order bits of GetPerformanceCounter results. - And combine them to the 64-bit value - - @param[out] Rand Buffer pointer to store the 64-bit random value. - - @retval TRUE Random number generated successfully. - @retval FALSE Failed to generate. -**/ -STATIC -BOOLEAN -EFIAPI -GetRandNoise64FromPerformanceCounter( - OUT UINT64 *Rand - ) -{ - UINT32 Index; - UINT32 *RandPtr; - - if (NULL =3D=3D Rand) { - return FALSE; - } - - RandPtr =3D (UINT32 *) Rand; - - for (Index =3D 0; Index < 2; Index ++) { - *RandPtr =3D (UINT32) (GetPerformanceCounter () & 0xFF); - MicroSecondDelay (10); - RandPtr++; - } - - return TRUE; -} - -/** - Calls RandomNumber64 to fill - a buffer of arbitrary size with random bytes. - - @param[in] Length Size of the buffer, in bytes, to fill with. - @param[out] RandBuffer Pointer to the buffer to store the random res= ult. - - @retval EFI_SUCCESS Random bytes generation succeeded. - @retval EFI_NOT_READY Failed to request random bytes. - -**/ -STATIC -BOOLEAN -EFIAPI -RandGetBytes ( - IN UINTN Length, - OUT UINT8 *RandBuffer - ) -{ - BOOLEAN Ret; - UINT64 TempRand; - - Ret =3D FALSE; - - while (Length > 0) { - // - // Get random noise from platform. - // If it failed, fallback to PerformanceCounter - // If you really care about security, you must override - // GetRandomNoise64FromPlatform. - // - Ret =3D GetRandomNoise64 (&TempRand); - if (Ret =3D=3D FALSE) { - Ret =3D GetRandNoise64FromPerformanceCounter (&TempRand); - } - if (!Ret) { - return Ret; - } - if (Length >=3D sizeof (TempRand)) { - *((UINT64*) RandBuffer) =3D TempRand; - RandBuffer +=3D sizeof (UINT64); - Length -=3D sizeof (TempRand); - } else { - CopyMem (RandBuffer, &TempRand, Length); - Length =3D 0; - } - } - - return Ret; -} - -/** - Creates a 128bit random value that is fully forward and backward predict= ion resistant, - suitable for seeding a NIST SP800-90 Compliant. - This function takes multiple random numbers from PerformanceCounter to e= nsure reseeding - and performs AES-CBC-MAC over the data to compute the seed value. - - @param[out] SeedBuffer Pointer to a 128bit buffer to store the rando= m seed. - - @retval TRUE Random seed generation succeeded. - @retval FALSE Failed to request random bytes. - -**/ -STATIC -BOOLEAN -EFIAPI -RandGetSeed128 ( - OUT UINT8 *SeedBuffer - ) -{ - BOOLEAN Ret; - UINT8 RandByte[16]; - UINT8 Key[16]; - UINT8 Ffv[16]; - UINT8 Xored[16]; - UINT32 Index; - UINT32 Index2; - AES_KEY AESKey; - - // - // Chose an arbitary key and zero the feed_forward_value (FFV) - // - for (Index =3D 0; Index < 16; Index++) { - Key[Index] =3D (UINT8) Index; - Ffv[Index] =3D 0; - } - - AES_set_encrypt_key (Key, 16 * 8, &AESKey); - - // - // Perform CBC_MAC over 32 * 128 bit values, with 10us gaps between 128 = bit value - // The 10us gaps will ensure multiple reseeds within the system time wit= h a large - // design margin. - // - for (Index =3D 0; Index < 32; Index++) { - MicroSecondDelay (10); - Ret =3D RandGetBytes (16, RandByte); - if (!Ret) { - return Ret; - } - - // - // Perform XOR operations on two 128-bit value. - // - for (Index2 =3D 0; Index2 < 16; Index2++) { - Xored[Index2] =3D RandByte[Index2] ^ Ffv[Index2]; - } - - AES_encrypt (Xored, Ffv, &AESKey); - } - - for (Index =3D 0; Index < 16; Index++) { - SeedBuffer[Index] =3D Ffv[Index]; - } - - return Ret; -} - -/** - Generate high-quality entropy source. - - @param[in] Length Size of the buffer, in bytes, to fill with. - @param[out] Entropy Pointer to the buffer to store the entropy da= ta. - - @retval EFI_SUCCESS Entropy generation succeeded. - @retval EFI_NOT_READY Failed to request random data. - -**/ -STATIC -BOOLEAN -EFIAPI -RandGenerateEntropy ( - IN UINTN Length, - OUT UINT8 *Entropy - ) -{ - BOOLEAN Ret; - UINTN BlockCount; - UINT8 Seed[16]; - UINT8 *Ptr; - - BlockCount =3D Length / 16; - Ptr =3D (UINT8 *) Entropy; - - // - // Generate high-quality seed for DRBG Entropy - // - while (BlockCount > 0) { - Ret =3D RandGetSeed128 (Seed); - if (!Ret) { - return Ret; - } - CopyMem (Ptr, Seed, 16); - - BlockCount--; - Ptr =3D Ptr + 16; - } - - // - // Populate the remained data as request. - // - Ret =3D RandGetSeed128 (Seed); - if (!Ret) { - return Ret; - } - CopyMem (Ptr, Seed, (Length % 16)); - - return Ret; -} +#include +#include +#include =20 /* * Add random bytes to the pool to acquire requested amount of entropy @@ -229,17 +25,30 @@ RandGenerateEntropy ( */ size_t rand_pool_acquire_entropy(RAND_POOL *pool) { - BOOLEAN Ret; - size_t bytes_needed; - unsigned char * buffer; + BOOLEAN ret; + size_t bytes_needed; + size_t len; + unsigned char *buffer; + UINT64 data[2]; =20 bytes_needed =3D rand_pool_bytes_needed(pool, 1 /*entropy_factor*/); if (bytes_needed > 0) { buffer =3D rand_pool_add_begin(pool, bytes_needed); =20 if (buffer !=3D NULL) { - Ret =3D RandGenerateEntropy(bytes_needed, buffer); - if (FALSE =3D=3D Ret) { + ret =3D TRUE; + while (bytes_needed > 0 && ret) { + ret =3D GetRandomNumber128 (data); + if (ret) { + len =3D MIN (bytes_needed, sizeof(data)); + CopyMem (buffer, data, len); + + bytes_needed -=3D len; + buffer +=3D len; + } + } + + if (FALSE =3D=3D ret) { rand_pool_add_end(pool, 0, 0); } else { rand_pool_add_end(pool, bytes_needed, 8 * bytes_needed); @@ -257,13 +66,11 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) */ int rand_pool_add_nonce_data(RAND_POOL *pool) { - struct { - UINT64 Rand; - UINT64 TimerValue; - } data =3D { 0 }; + UINT64 data[2]; =20 - RandGetBytes(8, (UINT8 *)&(data.Rand)); - data.TimerValue =3D GetPerformanceCounter(); + if (!GetRandomNumber128 (data)) { + return 0; + } =20 return rand_pool_add(pool, (unsigned char*)&data, sizeof(data), 0); } @@ -275,13 +82,11 @@ int rand_pool_add_nonce_data(RAND_POOL *pool) */ int rand_pool_add_additional_data(RAND_POOL *pool) { - struct { - UINT64 Rand; - UINT64 TimerValue; - } data =3D { 0 }; + UINT64 data[2]; =20 - RandGetBytes(8, (UINT8 *)&(data.Rand)); - data.TimerValue =3D GetPerformanceCounter(); + if (!GetRandomNumber128 (data)) { + return 0; + } =20 return rand_pool_add(pool, (unsigned char*)&data, sizeof(data), 0); } diff --git a/CryptoPkg/Library/OpensslLib/rand_pool_noise.c b/CryptoPkg/Lib= rary/OpensslLib/rand_pool_noise.c deleted file mode 100644 index c16ed8b454..0000000000 --- a/CryptoPkg/Library/OpensslLib/rand_pool_noise.c +++ /dev/null @@ -1,29 +0,0 @@ -/** @file - Provide rand noise source. - -Copyright (c) 2019, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include - -/** - Get 64-bit noise source - - @param[out] Rand Buffer pointer to store 64-bit noise source - - @retval FALSE Failed to generate -**/ -BOOLEAN -EFIAPI -GetRandomNoise64 ( - OUT UINT64 *Rand - ) -{ - // - // Return FALSE will fallback to use PerformaceCounter to - // generate noise. - // - return FALSE; -} diff --git a/CryptoPkg/Library/OpensslLib/rand_pool_noise.h b/CryptoPkg/Lib= rary/OpensslLib/rand_pool_noise.h deleted file mode 100644 index 75acc686a9..0000000000 --- a/CryptoPkg/Library/OpensslLib/rand_pool_noise.h +++ /dev/null @@ -1,29 +0,0 @@ -/** @file - Provide rand noise source. - -Copyright (c) 2019, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef __RAND_POOL_NOISE_H__ -#define __RAND_POOL_NOISE_H__ - -#include - -/** - Get 64-bit noise source. - - @param[out] Rand Buffer pointer to store 64-bit noise source - - @retval TRUE Get randomness successfully. - @retval FALSE Failed to generate -**/ -BOOLEAN -EFIAPI -GetRandomNoise64 ( - OUT UINT64 *Rand - ); - - -#endif // __RAND_POOL_NOISE_H__ diff --git a/CryptoPkg/Library/OpensslLib/rand_pool_noise_tsc.c b/CryptoPkg= /Library/OpensslLib/rand_pool_noise_tsc.c deleted file mode 100644 index 4158106231..0000000000 --- a/CryptoPkg/Library/OpensslLib/rand_pool_noise_tsc.c +++ /dev/null @@ -1,43 +0,0 @@ -/** @file - Provide rand noise source. - -Copyright (c) 2019, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include -#include -#include - -/** - Get 64-bit noise source - - @param[out] Rand Buffer pointer to store 64-bit noise source - - @retval TRUE Get randomness successfully. - @retval FALSE Failed to generate -**/ -BOOLEAN -EFIAPI -GetRandomNoise64 ( - OUT UINT64 *Rand - ) -{ - UINT32 Index; - UINT32 *RandPtr; - - if (NULL =3D=3D Rand) { - return FALSE; - } - - RandPtr =3D (UINT32 *)Rand; - - for (Index =3D 0; Index < 2; Index ++) { - *RandPtr =3D (UINT32) ((AsmReadTsc ()) & 0xFF); - RandPtr++; - MicroSecondDelay (10); - } - - return TRUE; -} --=20 2.17.1.windows.2 -=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 (#50616): https://edk2.groups.io/g/devel/message/50616 Mute This Topic: https://groups.io/mt/56714181/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue Nov 26 14:23:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50617+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50617+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573697887; cv=none; d=zoho.com; s=zohoarc; b=lS71nh5jPl9SPOlHWSkyaAob6BYIhsJ17P2e32bjOYykcsACXh2lHLoXhxHGN46idfsP76b2+h8+nsxfdDKL9yIvnxetmgLbuBgAnHxF3DHIR3pY4OYrVACLwRkD1imqftPnniVkZ7TOImbV3AY5U8bilHw1BHOv15g4lBLeGls= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573697887; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=mi4bfxDpHK17JJvFZrxk+w6v1Haw99hxOdfjot8Ehfo=; b=Q3W2zSN0oylZuUuQKQfFXA8lJ2d11UphXlCo4FU9wHQ+HoyRpvzZvN/yBtCa46vcXlq5ZmJUZAAOoDKn5vfc7DrlzrN44JBHJxcgqYXve3QyRPRz0RJticJIJ7dWo7vueLJ+4shkI051GB+4YmDdjmY8wHd86hyuwm6SaHe7LEs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50617+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1573697887369341.60177450196; Wed, 13 Nov 2019 18:18:07 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 6QrOYY1788612x7DqvSk5mOC; Wed, 13 Nov 2019 18:18:04 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:18:03 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 18:18:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500644" X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:18:01 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Liming Gao , Michael D Kinney , Ray Ni Subject: [edk2-devel] [PATCH 11/11] FmpDevicePkg/FmpDevicePkg.dsc: remove TimerLib instance Date: Thu, 14 Nov 2019 10:17:43 +0800 Message-Id: <20191114021743.3876-12-jian.j.wang@intel.com> In-Reply-To: <20191114021743.3876-1-jian.j.wang@intel.com> References: <20191114021743.3876-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: 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,jian.j.wang@intel.com X-Gm-Message-State: 5rjih6OLdC9xU0DvBCqyVzhAx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573697884; bh=yw+rJ7F12gk7ajOamkLKnh9BR/GFOnyF4avC9Jlb9K4=; h=Cc:Date:From:Reply-To:Subject:To; b=YqLFRTA4RXHtE5DmbHkBcCyDvJPoFabANWIXeJbU9dnVi6AZuZ04VXNPb5/yJIamOKZ 9u0bHABOO2xwtzlBLE75rfpiBKVAhUieqhGg0bYMoop8eJ055mbkwpFxtBHF1Wpg4jsw2 nWQ5UPINIr1FnoO7Ns9caoiguGhUW5Ibp8A= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" TimerLib instance was added for openssl1.1.1b upgrade due to rand interface implementation based on TimerLib. Since RngLib is now used instead, TimerLib is not needed any more. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1871 Cc: Liming Gao Cc: Michael D Kinney Cc: Liming Gao Cc: Ray Ni Signed-off-by: Jian J Wang --- FmpDevicePkg/FmpDevicePkg.dsc | 1 - 1 file changed, 1 deletion(-) diff --git a/FmpDevicePkg/FmpDevicePkg.dsc b/FmpDevicePkg/FmpDevicePkg.dsc index 201ea00f63..2fd7cf4d88 100644 --- a/FmpDevicePkg/FmpDevicePkg.dsc +++ b/FmpDevicePkg/FmpDevicePkg.dsc @@ -60,7 +60,6 @@ CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/C= apsuleUpdatePolicyLibNull.inf FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloa= dHeaderLibV1.inf FmpDeviceLib|FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.inf - TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplat= e.inf =20 [LibraryClasses.ARM, LibraryClasses.AARCH64] # --=20 2.17.1.windows.2 -=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 (#50617): https://edk2.groups.io/g/devel/message/50617 Mute This Topic: https://groups.io/mt/56714189/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-