WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] another 32-on-64 bugfix

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] another 32-on-64 bugfix
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 25 Jan 2007 15:04:21 +0000
Delivery-date: Thu, 25 Jan 2007 07:03:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Fix a one-off error in compat_addr_ok().

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2007-01-08/xen/include/asm-x86/x86_64/uaccess.h
===================================================================
--- 2007-01-08.orig/xen/include/asm-x86/x86_64/uaccess.h        2006-12-18 
09:49:18.000000000 +0100
+++ 2007-01-08/xen/include/asm-x86/x86_64/uaccess.h     2007-01-25 
15:18:37.000000000 +0100
@@ -20,7 +20,8 @@
 #define __compat_addr_ok(addr) \
     ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(current->domain))
 
-#define compat_access_ok(addr, size) __compat_addr_ok((addr) + (size))
+#define compat_access_ok(addr, size) \
+    __compat_addr_ok((unsigned long)(addr) + ((size) ? (size) - 1 : 0))
 
 #define compat_array_access_ok(addr,count,size) \
     (likely((count) < (~0U / (size))) && \


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] another 32-on-64 bugfix, Jan Beulich <=