[PATCH v2]kexec:i386:kexec-bzImage: Fix pass garbage command line to new kernel
udknight at gmail.com
Mon Apr 8 21:08:47 EDT 2013
On Mon, Apr 08, 2013 at 05:51:52PM +0800, Zhang Yanfei wrote:
> This is obviously wrong.
Yes, it is obviously wrong
> Purgatory may append a kexec_jump_back_entry= argument into the commandline. It is
> an argument belongs to the commandline. So why there is a buf filled with 0
> (alloc_command_line_len) before it in the commandline buf.
Kernel will copy all the COMMAND_LINE_SIZE len buffer pointer by
cmd_line_ptr, but kexec-bzImage just prepare a very shorter buffer
in the below line check failed code path:
if (info->kexec_flags & (KEXEC_ON_CRASH | KEXEC_PRESERVE_CONTEXT))
in the check sucess code path, it seems good by below line:
modified_cmdline = xmalloc(COMMAND_LINE_SIZE);
More information about the kexec