aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/image-vars.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-02-10 17:02:46 +0100
committerArd Biesheuvel <ardb@kernel.org>2020-02-23 21:57:15 +0100
commit91d150c0cc637b9d9d6394936add7cd2b7ccc410 (patch)
treecc604ef224f2a8c476d19984b6d0ef42454c25f0 /arch/arm64/kernel/image-vars.h
parentefi/libstub: Take soft and hard memory limits into account for initrd loading (diff)
downloadlinux-dev-91d150c0cc637b9d9d6394936add7cd2b7ccc410.tar.xz
linux-dev-91d150c0cc637b9d9d6394936add7cd2b7ccc410.zip
efi/libstub: Clean up command line parsing routine
We currently parse the command non-destructively, to avoid having to allocate memory for a copy before passing it to the standard parsing routines that are used by the core kernel, and which modify the input to delineate the parsed tokens with NUL characters. Instead, we call strstr() and strncmp() to go over the input multiple times, and match prefixes rather than tokens, which implies that we would match, e.g., 'nokaslrfoo' in the stub and disable KASLR, while the kernel would disregard the option and run with KASLR enabled. In order to avoid having to reason about whether and how this behavior may be abused, let's clean up the parsing routines, and rebuild them on top of the existing helpers. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/image-vars.h')
-rw-r--r--arch/arm64/kernel/image-vars.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h
index 87cb3d45b4bd..9a7aef0d6f70 100644
--- a/arch/arm64/kernel/image-vars.h
+++ b/arch/arm64/kernel/image-vars.h
@@ -47,6 +47,7 @@ __efistub_stext = stext;
__efistub__end = _end;
__efistub__edata = _edata;
__efistub_screen_info = screen_info;
+__efistub__ctype = _ctype;
#endif