diff options
author | Pedro Falcato <pedro.falcato@gmail.com> | 2022-11-22 22:31:03 +0000 |
---|---|---|
committer | Ard Biesheuvel <workofard@gmail.com> | 2024-06-13 08:52:48 -0700 |
commit | c3a8ca7b54a9fd17acdf16c6282a92cc989fa92a (patch) | |
tree | 4c71238596193c58922b3fe995cd7fbec71ef018 /SecurityPkg | |
parent | d3b32dca06b987d7214637f3952c2ce1ce69f308 (diff) | |
download | edk2-c3a8ca7b54a9fd17acdf16c6282a92cc989fa92a.zip edk2-c3a8ca7b54a9fd17acdf16c6282a92cc989fa92a.tar.gz edk2-c3a8ca7b54a9fd17acdf16c6282a92cc989fa92a.tar.bz2 |
MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID
RDRAND has notoriously been broken many times over its lifespan.
Add a smoketest to RDRAND, in order to better sniff out potential
security concerns.
Also add a proper CPUID test in order to support older CPUs which may
not have it; it was previously being tested but then promptly ignored.
Testing algorithm inspired by linux's arch/x86/kernel/cpu/rdrand.c
:x86_init_rdrand() per commit 049f9ae9..
Many thanks to Jason Donenfeld for relicensing his linux RDRAND detection
code to MIT and the public domain.
>On Tue, Nov 22, 2022 at 2:21 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
<..>
> I (re)wrote that function in Linux. I hereby relicense it as MIT, and
> also place it into public domain. Do with it what you will now.
>
> Jason
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4163
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'SecurityPkg')
0 files changed, 0 insertions, 0 deletions