[PATCH 5.5 regression fix 0/2] efi/libstub: Fix mixed-mode crash at boot

From: Hans de Goede
Date: Thu Dec 12 2019 - 05:32:08 EST


Hi All,

Commit 0d95981438c3 ("x86: efi/random: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table")
causes drivers/efi/libstub/random.c to be used on x86 for the first time
and some of the code in that file does not deal properly with mixed-mode
setups causing a crash at boot on mixed-mode devices.

The first patch in this series fixes this and is the regression-fix from
$subject.

While looking into this I did a quick search for other cases of the same
problem in the libstub code and I found the same issue in the handling of
LILO-style file= kernel commandline arguments, which I guess are not
used that often because AFAICT we have no bug report for these not working
in mixed-mode. The second patch fixes this, this is a pre-existing problem
and not a 5.5 regression, still we should probably also include this fix
in 5.5.

Regards,

Hans