From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [PATCH linux-2.6.18] xen: mark pvscsi frontend request consumed only after last read Date: Mon, 02 Feb 2015 11:17:43 +0100 Message-ID: <54CF4EC7.9050507@suse.com> References: <1422625911-29988-1-git-send-email-jgross@suse.com> <54CF3ADC020000780005BBD7@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YIE4g-0007MQ-T9 for xen-devel@lists.xenproject.org; Mon, 02 Feb 2015 10:17:46 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 664BDAB0E for ; Mon, 2 Feb 2015 10:17:44 +0000 (UTC) In-Reply-To: <54CF3ADC020000780005BBD7@mail.emea.novell.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: Jan Beulich Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 02/02/2015 08:52 AM, Jan Beulich wrote: >>>> On 30.01.15 at 14:51, <"jgross@suse.com".non-mime.internet> wrote: >> A request in the ring buffer mustn't be read after it has been marked >> as consumed. Otherwise it might already have been reused by the >> frontend without violating the ring protocol. > > This is irrelevant, as the ->req_cons is a backend private field (if it > was a shared one, a barrier would have been needed between > copying and updating that field). Hmm, you are right. Interesting, I've always thought req_cons would be used by the frontend, too. Thanks for updating my protocol know-how. :-) > >> To avoid inconsistencies in the backend only work on a private copy >> of the request. This will ensure a malicious guest not being able to >> bypass consistency checks of the backend by modifying an active >> request. > > Hence - also considering with my earlier reply - I don't view the change > as necessary. Agreed. Juergen