All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Remove the "mem=" parameter when using the --reuse-cmdline option in kdump operation
@ 2025-09-25  6:32 Youling Tang
  2025-09-25  6:32 ` [PATCH 2/2] LoongArch: Refactor command line processing Youling Tang
  2025-09-25  9:11 ` [PATCH 1/2] Remove the "mem=" parameter when using the --reuse-cmdline option in kdump operation Dave Young
  0 siblings, 2 replies; 8+ messages in thread
From: Youling Tang @ 2025-09-25  6:32 UTC (permalink / raw)
  To: Simon Horman; +Cc: Simon Horman, kexec, Huacai Chen, youling.tang, Youling Tang

From: Youling Tang <tangyouling@kylinos.cn>

During kdump operations, the capture kernel cannot reuse the "mem="
parameter from the production kernel. The "mem=" parameter is used
to specify the available memory range for the kernel. Reusing the
"mem=" memory range may destroy the production environment.

Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
---
 kexec/kexec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kexec/kexec.c b/kexec/kexec.c
index c9e4bcb..fadf986 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -1256,8 +1256,10 @@ char *get_command_line(void)
 		*p = '\0';
 
 	remove_parameter(line, "BOOT_IMAGE");
-	if (kexec_flags & KEXEC_ON_CRASH)
+	if (kexec_flags & KEXEC_ON_CRASH) {
 		remove_parameter(line, "crashkernel");
+		remove_parameter(line, "mem=");
+	}
 
 	return line;
 }
-- 
2.48.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-12  3:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-25  6:32 [PATCH 1/2] Remove the "mem=" parameter when using the --reuse-cmdline option in kdump operation Youling Tang
2025-09-25  6:32 ` [PATCH 2/2] LoongArch: Refactor command line processing Youling Tang
2025-09-25  9:22   ` Dave Young
     [not found]     ` <5ec31e96-7157-4300-af36-daec2cee5831@linux.dev>
2025-09-25 10:23       ` Dave Young
2025-11-12  3:05         ` Youling Tang
2025-09-25  9:11 ` [PATCH 1/2] Remove the "mem=" parameter when using the --reuse-cmdline option in kdump operation Dave Young
2025-09-25  9:25   ` Youling Tang
2025-09-25  9:34     ` Dave Young

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.