lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080811191012.GA16553@elte.hu>
Date:	Mon, 11 Aug 2008 21:10:12 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Tim Bird <tim.bird@...sony.com>
Cc:	linux kernel <linux-kernel@...r.kernel.org>,
	linux-embedded <linux-embedded@...r.kernel.org>,
	Matt Mackall <mpm@...enic.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] bootup: Add built-in kernel command line for x86


* Tim Bird <tim.bird@...sony.com> wrote:

> Add support for a built-in command line for x86 architectures. The 
> Kconfig help gives the major rationale for this addition.

i have actually used a local hack quite similar to this to inject boot 
options into bzImages via randconfig - so i would find this feature 
rather useful.

a small observation:

> +	/* append boot loader cmdline to builtin, unless builtin overrides it */
> +	if (builtin_cmdline[0] != '!') {
> +		strlcat(builtin_cmdline, " ", COMMAND_LINE_SIZE);
> +		strlcat(builtin_cmdline, boot_command_line, COMMAND_LINE_SIZE);
> +		strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
> +	} else {
> +		strlcpy(boot_command_line, &builtin_cmdline[1],
> +			COMMAND_LINE_SIZE);
> +	}

the default branch changes existing command lines slightly: it appends a 
space to them. This could break scripts that rely on the precise 
contents of /proc/cmdline output. (i have some - they are arguably 
dodgy)

Best would be to make it really apparent in the code that nothing 
changes if this config option is not set. Preferably there should be no 
extra code at all in that case.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ