test_firmware: Test platform fw loading on non-EFI systems
authorKees Cook <keescook@chromium.org>
Wed, 9 Sep 2020 22:53:54 +0000 (15:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Sep 2020 16:19:16 +0000 (18:19 +0200)
commitbaaabecfc80fad255f866563b53b8c7a3eec176e
treede257c905258642e627f2e58aafcbffa5e5f1690
parent1c30474826682bc970c3200700d8bcfa2b771278
test_firmware: Test platform fw loading on non-EFI systems

On non-EFI systems, it wasn't possible to test the platform firmware
loader because it will have never set "checked_fw" during __init.
Instead, allow the test code to override this check. Additionally split
the declarations into a private symbol namespace so there is greater
enforcement of the symbol visibility.

Fixes: 548193cba2a7 ("test_firmware: add support for firmware_request_platform")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20200909225354.3118328-1-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/efi/embedded-firmware.c
include/linux/efi_embedded_fw.h
lib/test_firmware.c