Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp10632729rwb; Fri, 25 Nov 2022 06:26:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf5v2WCFWMjdLodU9zuRKRsav0DQx7Qp4ExvmlfivOnKleMoYCPTXpnojxMh4sp8e4JhOx+3 X-Received: by 2002:a17:902:7d98:b0:17e:6852:1191 with SMTP id a24-20020a1709027d9800b0017e68521191mr29179602plm.159.1669386412494; Fri, 25 Nov 2022 06:26:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669386412; cv=none; d=google.com; s=arc-20160816; b=KCabdgJlcFe6q4MSyqORcX+2f6hE6ccYabobBoxHgIsqCx3NchkimuABCpAuJ3/Dc+ qxMUy9T9LFFt6u28J9ow+Jtri6ehl26vlPBV5M2gI9wWlWqJRmRfEE3iWu9ultdpJxXV jsmZW7w5HlTvGox50mX/YraAelPwqqlurn2e/EqXYOaE4fC/EA7z/Rg5nB9a9x89oK7a 1YW+Ej4V5vV0M0t6Tehw/dfdT149Duf5etbW48mauO/cG8a8SF4LuwV0wZkS8sz/LpT6 n0pHMfboPGMxIegH98hQDYSFmKi0zw2PMnmHzDua/C6uJiWrKI6CKZt/8AnJafgfBmEA Nyyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=5tddxw4oDysEthZyCvWWrxstBV2NIMQUaorbZb3iJjA=; b=siCbfvLuRzdBq0kuZnXpsMupykq2E3BfNnmOmVT0388z3YOzHCJnt1+J5hLBOb8Dz6 kuxd3ULogYgzn9/Fm9KQQRJvjSQLC6b31Z7wWXCSvmRfv9CXIpo1WZm4RFY5LJX5AvHY hjgrCkbBAhXdpDocONlto2KsmMvWGikSS/J39A91SCwHKJ4j1jgUF8jTYdnkn4a4P8rP 350P18qUuDuZAUYIjzdQh3fWLmOt/AI2aDlIINvstbW10bMOzNAL5Y63NTHS2l40axun R8rIDoTPZ8rJKT+CjeMtrL2tMoc7yE2Li+JT8bR2150NA5dD5BEIFILBgax+JNFHcNSn Hiug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p8-20020a17090a4f0800b00215f01f79a4si5135646pjh.62.2022.11.25.06.26.39; Fri, 25 Nov 2022 06:26:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229878AbiKYNrz (ORCPT + 86 others); Fri, 25 Nov 2022 08:47:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbiKYNrx (ORCPT ); Fri, 25 Nov 2022 08:47:53 -0500 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ED681150 for ; Fri, 25 Nov 2022 05:47:50 -0800 (PST) Received: (Authenticated sender: alex@ghiti.fr) by mail.gandi.net (Postfix) with ESMTPSA id 56C071BF20F; Fri, 25 Nov 2022 13:47:47 +0000 (UTC) Message-ID: Date: Fri, 25 Nov 2022 14:47:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] riscv: increase boot command line size to 1K Content-Language: en-US To: Andrea Righi Cc: Paul Walmsley , Palmer Dabbelt , Emil Renner Berthing , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20221125133713.314796-1-andrea.righi@canonical.com> <6fee29f8-8150-e6ec-e2ec-210610a7e27d@ghiti.fr> From: Alexandre Ghiti In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/25/22 14:44, Andrea Righi wrote: > On Fri, Nov 25, 2022 at 02:41:11PM +0100, Alexandre Ghiti wrote: >> Hi Andrea, >> >> On 11/25/22 14:37, 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] [] dump_backtrace+0x1c/0x24 >>> [ 3.334053] [] show_stack+0x2c/0x38 >>> [ 3.334260] [] dump_stack_lvl+0x5a/0x7c >>> [ 3.334483] [] dump_stack+0x14/0x1c >>> [ 3.334687] [] panic+0x116/0x2d0 >>> [ 3.334878] [] do_exit+0x80a/0x810 >>> [ 3.335079] [] do_group_exit+0x24/0x70 >>> [ 3.335287] [] __wake_up_parent+0x0/0x20 >>> [ 3.335502] [] 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. >>> >>> Signed-off-by: Andrea Righi >>> --- >>> 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 >>> + >>> +#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 */ >> >> Just for reference to previous discussions regarding this: https://lore.kernel.org/lkml/CACT4Y+YYAfTafFk7DE0B=qQFgkPXS7492AhBdY_CP1WdB8CGfA@mail.gmail.com/T/ >> >> Thanks, >> >> Alex > Ah! It has been address/discussed already, great! Thanks for pointing > that out and sorry for the unnecessary patch. :) Not unnecessary at all, that will hopefully trigger a new discussion because no progress was made so far :) > -Andrea > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv