[PULL REQUEST] powerpc generic command line

Christophe Leroy christophe.leroy at c-s.fr
Tue Mar 5 04:29:12 AEDT 2019



Le 04/03/2019 à 17:57, Daniel Walker a écrit :
> On Mon, Mar 04, 2019 at 02:55:08PM +0100, Christophe Leroy wrote:
>>
>>
>> Le 01/03/2019 à 20:44, Daniel Walker a écrit :
>>> Here are the generic command line changes for powerpc.
>>>
>>> These changes have been in linux-next for two cycles, with few problems reported.
>>> It's also been used at Cisco Systems, Inc. in production products for many many
>>> years with no problems.
>>>
>>> Please pull these changes.
>>>
>>>
>>> The following changes since commit ccda4af0f4b92f7b4c308d3acc262f4a7e3affad:
>>>
>>>     Linux 4.20-rc2 (2018-11-11 17:12:31 -0600)
>>>
>>> are available in the git repository at:
>>>
>>>     https://github.com/daniel-walker/cisco-linux.git for-powerpc
>>>
>>> for you to fetch changes up to 5d4514a9c291ecf19b0626695161673d35e5d549:
>>>
>>>     powerpc: convert config files to generic cmdline (2018-11-16 07:32:26 -0800)
>>>
>>> ----------------------------------------------------------------
>>> Daniel Walker (3):
>>>         add generic builtin command line
>>>         powerpc: convert to generic builtin command line
>>>         powerpc: convert config files to generic cmdline
>>
>> Hello,
>>
>> This series is in total contradiction with the work being done to add KASAN
>> support to powerpc.
>>
>> It also modifies the behaviour for powerpc.
>>
>> Please do not apply this series as is, see my comments on the individual
>> patchs for details.
>>
> 
> Not trying to offend you, but you comments seems overly alarmist. KASAN is a
> debug feature, generally we don't write code around debug features (especially
> ones which aren't merged yet). It would not be hard to correct our use of string
> functions when your KASAN enablement is merged, I'm sure you could do it, but I would be happy
> to do it also. The other comments you had I don't think rise to the level of
> stopping a pull request. Our code is stabilized, so I'm not going to
> re-design it at a late date like this.
> 
> I think the pull request is still valid.
> 

Ok, lets the KASAN stuff aside. And I agree I misread the patch when I 
felt that it was changing the behaviour in prom_init.c

I don't want to criticise your work either, but your series seems 
overkill. Anyway, could you explain your approach and what is the 
benefit of your series compared to what is already existing ?

Can you also explain how your changes fit with the what is done is the 
function early_init_dt_scan_chosen_ppc() in drivers/of/fdt.c as your 
series doesn't modify it ? (extract below)



	/*
	 * CONFIG_CMDLINE is meant to be a default in case nothing else
	 * managed to set the command line, unless CONFIG_CMDLINE_FORCE
	 * is set in which case we override whatever was found earlier.
	 */
#ifdef CONFIG_CMDLINE
#if defined(CONFIG_CMDLINE_EXTEND)
	strlcat(data, " ", COMMAND_LINE_SIZE);
	strlcat(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
#elif defined(CONFIG_CMDLINE_FORCE)
	strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
#else
	/* No arguments from boot loader, use kernel's  cmdl*/
	if (!((char *)data)[0])
		strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
#endif
#endif /* CONFIG_CMDLINE */




What I like in your series is that you make the CMDLINE config common to 
all arches. But my feeling is that the 40 or so lines of code in your 
cmdline.h is way complex compared to what it aims to do, ie replacing a 
few lines on code in two places. But I might not have the complete 
picture so feel free to tell all the details behind it. I see you 
already submitted part of your series to the ppc list in Novembre 
(https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=75078) 
unfortunatly the first patch of the series was not there, and it seems 
at that time your series has not generated any further discussion.

Thanks
Christophe


More information about the Linuxppc-dev mailing list