From: Paul Durrant <Paul.Durrant@citrix.com> To: Jan Beulich <JBeulich@suse.com>, "qemu-devel@nongnu.org" <qemu-devel@nongnu.org> Cc: Anthony Perard <anthony.perard@citrix.com>, Stefano Stabellini <sstabellini@kernel.org>, xen-devel <xen-devel@lists.xenproject.org> Subject: Re: [Qemu-devel] [PATCH v2 1/3] xen: fix quad word bufioreq handling Date: Fri, 25 Nov 2016 10:08:14 +0000 [thread overview] Message-ID: <9f17b0ea9b964909be1be79d5786ea41@AMSPEX02CL03.citrite.net> (raw) In-Reply-To: <58381B15020000780012226B@prv-mh.provo.novell.com> > -----Original Message----- > From: Jan Beulich [mailto:JBeulich@suse.com] > Sent: 25 November 2016 10:06 > To: qemu-devel@nongnu.org > Cc: Anthony Perard <anthony.perard@citrix.com>; Paul Durrant > <Paul.Durrant@citrix.com>; Stefano Stabellini <sstabellini@kernel.org>; xen- > devel <xen-devel@lists.xenproject.org> > Subject: [PATCH v2 1/3] xen: fix quad word bufioreq handling > > We should not consume the second slot if it didn't get written yet. > Normal writers - i.e. Xen - would not update write_pointer between the > two writes, but the page may get fiddled with by the guest itself, and > we're better off avoiding to enter an infinite loop in that case. > > Reported-by: yanghongke <yanghongke@huawei.com> > Signed-off-by: Jan Beulich <jbeulich@suse.com> > --- > v2: Bail (using hw_error()) instead of just breaking the loop. LGTM. Reviewed-by: Paul Durrant <paul.durrant@citrix.com> > > --- a/xen-hvm.c > +++ b/xen-hvm.c > @@ -1021,6 +1021,9 @@ static int handle_buffered_iopage(XenIOS > xen_rmb(); > qw = (req.size == 8); > if (qw) { > + if (rdptr + 1 == wrptr) { > + hw_error("Incomplete quad word buffered ioreq"); > + } > buf_req = &buf_page->buf_ioreq[(rdptr + 1) % > IOREQ_BUFFER_SLOT_NUM]; > req.data |= ((uint64_t)buf_req->data) << 32; > >
WARNING: multiple messages have this Message-ID (diff)
From: Paul Durrant <Paul.Durrant@citrix.com> To: Jan Beulich <JBeulich@suse.com>, "qemu-devel@nongnu.org" <qemu-devel@nongnu.org> Cc: Anthony Perard <anthony.perard@citrix.com>, xen-devel <xen-devel@lists.xenproject.org>, Stefano Stabellini <sstabellini@kernel.org> Subject: Re: [PATCH v2 1/3] xen: fix quad word bufioreq handling Date: Fri, 25 Nov 2016 10:08:14 +0000 [thread overview] Message-ID: <9f17b0ea9b964909be1be79d5786ea41@AMSPEX02CL03.citrite.net> (raw) In-Reply-To: <58381B15020000780012226B@prv-mh.provo.novell.com> > -----Original Message----- > From: Jan Beulich [mailto:JBeulich@suse.com] > Sent: 25 November 2016 10:06 > To: qemu-devel@nongnu.org > Cc: Anthony Perard <anthony.perard@citrix.com>; Paul Durrant > <Paul.Durrant@citrix.com>; Stefano Stabellini <sstabellini@kernel.org>; xen- > devel <xen-devel@lists.xenproject.org> > Subject: [PATCH v2 1/3] xen: fix quad word bufioreq handling > > We should not consume the second slot if it didn't get written yet. > Normal writers - i.e. Xen - would not update write_pointer between the > two writes, but the page may get fiddled with by the guest itself, and > we're better off avoiding to enter an infinite loop in that case. > > Reported-by: yanghongke <yanghongke@huawei.com> > Signed-off-by: Jan Beulich <jbeulich@suse.com> > --- > v2: Bail (using hw_error()) instead of just breaking the loop. LGTM. Reviewed-by: Paul Durrant <paul.durrant@citrix.com> > > --- a/xen-hvm.c > +++ b/xen-hvm.c > @@ -1021,6 +1021,9 @@ static int handle_buffered_iopage(XenIOS > xen_rmb(); > qw = (req.size == 8); > if (qw) { > + if (rdptr + 1 == wrptr) { > + hw_error("Incomplete quad word buffered ioreq"); > + } > buf_req = &buf_page->buf_ioreq[(rdptr + 1) % > IOREQ_BUFFER_SLOT_NUM]; > req.data |= ((uint64_t)buf_req->data) << 32; > > _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-11-25 10:08 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-11-25 10:01 [Qemu-devel] [PATCH v2 0/3] xen: XSA-197 follow-ups Jan Beulich 2016-11-25 10:05 ` [Qemu-devel] [PATCH v2 1/3] xen: fix quad word bufioreq handling Jan Beulich 2016-11-25 10:08 ` Paul Durrant [this message] 2016-11-25 10:08 ` Paul Durrant 2016-11-28 19:21 ` Stefano Stabellini 2016-11-28 19:21 ` [Qemu-devel] " Stefano Stabellini 2016-11-25 10:05 ` Jan Beulich 2016-11-25 10:06 ` [Qemu-devel] [PATCH v2 2/3] xen: slightly simplify " Jan Beulich 2016-11-25 10:06 ` Jan Beulich 2016-11-28 19:24 ` Stefano Stabellini 2016-11-28 19:24 ` [Qemu-devel] " Stefano Stabellini 2016-11-25 10:06 ` [Qemu-devel] [PATCH v2 3/3] xen: ignore direction in " Jan Beulich 2016-11-25 10:06 ` Jan Beulich 2016-11-25 11:06 ` [PATCH v2 0/3] xen: XSA-197 follow-ups Jan Beulich
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=9f17b0ea9b964909be1be79d5786ea41@AMSPEX02CL03.citrite.net \ --to=paul.durrant@citrix.com \ --cc=JBeulich@suse.com \ --cc=anthony.perard@citrix.com \ --cc=qemu-devel@nongnu.org \ --cc=sstabellini@kernel.org \ --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: linkBe 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.