summaryrefslogtreecommitdiff
path: root/include/linux/stacktrace.h
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2026-07-02 21:15:45 +0900
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-07-02 21:15:45 +0900
commitbfdf7ec54f1a5e4759a5550ceed3edf738f36c5f (patch)
treef13a44be0414eecfddb1b6e624c5df5a65841fe4 /include/linux/stacktrace.h
parentde0428ed555b0d323c07bf750acf261a0ac772c9 (diff)
x86/setup: prepend embedded bootconfig cmdline before parse_early_param
Call xbc_prepend_embedded_cmdline() in setup_arch() right after the CONFIG_CMDLINE merge and before strscpy(command_line, ...) so the build-time-rendered embedded bootconfig "kernel" subtree is part of boot_command_line by the time parse_early_param() runs. early_param() handlers (mem=, earlycon=, loglevel=, ...) now see values supplied via CONFIG_BOOT_CONFIG_EMBED_FILE without parsing bootconfig at runtime. Gate the prepend on the same opt-in the runtime parser uses: prepend when "bootconfig" is present on the command line, or when CONFIG_BOOT_CONFIG_FORCE is set. Detect it with parse_args(), exactly as setup_boot_config() does, so both agree on what counts as opt-in: any "bootconfig" key regardless of value (bare, =0, =1, ...), and only before the "--" that separates init arguments. Sharing the parser keeps the early and late paths from diverging -- e.g. "bootconfig=0" or a "-- bootconfig" meant for init must not apply the embedded keys early while the runtime parser skips them. The prepend necessarily runs before setup_boot_config() detects an initrd bootconfig, so an initrd cannot override the embedded "kernel" keys for early_param(). This is intentional: the embedded cmdline acts like a build-time CONFIG_CMDLINE. An initrd bootconfig's "kernel" keys never reached early_param() anyway (they apply late via extra_command_line), so nothing is lost -- the initrd keys still apply late, with last-wins keeping the embedded values in effect. Link: https://lore.kernel.org/all/20260626-bootconfig_using_tools-v7-7-24ab72139c29@debian.org/ Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'include/linux/stacktrace.h')
0 files changed, 0 insertions, 0 deletions