All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang YanQing <udknight@gmail.com>
To: Zhang Yanfei <zhangyanfei.yes@gmail.com>
Cc: jbarnes@sgi.com, tjd21@cl.cam.ac.uk, khalid.aziz@hp.com,
	kexec@lists.infradead.org, horms@verge.net.au,
	ebiederm@xmission.com, hari@in.ibm.com
Subject: Re: [PATCH] i386:kexec-bzImage: Use "\0" as command line instead of empty command line
Date: Sun, 7 Apr 2013 09:01:03 +0800	[thread overview]
Message-ID: <20130407010103.GA2176@udknight> (raw)
In-Reply-To: <515FB809.3020103@gmail.com>

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

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2013-04-07  1:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03  9:43 [PATCH] i386:kexec-bzImage: Use "\0" as command line instead of empty command line Wang YanQing
2013-04-06  5:52 ` Zhang Yanfei
2013-04-07  1:01   ` Wang YanQing [this message]
2013-04-07  5:54     ` Zhang Yanfei
2013-04-07  9:35       ` Wang YanQing
2013-04-08  1:08         ` Wang YanQing
2013-04-08  3:35           ` Zhang Yanfei
2013-04-08  3:53             ` Wang YanQing
2013-04-08  4:33               ` Zhang Yanfei
2013-04-08  6:07                 ` Wang YanQing
2013-04-08  6:43                   ` Zhang Yanfei
2013-04-08  4:18             ` Wang YanQing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130407010103.GA2176@udknight \
    --to=udknight@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=hari@in.ibm.com \
    --cc=horms@verge.net.au \
    --cc=jbarnes@sgi.com \
    --cc=kexec@lists.infradead.org \
    --cc=khalid.aziz@hp.com \
    --cc=tjd21@cl.cam.ac.uk \
    --cc=zhangyanfei.yes@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.