lkml.org 
[lkml]   [2020]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] efi/libstub: Stop parsing arguments at "--"
Date
Arguments after "--" are arguments for init, not for the kernel.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
---
drivers/firmware/efi/libstub/efi-stub-helper.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c
index 6bca70bbb43d..37ff34e7b85e 100644
--- a/drivers/firmware/efi/libstub/efi-stub-helper.c
+++ b/drivers/firmware/efi/libstub/efi-stub-helper.c
@@ -201,6 +201,8 @@ efi_status_t efi_parse_options(char const *cmdline)
char *param, *val;

str = next_arg(str, &param, &val);
+ if (!val && !strcmp(param, "--"))
+ break;

if (!strcmp(param, "nokaslr")) {
efi_nokaslr = true;
--
2.26.2
\
 
 \ /
  Last update: 2020-07-25 17:59    [W:0.045 / U:3.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site