From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: jgross@suse.com, stefano.stabellini@eu.citrix.com,
andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
xen-devel@lists.xen.org, roger.pau@citrix.com
Subject: Re: [PATCH v3 1/2] libxc: Don't write terminating NULL character to command string
Date: Thu, 7 Jan 2016 13:24:51 +0000 [thread overview]
Message-ID: <1452173091.21055.212.camel@citrix.com> (raw)
In-Reply-To: <20160107111949.GV27789@citrix.com>
On Thu, 2016-01-07 at 11:19 +0000, Wei Liu wrote:
> On Wed, Jan 06, 2016 at 03:03:21PM -0500, Boris Ostrovsky wrote:
> > When copying boot command string for HVMlite guests we explicitly write
> > '\0' at MAX_GUEST_CMDLINE offset. Unless the string is close to
> > MAX_GUEST_CMDLINE in length this write will end up in the wrong place,
> > beyond the end of the mapped range.
> >
> > We don't need to limit the size of command string to some arbitrary
> > number. Any size that can be successfully allocated and mapped is valid
> > and so the string is guaranteed to be NULL-terminated (since we use
> > strlen, which needs terminating '\0', to calculate allocation size).
> >
> > Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
Applied.
Roger commented on #2 so I didn't take that, but this seemed to standalone.
next prev parent reply other threads:[~2016-01-07 13:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 20:03 [PATCH v3 0/2] HVMlite start_info initialization fixes Boris Ostrovsky
2016-01-06 20:03 ` [PATCH v3 1/2] libxc: Don't write terminating NULL character to command string Boris Ostrovsky
2016-01-07 11:19 ` Wei Liu
2016-01-07 13:24 ` Ian Campbell [this message]
2016-01-06 20:03 ` [PATCH v3 2/2] libxc: Defer initialization of start_page for HVM guests Boris Ostrovsky
2016-01-07 11:43 ` Roger Pau Monné
2016-01-07 14:47 ` Boris Ostrovsky
2016-01-07 16:54 ` Roger Pau Monné
2016-01-07 17:06 ` Ian Campbell
2016-01-07 17:33 ` Boris Ostrovsky
2016-01-07 17:38 ` Ian Campbell
2016-01-07 11:45 ` Roger Pau Monné
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=1452173091.21055.212.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jgross@suse.com \
--cc=roger.pau@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/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;
as well as URLs for NNTP newsgroup(s).