|
@@ -18,8 +18,6 @@
|
|
|
|
|
|
#include "efistub.h"
|
|
|
|
|
|
-bool __nokaslr;
|
|
|
-
|
|
|
efi_status_t efi_open_volume(efi_system_table_t *sys_table_arg,
|
|
|
void *__image, void **__fh)
|
|
|
{
|
|
@@ -153,18 +151,6 @@ unsigned long efi_entry(void *handle, efi_system_table_t *sys_table,
|
|
|
goto fail;
|
|
|
}
|
|
|
|
|
|
- /* check whether 'nokaslr' was passed on the command line */
|
|
|
- if (IS_ENABLED(CONFIG_RANDOMIZE_BASE)) {
|
|
|
- static const u8 default_cmdline[] = CONFIG_CMDLINE;
|
|
|
- const u8 *str, *cmdline = cmdline_ptr;
|
|
|
-
|
|
|
- if (IS_ENABLED(CONFIG_CMDLINE_FORCE))
|
|
|
- cmdline = default_cmdline;
|
|
|
- str = strstr(cmdline, "nokaslr");
|
|
|
- if (str == cmdline || (str > cmdline && *(str - 1) == ' '))
|
|
|
- __nokaslr = true;
|
|
|
- }
|
|
|
-
|
|
|
si = setup_graphics(sys_table);
|
|
|
|
|
|
status = handle_kernel_image(sys_table, image_addr, &image_size,
|
|
@@ -176,9 +162,13 @@ unsigned long efi_entry(void *handle, efi_system_table_t *sys_table,
|
|
|
goto fail_free_cmdline;
|
|
|
}
|
|
|
|
|
|
- status = efi_parse_options(cmdline_ptr);
|
|
|
- if (status != EFI_SUCCESS)
|
|
|
- pr_efi_err(sys_table, "Failed to parse EFI cmdline options\n");
|
|
|
+ if (IS_ENABLED(CONFIG_CMDLINE_EXTEND) ||
|
|
|
+ IS_ENABLED(CONFIG_CMDLINE_FORCE) ||
|
|
|
+ cmdline_size == 0)
|
|
|
+ efi_parse_options(CONFIG_CMDLINE);
|
|
|
+
|
|
|
+ if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && cmdline_size > 0)
|
|
|
+ efi_parse_options(cmdline_ptr);
|
|
|
|
|
|
secure_boot = efi_get_secureboot(sys_table);
|
|
|
|