On Mon, May 13, 2024 at 10:23 AM Gerd Hoffmann via groups.io
<kraxel=redhat....@groups.io> wrote:
>
> On Sat, May 11, 2024 at 10:40:23AM GMT, Ard Biesheuvel wrote:
> > As I pointed out before, on the ARM side there are a few intersecting
> > issues with these changes. (On x86, this is mostly avoided due to the
> > fact that RDRAND is universally supported)

(citation needed. since 2012 on Intel's side, 2015 on AMD, but with
lots of broken implementations along the way)

>
> Well, it's not that easy on x86 either.
>
> Current state of affairs is that the time based LibRng is used, all
> OvmfPkg / ArmVirtPkg have this:
>
>   RngLib|MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
>
> So, this is what will be used if something uses LibRng.

Note that OVMF can't switch to BaseRngLib (and use rdrand/whatever ARM
is supplying for RNG), because you'll crash a bunch of systems:
https://github.com/tianocore/edk2/blob/4b6ee06a090d956f80b4a92fb9bf03098a372f39/MdePkg/Library/BaseRngLib/Rand/RdRand.c#L125-L131

I had submitted a patch that dealt with this a while back (and tried
to detect broken impls such as AMD zen returning all-1s), but it got
ghosted :)

-- 
Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118893): https://edk2.groups.io/g/devel/message/118893
Mute This Topic: https://groups.io/mt/106013302/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to