From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v2] x86/HVM: avoid pointer wraparound in bufioreq handling Date: Thu, 18 Jun 2015 14:41:32 +0100 Message-ID: <5582CA8C.9070100@citrix.com> References: <5582E0660200007800086A27@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3869217612972582911==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z5a4Y-0003Tp-89 for xen-devel@lists.xenproject.org; Thu, 18 Jun 2015 13:41:38 +0000 In-Reply-To: <5582E0660200007800086A27@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 , xen-devel Cc: Keir Fraser , Stefano Stabellini , Tim Deegan , Ian Jackson , Ian Campbell , Wei Liu List-Id: xen-devel@lists.xenproject.org --===============3869217612972582911== Content-Type: multipart/alternative; boundary="------------080004080905030703030307" --------------080004080905030703030307 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit On 18/06/15 14:14, Jan Beulich wrote: > The number of slots per page being 511 (i.e. not a power of two) means > that the (32-bit) read and write indexes going beyond 2^32 will likely > disturb operation. Extend I/O req server creation so the caller can > indicate that it is using suitable atomic accesses where needed (not > all accesses to the two pointers really need to be atomic), allowing > the hypervisor to atomically canonicalize both pointers when both have > gone through at least one cycle. > > Signed-off-by: Jan Beulich > Acked-by: Ian Campbell Reviewed-by: Andrew Cooper --------------080004080905030703030307 Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: 7bit
On 18/06/15 14:14, Jan Beulich wrote:
The number of slots per page being 511 (i.e. not a power of two) means
that the (32-bit) read and write indexes going beyond 2^32 will likely
disturb operation. Extend I/O req server creation so the caller can
indicate that it is using suitable atomic accesses where needed (not
all accesses to the two pointers really need to be atomic), allowing
the hypervisor to atomically canonicalize both pointers when both have
gone through at least one cycle.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
--------------080004080905030703030307-- --===============3869217612972582911== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3869217612972582911==--