x86/setup: Warn when option parsing is done too early
authorBorislav Petkov (AMD) <bp@alien8.de>
Mon, 8 Apr 2024 17:46:03 +0000 (19:46 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 27 May 2024 16:54:45 +0000 (18:54 +0200)
commit0c40b1c7a897bd9733e72aca2396fd3a62f1db17
tree3c137c6cf3085b5eb99b5a54df47d1ce9af8d49f
parent52cccc64cf7c90696d09d54a383793804ba872ba
x86/setup: Warn when option parsing is done too early

Commit

  4faa0e5d6d79 ("x86/boot: Move kernel cmdline setup earlier in the boot process (again)")

fixed and issue where cmdline parsing would happen before the final
boot_command_line string has been built from the builtin and boot
cmdlines and thus cmdline arguments would get lost.

Add a check to catch any future wrong use ordering so that such issues
can be caught in time.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20240409152541.GCZhVd9XIPXyTNd9vc@fat_crate.local
arch/x86/include/asm/setup.h
arch/x86/kernel/setup.c
arch/x86/lib/cmdline.c