diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2020-02-14 14:29:21 +0100 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2020-02-23 21:59:42 +0100 |
commit | f7b85b33eb0b3025830a102b01e6e1c3426cdf13 (patch) | |
tree | 11421638fef0184982fa81b41daed0a1385433e0 /drivers/firmware/efi/libstub/efi-stub-helper.c | |
parent | efi/x86: Drop redundant .bss section (diff) | |
download | linux-f7b85b33eb0b3025830a102b01e6e1c3426cdf13.tar.xz linux-f7b85b33eb0b3025830a102b01e6e1c3426cdf13.zip |
efi/libstub/x86: Make loaded_image protocol handling mixed mode safe
Add the definitions and use the special wrapper so that the loaded_image
UEFI protocol can be safely used from mixed mode.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/efi-stub-helper.c')
-rw-r--r-- | drivers/firmware/efi/libstub/efi-stub-helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c index b1da58141a4d..9f34c7242939 100644 --- a/drivers/firmware/efi/libstub/efi-stub-helper.c +++ b/drivers/firmware/efi/libstub/efi-stub-helper.c @@ -171,8 +171,8 @@ char *efi_convert_cmdline(efi_loaded_image_t *image, const u16 *s2; u8 *s1 = NULL; unsigned long cmdline_addr = 0; - int load_options_chars = image->load_options_size / 2; /* UTF-16 */ - const u16 *options = image->load_options; + int load_options_chars = efi_table_attr(image, load_options_size) / 2; + const u16 *options = efi_table_attr(image, load_options); int options_bytes = 0; /* UTF-8 bytes */ int options_chars = 0; /* UTF-16 chars */ efi_status_t status; |