-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 header file so it there is greater enforcement of the symbol visibility. Fixes: 548193c ("test_firmware: add support for firmware_request_platform") Cc: stable@vger.kernel.org Acked-by: Scott Branden <scott.branden@broadcom.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20200724213640.389191-2-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Loading branch information
Kees Cook
authored and
Greg Kroah-Hartman
committed
Jul 25, 2020
1 parent
90b109d
commit 2d38dbf
Showing
4 changed files
with
40 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
#ifndef _EFI_EMBEDDED_FW_INTERNAL_H_ | ||
#define _EFI_EMBEDDED_FW_INTERNAL_H_ | ||
|
||
/* | ||
* This struct and efi_embedded_fw_list are private to the efi-embedded fw | ||
* implementation they only in separate header for use by lib/test_firmware.c. | ||
*/ | ||
struct efi_embedded_fw { | ||
struct list_head list; | ||
const char *name; | ||
const u8 *data; | ||
size_t length; | ||
}; | ||
|
||
extern struct list_head efi_embedded_fw_list; | ||
extern bool efi_embedded_fw_checked; | ||
|
||
#endif /* _EFI_EMBEDDED_FW_INTERNAL_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters