From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.830.1573697867801385708 for ; Wed, 13 Nov 2019 18:17:48 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: jian.j.wang@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False 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:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="235500451" Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.59]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 18:17:44 -0800 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Bret Barkelew , Chao Zhang , Jiaxin Wu , Jiewen Yao , Jordan Justen , Laszlo Ersek , Leif Lindholm , Liming Gao , Maciej Rabeda , Matthew Carlson , Michael D Kinney , Ray Ni , Sean Brogan , Siyuan Fu , Xiaoyu Lu Subject: [PATCH 00/11] Use proper entropy sources Date: Thu, 14 Nov 2019 10:17:32 +0800 Message-Id: <20191114021743.3876-1-jian.j.wang@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1871 Patch series summary: - Add BaseRngLibNull to package dsc - Add DxeRngLibRngProtocol to make use EFI_RNG_PROTOCOL - Add RdSeed interface and RngLibRdSeed for IA32/X64 arch - Remove following files rand_pool_noise.h rand_pool_noise_tsc.c rand_pool_noise.c - Update rand_pool.c to use RngLib interface directly and the drop the TimerLib depenency from OpensslLib - Update OVMF platform dsc to use DxeRngLibRngProtocol when necessary Cc: Ard Biesheuvel Cc: Bret Barkelew Cc: Chao Zhang Cc: Jiaxin Wu Cc: Jiewen Yao Cc: Jordan Justen Cc: Laszlo Ersek Cc: Leif Lindholm Cc: Liming Gao Cc: Maciej Rabeda Cc: Matthew Carlson Cc: Michael D Kinney Cc: Ray Ni Cc: Sean Brogan Cc: Siyuan Fu Cc: Xiaoyu Lu Jian J Wang (11): NetworkPkg/NetworkPkg.dsc: specify RngLib instance for build SignedCapsulePkg/SignedCapsulePkg.dsc: specify RngLib instances FmpDevicePkg/FmpDevicePkg.dsc: specify RngLib instances in dsc files MdePkg/BaseLib: add interface to wrap rdseed IA instruction SecurityPkg/RngLibRdSeed: add an instance of RngLib to make use rdseed SecurityPkg/DxeRngLibRngProtocol: add RNG protocol version of RngLib SecurityPkg/SecurityPkg.dsc: add new RngLib instances for build OvmfPkg: specify RngLib instances in dsc files ArmVirtPkg/ArmVirt.dsc.inc: specify RngLib instances in dsc files CryptoPkg/OpensslLib: use RngLib to get high quality random entropy FmpDevicePkg/FmpDevicePkg.dsc: remove TimerLib instance ArmVirtPkg/ArmVirt.dsc.inc | 2 + 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 --- FmpDevicePkg/FmpDevicePkg.dsc | 2 +- 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 +++++ NetworkPkg/NetworkPkg.dsc | 1 + OvmfPkg/OvmfPkgIa32.dsc | 5 + OvmfPkg/OvmfPkgIa32X64.dsc | 5 + OvmfPkg/OvmfPkgX64.dsc | 5 + OvmfPkg/OvmfXen.dsc | 5 + .../DxeRngLibRngProtocol.c | 200 ++++++++++++++ .../DxeRngLibRngProtocol.inf | 42 +++ .../DxeRngLibRngProtocol.uni | 14 + .../RngLibRdSeed/RngLibRdSeed.inf | 37 +++ .../RngLibRdSeed/RngLibRdSeed.uni | 18 ++ .../RngLibRdSeed/RngRdSeed.c | 189 +++++++++++++ SecurityPkg/SecurityPkg.dsc | 6 + SignedCapsulePkg/SignedCapsulePkg.dsc | 6 + 28 files changed, 909 insertions(+), 354 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 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 create mode 100644 SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRngLibRngProtocol.c create mode 100644 SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRngLibRngProtocol.inf create mode 100644 SecurityPkg/RandomNumberGenerator/DxeRngLibRngProtocol/DxeRngLibRngProtocol.uni create mode 100644 SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngLibRdSeed.inf create mode 100644 SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngLibRdSeed.uni create mode 100644 SecurityPkg/RandomNumberGenerator/RngLibRdSeed/RngRdSeed.c -- 2.17.1.windows.2