]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit88cd930e12d9fbe57ab6c6254fcde0880823c4d2
treede257c905258642e627f2e58aafcbffa5e5f1690
parent4cd78c7131bc27f10d5114dec46ad97379b5110a
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: ffebf734a3c4 ("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