diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2020-05-19 10:43:01 +0200 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2020-05-22 17:05:08 +0200 |
commit | 27cd5511feffea3956d081585316272795e45bce (patch) | |
tree | 20af23299bc6873cfb18ab941d3ae13e1ad3f0cf /drivers/firmware/efi/libstub/efi-stub-helper.c | |
parent | efi/libstub: Don't parse overlong command lines (diff) | |
download | linux-27cd5511feffea3956d081585316272795e45bce.tar.xz linux-27cd5511feffea3956d081585316272795e45bce.zip |
efi/libstub: Use pool allocation for the command line
Now that we removed the memory limit for the allocation of the
command line, there is no longer a need to use the page based
allocator so switch to a pool allocation instead.
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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c index dbfaf8dcdda2..89f075275300 100644 --- a/drivers/firmware/efi/libstub/efi-stub-helper.c +++ b/drivers/firmware/efi/libstub/efi-stub-helper.c @@ -212,8 +212,7 @@ efi_status_t efi_parse_options(char const *cmdline) * Size of memory allocated return in *cmd_line_len. * Returns NULL on error. */ -char *efi_convert_cmdline(efi_loaded_image_t *image, - int *cmd_line_len, unsigned long max_addr) +char *efi_convert_cmdline(efi_loaded_image_t *image, int *cmd_line_len) { const u16 *s2; unsigned long cmdline_addr = 0; @@ -275,7 +274,8 @@ char *efi_convert_cmdline(efi_loaded_image_t *image, options_bytes++; /* NUL termination */ - status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr); + status = efi_bs_call(allocate_pool, EFI_LOADER_DATA, options_bytes, + (void **)&cmdline_addr); if (status != EFI_SUCCESS) return NULL; |