Re: [PATCH 1/1] 2.6.14-rc3 x86: COMMAND_LINE_SIZE

From: Alon Bar-Lev
Date: Tue Oct 11 2005 - 03:59:47 EST

On 10/10/05, Georg Lippold <georg.lippold@xxxxxx> wrote:
> Thus, someone could use bootloaders to "patch" the kernel: If the
> bootloader writes a string of arbitary length to some memory region,
> then there is a fair chance that if you make the string just long
> enough, the kernel image gets (partly) overwritten. It resembles a bit
> "Smashing the stack for fun and profit", but this time, it's "Rewriting
> the kernel to your own needs via the bootloader on x86" :)
> Same thing for user defined COMMAND_LINE_SIZE. I think that a common
> interface for boot loaders is required. Especially in uncontrolled multi
> user environments like Universities, everything else could lead to
> undesired results.

But the address of cmd_line_ptr is defined to be from the end of the
setup to 0xa0000. This is well defined, since the boot loader will
load the kernel, initramfs and cmd_line_ptr to the correct place...
Nothing is overwritten... Then the kernel is up and takes as much as
it needs from cmd_line_ptr.

Best Regards,
Alon Bar-Lev
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at