[PATCH RESEND]kexec:i386/kexec-[bzImage|elf-x86]:x86_64/kexec-bzImage64: Use "\0" as command line instead of empty command line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 16, 2013 at 10:09:18PM +0800, Zhang Yanfei wrote:
> ? 2013?04?08? 17:29, Zhang Yanfei ??:
> > ? 2013?04?08? 17:23, Wang YanQing ??:
> >> This patch prevents the problems to happen below:
> >> In setup_linux_bootloader_parameters_high
> >> 120         cmdline_ptr = ((char *)real_mode) + cmdline_offset;
> >> 121         memcpy(cmdline_ptr, cmdline, cmdline_len);
> >> 122         cmdline_ptr[cmdline_len - 1] = '\0';
> >>
> >> if cmdline_len == 0, Line 122 will corrupt kernel16 buf just before the commandline.
> >> And in do_bzImage_load, for example,
> >> 369         cmdline_end = setup_base + kern16_size_needed + command_line_len - 1;
> >> 370         elf_rel_set_symbol(&info->rhdr, "cmdline_end", &cmdline_end,
> >> 371                            sizeof(unsigned long));
> >> Line 369 will go wrong, too.
> >>
> >> Signed-off-by: Wang YanQing <udknight at gmail.com>
> >> ---
> >>  Hi Zhang Yanfei, could you give your signed-off-by to
> >>  this patch?
> > 
> > Yeah.
> > 
> > Signed-off-by: Zhang Yanfei <zhangyanfei at cn.fujitsu.com>
> > 
> > Hi Simon, could you please take a look at this to see if the change is reasonable?
> > After all, if no commadline, we make the commandline_len to 1. I don't know if
> > this behaviour could be accepted by you.
> > 
> 
> Hi Simon
> 
> What is your opinion about this patch?

It seems reasonable to me, I have applied it.

I have added your Signed-off-by. However, for reference: unless you are the
maintainer or were involved in writing the patch I think an Acked-by or
Tested-by would be more appropriate.



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux