tmp_suning_uos_patched/init
Steven Rostedt (VMware) f61872bb58 bootconfig: Use parse_args() to find bootconfig and '--'
The current implementation does a naive search of "bootconfig" on the kernel
command line. But this could find "bootconfig" that is part of another
option in quotes (although highly unlikely). But it also needs to find '--'
on the kernel command line to know if it should append a '--' or not when a
bootconfig in the initrd file has an "init" section. The check uses the
naive strstr() to find to see if it exists. But this can return a false
positive if it exists in an option and then the "init" section in the initrd
will not be appended properly.

Using parse_args() to find both of these will solve both of these problems.

Link: https://lore.kernel.org/r/202002070954.C18E7F58B@keescook

Fixes: 7495e0926f ("bootconfig: Only load bootconfig if "bootconfig" is on the kernel cmdline")
Fixes: 1319916209 ("bootconfig: init: Allow admin to use bootconfig for init command line")
Reported-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2020-02-10 12:07:42 -05:00
..
calibrate.c
do_mounts_initrd.c init: unify opening /dev/console as stdin/stdout/stderr 2019-12-12 18:58:24 +01:00
do_mounts_md.c
do_mounts_rd.c
do_mounts.c Fix root mounting with no mount options 2019-12-16 08:42:39 -08:00
do_mounts.h
init_task.c
initramfs.c arm64: use generic free_initrd_mem() 2019-10-16 13:55:25 +01:00
Kconfig bootconfig: Remove unneeded CONFIG_LIBXBC 2020-02-10 12:07:42 -05:00
main.c bootconfig: Use parse_args() to find bootconfig and '--' 2020-02-10 12:07:42 -05:00
Makefile
noinitramfs.c
version.c