From: Conor Dooley <conor@kernel.org>
To: Andrea Righi <andrea.righi@canonical.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Emil Renner Berthing <emil.renner.berthing@canonical.com>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: increase boot command line size to 1K
Date: Sat, 26 Nov 2022 18:46:05 +0000 [thread overview]
Message-ID: <Y4Je7chN+fQM3NpP@spud> (raw)
In-Reply-To: <20221125133713.314796-1-andrea.righi@canonical.com>
Hey Andrea,
On Fri, Nov 25, 2022 at 02:37:13PM +0100, Andrea Righi wrote:
> Kernel parameters string is limited to 512 characters on riscv (using
> the default from include/uapi/asm-generic/setup.h).
>
> In some testing environments (e.g., qemu with long kernel parameters
> string) we may exceed this limit, triggering errors like the following:
>
> [ 3.331893] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
> [ 3.332625] CPU: 2 PID: 1 Comm: sh Not tainted 6.1.0-rc6-kc #1
> [ 3.333233] Hardware name: riscv-virtio,qemu (DT)
> [ 3.333550] Call Trace:
> [ 3.333736] [<ffffffff800062b6>] dump_backtrace+0x1c/0x24
> [ 3.334053] [<ffffffff806e8f54>] show_stack+0x2c/0x38
> [ 3.334260] [<ffffffff806f2d06>] dump_stack_lvl+0x5a/0x7c
> [ 3.334483] [<ffffffff806f2d3c>] dump_stack+0x14/0x1c
> [ 3.334687] [<ffffffff806e92fa>] panic+0x116/0x2d0
> [ 3.334878] [<ffffffff8001b0aa>] do_exit+0x80a/0x810
> [ 3.335079] [<ffffffff8001b1d0>] do_group_exit+0x24/0x70
> [ 3.335287] [<ffffffff8001b234>] __wake_up_parent+0x0/0x20
> [ 3.335502] [<ffffffff80003cee>] ret_from_syscall+0x0/0x2
> [ 3.335857] SMP: stopping secondary CPUs
> [ 3.337561] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 ]---
>
> It seems reasonable enough to increase the default command line size to
> 1024, like arm, to prevent issues like the one reported above.
error: arch/riscv/include/uapi/asm/setup.h: missing "WITH Linux-syscall-note" for SPDX-License-Identifier
Unfortunately this does not build :/
Thanks,
Conor.
> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
> ---
> arch/riscv/include/asm/setup.h | 7 +++++++
> arch/riscv/include/uapi/asm/setup.h | 7 +++++++
> 2 files changed, 14 insertions(+)
> create mode 100644 arch/riscv/include/asm/setup.h
> create mode 100644 arch/riscv/include/uapi/asm/setup.h
>
> diff --git a/arch/riscv/include/asm/setup.h b/arch/riscv/include/asm/setup.h
> new file mode 100644
> index 000000000000..f4fe549aab40
> --- /dev/null
> +++ b/arch/riscv/include/asm/setup.h
> @@ -0,0 +1,7 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __ASMRISCV_SETUP_H
> +#define __ASMRISCV_SETUP_H
> +
> +#include <uapi/asm/setup.h>
> +
> +#endif /* __ASMRISCV_SETUP_H */
> diff --git a/arch/riscv/include/uapi/asm/setup.h b/arch/riscv/include/uapi/asm/setup.h
> new file mode 100644
> index 000000000000..5738f93ae437
> --- /dev/null
> +++ b/arch/riscv/include/uapi/asm/setup.h
> @@ -0,0 +1,7 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _UAPI__ASMRISCV_SETUP_H
> +#define _UAPI__ASMRISCV_SETUP_H
> +
> +#define COMMAND_LINE_SIZE 1024
> +
> +#endif /* _UAPI__ASMRISCV_SETUP_H */
> --
> 2.37.2
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-11-26 18:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 13:37 [PATCH] riscv: increase boot command line size to 1K Andrea Righi
2022-11-25 13:41 ` Alexandre Ghiti
2022-11-25 13:44 ` Andrea Righi
2022-11-25 13:47 ` Alexandre Ghiti
2022-11-26 18:46 ` Conor Dooley [this message]
2022-11-26 19:18 ` Andrea Righi
2022-11-26 19:25 ` Conor Dooley
2022-11-26 19:31 ` Andrea Righi
2022-12-11 6:17 ` Palmer Dabbelt
2022-12-02 1:06 ` kernel test robot
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=Y4Je7chN+fQM3NpP@spud \
--to=conor@kernel.org \
--cc=andrea.righi@canonical.com \
--cc=emil.renner.berthing@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/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