From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH 3/5] tmem: Check copy_to_user_* return value.
Date: Tue, 26 Nov 2013 13:16:22 -0500 [thread overview]
Message-ID: <20131126181622.GB2838@phenom.dumpdata.com> (raw)
In-Reply-To: <529468050200007800106FA0@nat28.tlf.novell.com>
On Tue, Nov 26, 2013 at 08:21:09AM +0000, Jan Beulich wrote:
> >>> On 25.11.13 at 18:00, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
>
> First of all, the title is wrong: You really mean copy_to_guest*().
>
> > We weren't checking whether that operation fails and
> > return the proper error.
> >
> > This fixes CID 1055125, 105512, 1055127, 1055128, 1055129,
> > 1055130.
>
> But if you're doing something like this, you should fix all instances,
> not just some. Which would e.g. require
> tmem_copy_to_client_buf_offset() to propagate the return value
> of copy_to_guest_offset() (it's odd anyway that this one is an
> inline function, while tmem_copy_to_client_buf() is a macro).
No need. One of the Bobs patches fixes that. (the ones he posted
a couple of days ago that - not the ones you pulled).
>
> But then again I'm wondering what baseline your patch uses:
It was on top of the earlier tmem patches. Which is staging, so this
should apply nicely on top of that. But I also realize that it has
the first of his patches that he had posted this week. That is the
tmem: cleanup: drop some debug code
patch.
Sorry about that - I should have mentioned that in the cover letter and
I completely forgot.
>
> > --- a/xen/common/tmem.c
> > +++ b/xen/common/tmem.c
> > @@ -2146,8 +2146,12 @@ static int tmemc_list(domid_t cli_id, tmem_cli_va_param_t buf, uint32_t len,
> > if ( cli_id == TMEM_CLI_ID_NULL ) {
> > off = tmemc_list_global(buf,0,len,use_long);
> > off += tmemc_list_shared(buf,off,len-off,use_long);
>
> This isn't on line 2146 of today's staging tree, but on line 2239.
>
> Hence looking at the individual changes may not make much sense,
> as it's not clear whether there are other dependencies on earlier
> changes here.
<nods>
>
> Jan
>
next prev parent reply other threads:[~2013-11-26 18:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 17:00 [PATCH] Coverity patches (tmem/xenstat) v1 Konrad Rzeszutek Wilk
2013-11-25 17:00 ` [PATCH 1/5] xc/tmem: Free temporary buffer used during migration Konrad Rzeszutek Wilk
2013-11-25 17:09 ` Andrew Cooper
2013-11-25 17:00 ` [PATCH 2/5] xc/tmem: Unchecked return value Konrad Rzeszutek Wilk
2013-11-25 17:11 ` Andrew Cooper
2013-11-25 19:53 ` Konrad Rzeszutek Wilk
2013-11-25 17:00 ` [PATCH 3/5] tmem: Check copy_to_user_* " Konrad Rzeszutek Wilk
2013-11-25 17:16 ` Andrew Cooper
2013-11-26 8:21 ` Jan Beulich
2013-11-26 18:16 ` Konrad Rzeszutek Wilk [this message]
2013-11-25 17:00 ` [PATCH 4/5] tmem: Pointless check of NULL against an array Konrad Rzeszutek Wilk
2013-11-25 17:19 ` Andrew Cooper
2013-11-25 19:54 ` Konrad Rzeszutek Wilk
2013-11-26 8:27 ` Jan Beulich
2013-11-25 17:00 ` [PATCH 5/5] xenstat: Fix buffer over-run with new_domains being negative (again) Konrad Rzeszutek Wilk
2013-11-25 17:06 ` Ian Campbell
2013-11-25 17:36 ` Andrew Cooper
2013-11-25 19:51 ` Konrad Rzeszutek Wilk
2013-11-26 8:40 ` Ian Campbell
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=20131126181622.GB2838@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xenproject.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 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.