public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: Wang YanQing <udknight@gmail.com>
To: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: tjd21@cl.cam.ac.uk, kexec@lists.infradead.org,
	horms@verge.net.au, ebiederm@xmission.com, hari@in.ibm.com,
	zhangyanfei.yes@gmail.com
Subject: Re: [PATCH v2]kexec:i386:kexec-bzImage: Fix pass garbage command line to new kernel
Date: Tue, 9 Apr 2013 09:08:47 +0800	[thread overview]
Message-ID: <20130409010847.GA3281@udknight> (raw)
In-Reply-To: <51629338.5080906@cn.fujitsu.com>

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);


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

      parent reply	other threads:[~2013-04-09  1:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08  9:43 [PATCH v2]kexec:i386:kexec-bzImage: Fix pass garbage command line to new kernel Wang YanQing
2013-04-08  9:51 ` Zhang Yanfei
2013-04-09  0:57   ` Wang YanQing
2013-04-09  1:08   ` Wang YanQing [this message]

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=20130409010847.GA3281@udknight \
    --to=udknight@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=hari@in.ibm.com \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=tjd21@cl.cam.ac.uk \
    --cc=zhangyanfei.yes@gmail.com \
    --cc=zhangyanfei@cn.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox