Skip to content

Commit 1fd9717

Browse files
nivedita76ardbiesheuvel
authored andcommitted
efi/libstub: Stop parsing arguments at "--"
Arguments after "--" are arguments for init, not for the kernel. Cc: <stable@vger.kernel.org> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Link: https://lore.kernel.org/r/20200725155916.1376773-1-nivedita@alum.mit.edu Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 parent 98086df commit 1fd9717

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/firmware/efi/libstub/efi-stub-helper.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ efi_status_t efi_parse_options(char const *cmdline)
201201
char *param, *val;
202202

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

205207
if (!strcmp(param, "nokaslr")) {
206208
efi_nokaslr = true;

0 commit comments

Comments
 (0)