From: Chenghao Duan <duanchenghao@kylinos.cn>
To: horms@verge.net.au
Cc: kexec@lists.infradead.org, tangyouling@kylinos.cn, chenhuacai@kernel.org
Subject: Re: [PATCH] LoongArch: Change COMMAND_LINE_SIZE to 4096
Date: Mon, 22 Sep 2025 10:58:21 +0800 [thread overview]
Message-ID: <20250922025821.GA317763@chenghao-pc> (raw)
In-Reply-To: <20250922021057.206063-1-duanchenghao@kylinos.cn>
On Mon, Sep 22, 2025 at 10:10:57AM +0800, Chenghao Duan wrote:
> The default COMMAND_LINE_SIZE inherited from asm-generic is 512, which
> is too small for modern use cases. For example, when the parameter path
> in the cmdline of the kdump first kernel is too long, the limit is
> easily exceeded when loading the second kernel.
>
> Increase the command line size to 4096 bytes, In LoongArch, this is
> consistent with the upstream configuration of the Linux kernel.
> linux kernel commit: f7794a4d92ade518c813de69a01b27ca6d8d86f3.
I'm very sorry, but the commit ID in the previous email was incorrect.
linux kernel commit: f7794a4d92ad(LoongArch: Increase COMMAND_LINE_SIZE up to 4096).
>
> This patch is necessary because the Linux kernel has been changed to
> 4096. When the kernel cmdline size exceeds 512, the --reuse-cmdline
> option of the kexec command will inevitably result in an error.
>
> The COMMAND_LINE_SIZE in kexec/arch/loongarch/crashdump-loongarch.h
> is unused, so it is removed here.
>
> Suggested-by: Youling Tang <tangyouling@kylinos.cn>
> Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
> ---
> kexec/arch/loongarch/crashdump-loongarch.h | 2 --
> kexec/arch/loongarch/kexec-loongarch.h | 2 +-
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/kexec/arch/loongarch/crashdump-loongarch.h b/kexec/arch/loongarch/crashdump-loongarch.h
> index 25ff24b..dac9e71 100644
> --- a/kexec/arch/loongarch/crashdump-loongarch.h
> +++ b/kexec/arch/loongarch/crashdump-loongarch.h
> @@ -20,7 +20,5 @@ int get_crash_kernel_load_range(uint64_t *start, uint64_t *end);
> /* crash dump kernel support at most two regions, low_region and high region. */
> #define CRASH_MAX_RESERVED_RANGES 2
>
> -#define COMMAND_LINE_SIZE 512
> -
> extern struct arch_options_t arch_options;
> #endif /* CRASHDUMP_LOONGARCH_H */
> diff --git a/kexec/arch/loongarch/kexec-loongarch.h b/kexec/arch/loongarch/kexec-loongarch.h
> index 2c7624f..0bd462f 100644
> --- a/kexec/arch/loongarch/kexec-loongarch.h
> +++ b/kexec/arch/loongarch/kexec-loongarch.h
> @@ -13,7 +13,7 @@
>
> #define CORE_TYPE_ELF64 1
>
> -#define COMMAND_LINE_SIZE 512
> +#define COMMAND_LINE_SIZE 4096
>
> #define KiB(x) ((x) * 1024UL)
> #define MiB(x) (KiB(x) * 1024UL)
> --
> 2.25.1
next prev parent reply other threads:[~2025-09-22 2:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 2:10 [PATCH] LoongArch: Change COMMAND_LINE_SIZE to 4096 Chenghao Duan
2025-09-22 2:50 ` Chenghao Duan
2025-09-22 2:58 ` Chenghao Duan [this message]
2025-09-23 14:15 ` Simon Horman
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=20250922025821.GA317763@chenghao-pc \
--to=duanchenghao@kylinos.cn \
--cc=chenhuacai@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox