From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH 3/3] evtchn/fifo: don't spin indefinitely when setting LINK Date: Mon, 4 Nov 2013 15:11:51 +0000 Message-ID: <5277B937.5060803@citrix.com> References: <1383231791-4604-1-git-send-email-david.vrabel@citrix.com> <1383231791-4604-4-git-send-email-david.vrabel@citrix.com> <5277BF9F02000078000FF1F2@nat28.tlf.novell.com> <5277B4C2.5000508@citrix.com> <1383577632.8826.86.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VdLoq-0001xe-Ha for xen-devel@lists.xenproject.org; Mon, 04 Nov 2013 15:11:56 +0000 In-Reply-To: <1383577632.8826.86.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel , Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 04/11/13 15:07, Ian Campbell wrote: > On Mon, 2013-11-04 at 14:52 +0000, David Vrabel wrote: >> On 04/11/13 14:39, Jan Beulich wrote: >>>>>> On 31.10.13 at 16:03, David Vrabel wrote: >>>> From: David Vrabel >>>> >>>> A malicious or buggy guest can cause another domain to spin >>>> indefinitely by repeatedly writing to an event word when the other >>>> domain is trying to link a new event. The cmpxchg() in >>>> evtchn_fifo_set_link() will repeatedly fail and the loop may never >>>> terminate. >>> >>> So here you talk of two guests (with me not immediately seeing >>> where that interaction comes from - is it that for an interdomain >>> event the receiver could harm the sender?), ... >> >> Yes. Guest A notifies guest M which requires linking a new event into >> one of guest B's event queue. While guest A is writing the guest M's >> event array (to set the LINK field), guest M may repeatedly write to the >> same event word, causing the cmpxchg() to repeatedly fail. > > M == B here? Yes. I originally had B then changed it to M for Malicious to be clearer... David