linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Daniel Walker <danielwa@cisco.com>
Cc: will@kernel.org, robh@kernel.org,
	daniel@gimpelevich.san-francisco.ca.us,
	linux-arch@vger.kernel.org, devicetree@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	microblaze <monstr@monstr.eu>,
	linux-mips@vger.kernel.org, nios2 <ley.foon.tan@intel.com>,
	openrisc@lists.librecores.org, linux-hexagon@vger.kernel.org,
	linux-riscv@lists.infradead.org, x86@kernel.org,
	linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org,
	sparclinux@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v3 01/17] cmdline: Add generic function to build command line.
Date: Fri, 2 Apr 2021 17:33:06 +0200	[thread overview]
Message-ID: <9c74d82f-f58f-1ccb-bf22-8eb02a4cd55d@csgroup.eu> (raw)
In-Reply-To: <20210330172714.GR109100@zorba>



Le 30/03/2021 à 19:27, Daniel Walker a écrit :
> On Fri, Mar 26, 2021 at 01:44:48PM +0000, Christophe Leroy wrote:
>> This code provides architectures with a way to build command line
>> based on what is built in the kernel and what is handed over by the
>> bootloader, based on selected compile-time options.
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>> ---
>> v3:
>> - Addressed comments from Will
>> - Added capability to have src == dst
>> ---
>>   include/linux/cmdline.h | 57 +++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 57 insertions(+)
>>   create mode 100644 include/linux/cmdline.h
>>
>> diff --git a/include/linux/cmdline.h b/include/linux/cmdline.h
>> new file mode 100644
>> index 000000000000..dea87edd41be
>> --- /dev/null
>> +++ b/include/linux/cmdline.h
>> @@ -0,0 +1,57 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +#ifndef _LINUX_CMDLINE_H
>> +#define _LINUX_CMDLINE_H
>> +
>> +#include <linux/string.h>
>> +
>> +/* Allow architectures to override strlcat, powerpc can't use strings so early */
>> +#ifndef cmdline_strlcat
>> +#define cmdline_strlcat strlcat
>> +#endif
>> +
>> +/*
>> + * This function will append or prepend a builtin command line to the command
>> + * line provided by the bootloader. Kconfig options can be used to alter
>> + * the behavior of this builtin command line.
>> + * @dst: The destination of the final appended/prepended string.
>> + * @src: The starting string or NULL if there isn't one.
>> + * @len: the length of dest buffer.
>> + */
> 
> Append or prepend ? Cisco requires both at the same time. This is why my
> implementation provides both. I can't use this with both at once.
> 

I think it can be added as a second step if dimmed necessary. The feeling I have from all the 
discussion is that it's not what people from the community are looking for at the moment.

Anyway, once all architectures are moved to generic handling, I believe it is then easier to split 
CONFIG_CMDLINE in two configuration items in order to provide both appending and prepending at the 
same time.

I see some concerns about risk of double changes, but I have focussed in changing as little as 
possible the existing configuration items, in order to minimise that.

  parent reply	other threads:[~2021-04-02 15:33 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 13:44 [PATCH v3 00/17] Implement GENERIC_CMDLINE Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 01/17] cmdline: Add generic function to build command line Christophe Leroy
2021-03-26 15:42   ` Rob Herring
2021-03-26 15:55     ` Christophe Leroy
2021-04-02 15:23     ` Christophe Leroy
2021-03-30 17:27   ` Daniel Walker
2021-03-30 18:07     ` H. Nikolaus Schaller
2021-03-30 18:23       ` Daniel Walker
2021-04-02 15:33     ` Christophe Leroy [this message]
2021-03-26 13:44 ` [PATCH v3 02/17] drivers: of: use cmdline building function Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 03/17] cmdline: Gives architectures opportunity to use generically defined boot cmdline manipulation Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 04/17] powerpc: Convert to GENERIC_CMDLINE Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 05/17] arm: " Christophe Leroy
2021-03-26 15:47   ` Rob Herring
2021-03-26 15:49     ` Christophe Leroy
2021-03-26 18:22       ` Rob Herring
2021-04-02 15:19     ` Christophe Leroy
2021-04-02 15:24     ` Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 06/17] arm64: " Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 07/17] hexagon: " Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 08/17] microblaze: " Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 09/17] nios2: " Christophe Leroy
2021-03-29  1:35   ` Tan, Ley Foon
2021-04-02 15:33     ` Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 10/17] openrisc: " Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 11/17] riscv: " Christophe Leroy
2021-03-26 14:08   ` Andreas Schwab
2021-03-26 14:20     ` Christophe Leroy
2021-03-26 15:26       ` Rob Herring
2021-03-30  0:52         ` Nick Kossifidis
2021-04-02 15:21         ` Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 12/17] sh: " Christophe Leroy
2021-04-02 15:36   ` Christophe Leroy
2021-03-26 13:45 ` [PATCH v3 13/17] sparc: " Christophe Leroy
2021-03-26 13:45 ` [PATCH v3 14/17] xtensa: " Christophe Leroy
2021-03-26 13:45 ` [PATCH v3 15/17] x86: " Christophe Leroy
2021-03-26 13:45 ` [PATCH v3 16/17] mips: " Christophe Leroy
2021-03-26 13:45 ` [PATCH v3 17/17] cmdline: Remove CONFIG_CMDLINE_EXTEND Christophe Leroy
2021-03-26 15:04 ` [PATCH v3 00/17] Implement GENERIC_CMDLINE Rob Herring
2021-04-02 15:20   ` Christophe Leroy

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=9c74d82f-f58f-1ccb-bf22-8eb02a4cd55d@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=akpm@linux-foundation.org \
    --cc=daniel@gimpelevich.san-francisco.ca.us \
    --cc=danielwa@cisco.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ley.foon.tan@intel.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=monstr@monstr.eu \
    --cc=openrisc@lists.librecores.org \
    --cc=robh@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).