[PATCH] i386:kexec-bzImage: Use "\0" as command line instead of empty command line

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

 



On Sat, Apr 06, 2013 at 01:52:09PM +0800, Zhang Yanfei wrote:
> ? 2013?04?03? 17:43, Wang YanQing ??:
> > I get garbage output of /proc/cmdline and in dmesg when I
> > use kexec to load new kernel bzImage without append command
> > line like below:
> > 
> > kexec -l bzImage --initrd=initramfs.
> 
> Hello Wang
> 
> I tried this:
> 
> ./build/sbin/kexec -l /boot/vmlinuz-2.6.32-279.el6.i686 --initrd=/boot/initramfs-2.6.32-279.el6.i686.img 
> 
> But nothing happened and it seemed the command loaded the kernel successfully.
> Can you describe your situation more concretely, please?
Yes, it will load the kernel successfully, but when you use kexec -e to run into
the loaded kernel, in the new kernel context, you will get garbage output when 
execute `cat /proc/cmdline`, and you also can see the garbage in "Kernel command
line" from dmesg. 

I am sure you will see this issue, because when user pass no cmdline, and cmdline_len
will because zero, so the line below in setup_linux_bootloader_parameters_high will
not work:
cmdline_ptr[cmdline_len - 1] = '\0';

Thanks



[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