From: Andre Przywara <andre.przywara@linaro.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: Tim Deegan <tim@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>, Jann Horn <jannh@google.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
xen-devel@lists.xen.org, Julien Grall <julien.grall@arm.com>
Subject: Re: [PATCH 1/2] gnttab: correct GNTTABOP_cache_flush empty batch handling
Date: Mon, 4 Dec 2017 17:13:18 +0000 [thread overview]
Message-ID: <851c4589-9f64-901b-42e5-38218f30c009@linaro.org> (raw)
In-Reply-To: <5A251CB9020000780019429F@prv-mh.provo.novell.com>
Hi,
On 04/12/17 09:00, Jan Beulich wrote:
>>>> On 01.12.17 at 16:31, <andre.przywara@linaro.org> wrote:
>> On 30/11/17 14:31, Jan Beulich wrote:
>>> Jann validly points out that with a caller bogusly requesting a zero-
>>> element batch with non-zero high command bits (the ones used for
>>> continuation encoding), the assertion right before the call to
>>> hypercall_create_continuation() would trigger. A similar situation would
>>> arise afaict for non-empty batches with op and/or length zero in every
>>> element.
>>>
>>> While we want the former to succeed (as we do elsewhere for similar
>>> no-op requests), the latter can clearly be converted to an error, as
>>> this is a state that can't be the result of a prior operation.
>>>
>>> Take the opportunity and also correct the order of argument checks:
>>> We shouldn't accept zero-length elements with unknown bits set in "op".
>>> Also constify cache_flush()'s first parameter.
>>>
>>> Reported-by: Jann Horn <jannh@google.com>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> Took me a while to wrap my head around it, because the actual fix is
>> just the "*cur_ref = 0;" line, I think.
>> But this looks correct to me.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
>
> I guess this was meant to be Reviewed-by?
Sure, seems my mind was still smoking from chasing all possible call
chains ;-)
Cheers,
Andre.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2017-12-04 17:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 20:07 [BUG] assertion failure in do_grant_table_op() Jann Horn
2017-11-30 14:26 ` [PATCH 0/2] gnttab: improve GNTTABOP_cache_flush handling Jan Beulich
2017-11-30 14:31 ` [PATCH 1/2] gnttab: correct GNTTABOP_cache_flush empty batch handling Jan Beulich
2017-12-01 15:31 ` Andre Przywara
2017-12-04 9:00 ` Jan Beulich
2017-12-04 17:13 ` Andre Przywara [this message]
2017-12-01 21:38 ` Stefano Stabellini
2017-12-04 10:08 ` Jan Beulich
2017-12-05 18:42 ` Stefano Stabellini
2017-12-04 11:12 ` George Dunlap
2017-12-04 11:19 ` Jan Beulich
2017-11-30 14:32 ` [PATCH 2/2] gnttab: improve GNTTABOP_cache_flush locking Jan Beulich
2017-12-01 15:31 ` Andre Przywara
2017-12-04 9:02 ` Jan Beulich
2017-12-04 11:31 ` George Dunlap
2017-12-04 11:36 ` Jan Beulich
2017-12-01 21:45 ` Stefano Stabellini
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=851c4589-9f64-901b-42e5-38218f30c009@linaro.org \
--to=andre.przywara@linaro.org \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=jannh@google.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--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).