All of lore.kernel.org
 help / color / mirror / Atom feed
From: Youling Tang <youling.tang@linux.dev>
To: Simon Horman <horms@kernel.org>
Cc: Simon Horman <horms@verge.net.au>,
	kexec@lists.infradead.org, Huacai Chen <chenhuacai@kernel.org>,
	youling.tang@linux.dev, Youling Tang <tangyouling@kylinos.cn>
Subject: [PATCH 1/2] Remove the "mem=" parameter when using the --reuse-cmdline option in kdump operation
Date: Thu, 25 Sep 2025 14:32:40 +0800	[thread overview]
Message-ID: <20250925063241.337897-1-youling.tang@linux.dev> (raw)

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



             reply	other threads:[~2025-09-25  6:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-25  6:32 Youling Tang [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250925063241.337897-1-youling.tang@linux.dev \
    --to=youling.tang@linux.dev \
    --cc=chenhuacai@kernel.org \
    --cc=horms@kernel.org \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=tangyouling@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.