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-changelog

[Xen-changelog] [xen-unstable] 32-on-64: Fix an one-off error in compat_

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] 32-on-64: Fix an one-off error in compat_addr_ok().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 27 Jan 2007 13:00:16 -0800
Delivery-date: Sat, 27 Jan 2007 13:00:38 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxxx
# Date 1169818612 0
# Node ID 057c4c2991fa650e91300301e5cac865f98889d2
# Parent  fcaf34bc5e4129c4299e5db3be1a9cac3c0259ca
32-on-64: Fix an one-off error in compat_addr_ok().
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/include/asm-x86/x86_64/uaccess.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r fcaf34bc5e41 -r 057c4c2991fa xen/include/asm-x86/x86_64/uaccess.h
--- a/xen/include/asm-x86/x86_64/uaccess.h      Fri Jan 26 13:34:02 2007 +0000
+++ b/xen/include/asm-x86/x86_64/uaccess.h      Fri Jan 26 13:36:52 2007 +0000
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] 32-on-64: Fix an one-off error in compat_addr_ok()., Xen patchbot-unstable <=