Hello, * Vivek Goyal <[EMAIL PROTECTED]> [2007-03-06 05:15]: > On Tue, Mar 06, 2007 at 09:42:04AM +0530, Vivek Goyal wrote: > > On Mon, Mar 05, 2007 at 11:34:33PM +0100, Bernhard Walle wrote: > > > This patch increases the kernel command line size for x86_64 and i386 > > > to 2048 characters. This is necessary because with kernel 2.6.21 > > > and newer, the kernel command line size has increased and kexec needs > > > lot of command line space, so this solves some "command line overflow" > > > problems. > > > > > > To be able to warn users running older kernels that the command line > > > is too long (and don't wait that the kernel truncates it), the > > > patch tries to get the kernel command line length from the kernel > > > image that is loaded if possible by checking the length of the > > > static array that holds the kernel command line when booting. > > > > It does not work for compressed images (bzImage). So kexing older bzImages > > will never give you a warning message. > > > > Secondly, I think creating dependencies on kernel symbols is bad. Tomorrow > > if kernel code changes, we are broken. The problem "crash" faces so often. > > So we should create a well defined interface which can remain constant > > even if kernel code changes. > > > > I personally think either there should be a way to specify command line > > length supported in the image format (bzImage) or we should export it to > > user space, lets say through /proc/ interface. > > > > Specifying max cmdline lenght in bzImage header helps because any bootloader > > then take a clue and warn user about excessive command line length. > > > > Otherwise we can export something like /proc/max_cmdline_len on the lines > > of /proc/cmdline. > > Thinking more about it. I think exporting it through /proc/ will work better. > Extending bzImage format will help only bzImage but problem for ELF vmlniux > will still persist, until we decide to append an ELF note to vmlinux.
A /proc interface is a bit useless IMO. It tells you about the command line size of the running kernel, but not about the command line size of the kernel you try to load. My patch about changing the header in x86_64/i386 was not applied (http://marc.theaimsgroup.com/?l=linux-kernel&m=117138549731788&w=2) although I got positive repsonse from the maintanier (H. Peter Anvin), but he was travelling at that time ... I'm also not very lucky about the solution to get the size from the ELF symbol table. Maybe a ELF not plus getting the bzImage header applied would be the best compromise. Or do we really want to trust that the kernel that runs has the same command line size as the kernel that is kexec'd to? Regards, Bernhard -- SUSE LINUX Products GmbH Tel. +49 (911) 74053-0 Maxfeldstr. 5 GF: Markus Rex 90409 Nürnberg, Germany HRB 16746 (AG Nürnberg) OpenPGP DDAF6454: F61F 34CC 09CA FB82 C9F6 BA4B 8865 3696 DDAF 6454
pgp2Fgd1i4ldM.pgp
Description: PGP signature
_______________________________________________ fastboot mailing list [email protected] https://lists.osdl.org/mailman/listinfo/fastboot
