diff -r 10ad9b50b4ca xen/include/xen/compat.h --- a/xen/include/xen/compat.h Tue May 25 11:28:58 2010 +0100 +++ b/xen/include/xen/compat.h Tue May 25 16:13:54 2010 +0100 @@ -90,8 +90,9 @@ * Allows use of faster __copy_* functions. */ #define compat_handle_okay(hnd, nr) \ + (paging_mode_external(current->domain) || \ compat_array_access_ok((void *)(full_ptr_t)(hnd).c, (nr), \ - sizeof(**(hnd)._)) + sizeof(**(hnd)._))) #define __copy_to_compat_offset(hnd, off, ptr, nr) ({ \ const typeof(*(ptr)) *_s = (ptr); \