Re: [PATCH 1/3] kernel: Add a new config option to remove command line parsing

From: Paul Bolle
Date: Tue May 19 2015 - 05:36:11 EST


On Mon, 2015-05-18 at 14:50 +0300, Iulia Manda wrote:
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig

> +config CMDLINE_PARSE
> + bool "Enable support for command line parsing"
> + default y
> + ---help---
> + With this option set to 'Y', kernel parameters, both the ones
> + passed at boot time and at compile time are parsed.
> +
> + If you say no here, all the kernel parameters' values will be set
> + to their defaults at compile time, in order to make constant
> + folding possible.
> +
> + Systems with no space constraints should leave this option set to
> + 'Y'.

This adds a x86 specific Kconfig option.

> --- a/include/linux/moduleparam.h
> +++ b/include/linux/moduleparam.h

> +#ifdef CONFIG_CMDLINE_PARSE
> /* Called on module insert or kernel boot */
> extern char *parse_args(const char *name,
> char *args,
> @@ -359,6 +360,19 @@ extern char *parse_args(const char *name,
> s16 level_max,
> int (*unknown)(char *param, char *val,
> const char *doing));
> +#else
> +static inline char *parse_args(const char *name,
> + char *args,
> + const struct kernel_param *params,
> + unsigned num,
> + s16 level_min,
> + s16 level_max,
> + int (*unknown)(char *param, char *val,
> + const char *doing))
> +{
> + return NULL;
> +}
> +#endif

So this effectively disables parse_args() for all architectures, doesn't
it? If that's OK, I'd say the patch is x86 specific. Than it should
have, say, "x86:" as a prefix and it should be sent to the people and
lists taking care of x86.

But a quick grep suggests it's not OK to disable this for all other
architectures. Did I miss something with that quick grep?

Thanks,


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/