mirror of
https://github.com/ipxe/ipxe
synced 2025-12-29 19:38:37 +03:00
[lkrnprefix] Copy command line before installing iPXE
The command line may be situated in an area of base memory that will be overwritten by iPXE's real-mode segments, causing the command line to be corrupted before it can be used. Fix by creating a copy of the command line on the prefix stack (below 0x7c00) before installing the real-mode segments. Reported-by: Dave Hansen <dave@sr71.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -132,7 +132,8 @@ static int cmdline_init ( void ) {
|
||||
}
|
||||
cmdline = cmdline_copy;
|
||||
copy_from_user ( cmdline, cmdline_user, 0, len );
|
||||
DBGC ( colour, "RUNTIME found command line \"%s\"\n", cmdline );
|
||||
DBGC ( colour, "RUNTIME found command line \"%s\" at %08x\n",
|
||||
cmdline, cmdline_phys );
|
||||
|
||||
/* Strip unwanted cruft from the command line */
|
||||
cmdline_strip ( cmdline, "BOOT_IMAGE=" );
|
||||
|
||||
Reference in New Issue
Block a user