xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* RING_FULL() equivalent for responses?
@ 2016-05-04  8:00 Juergen Gross
  2016-05-04  8:04 ` Juergen Gross
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Gross @ 2016-05-04  8:00 UTC (permalink / raw)
  To: xen-devel; +Cc: Anthony PERARD

Hi,

during review of my qemu pvusb backend patch Anthony raised the
question why my backend doesn't check for the ring being full before
using RING_GET_RESPONSE().

I've checked several existing backends and none of them is doing this
test. To be precise: There is no macro to test this condition as
RING_FULL() is doing this kind of test for the request ring only.

A frontend generating lots of requests might be slow dequeueing the
responses so I guess it could happen that the response ring will
become full while some requests are still active. I know that at
least most of the frontends won't issue another request as long as
RING_SIZE() responses are outstanding, but I'm not aware of any
specification making this behavior mandatory.

As the result of ignoring a full response ring will affect the domU
running the frontend only, I don't think this is a security issue, but
"only" one of correctness.

Thoughts?


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RING_FULL() equivalent for responses?
  2016-05-04  8:00 RING_FULL() equivalent for responses? Juergen Gross
@ 2016-05-04  8:04 ` Juergen Gross
  0 siblings, 0 replies; 2+ messages in thread
From: Juergen Gross @ 2016-05-04  8:04 UTC (permalink / raw)
  To: xen-devel; +Cc: Anthony PERARD

On 04/05/16 10:00, Juergen Gross wrote:
> Hi,
> 
> during review of my qemu pvusb backend patch Anthony raised the
> question why my backend doesn't check for the ring being full before
> using RING_GET_RESPONSE().
> 
> I've checked several existing backends and none of them is doing this
> test. To be precise: There is no macro to test this condition as
> RING_FULL() is doing this kind of test for the request ring only.

Aargh, forget it.

I've misread RING_FULL(). It is checking the request producer against
the response consumer, so everything is correct.

Sorry for the noise.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-04  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-04  8:00 RING_FULL() equivalent for responses? Juergen Gross
2016-05-04  8:04 ` Juergen Gross

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