[PATCH RFC v2 04/54] s390/boot: stop parsing the command line at "--"
From: Mike Rapoport (Microsoft)
Date: Thu Nov 26 2026 - 06:15:16 EST
The kernel parses its parameters up to "--" and passes everything after it
to init. The decompressor parses the whole command line, so an argument
meant for init still takes effect in the decompressor if it has the name of
a parameter the decompressor knows, like "mem=".
Stop at "--", like parse_args() does.
Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
---
arch/s390/boot/ipl_parm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/s390/boot/ipl_parm.c b/arch/s390/boot/ipl_parm.c
index 8bbd102fa50f..ed28ea2fc1d1 100644
--- a/arch/s390/boot/ipl_parm.c
+++ b/arch/s390/boot/ipl_parm.c
@@ -268,6 +268,10 @@ void parse_boot_command_line(void)
while (*args) {
args = next_arg(args, ¶m, &val);
+ /* The arguments after "--" are for init */
+ if (!val && !strcmp(param, "--"))
+ break;
+
if (!strcmp(param, "mem") && val)
memory_limit = round_down(memparse(val, NULL), PAGE_SIZE);
--
2.53.0