summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArvind Sankar <nivedita@alum.mit.edu>2020-07-25 18:59:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-26 12:49:19 +0300
commit3bff856ba44d73cf6b17a8232d7ce444a7f21907 (patch)
tree79960616231109d877113be9eaa072f76ec7e1d0
parente6584124b9823151ef586d10dedf565ade50cea6 (diff)
downloadlinux-3bff856ba44d73cf6b17a8232d7ce444a7f21907.tar.xz
efi/libstub: Stop parsing arguments at "--"
commit 1fd9717d75df68e3c3509b8e7b1138ca63472f88 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/firmware/efi/libstub/efi-stub-helper.c2
1 files changed, 2 insertions, 0 deletions
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;