From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Guyader Subject: [PATCH 4/5] xen: Enforce casting for guest_handle_cast Date: Thu, 31 May 2012 15:52:34 +0100 Message-ID: <1338475955-26472-5-git-send-email-jean.guyader@citrix.com> References: <1338475955-26472-1-git-send-email-jean.guyader@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------true" Return-path: In-Reply-To: <1338475955-26472-1-git-send-email-jean.guyader@citrix.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: xen-devel@lists.xen.org Cc: Jean Guyader List-Id: xen-devel@lists.xenproject.org --------------true Content-Type: text/plain; charset="UTF-8"; format=fixed Content-Transfer-Encoding: 8bit This is useful if you want to cast a guest handle to char * to do pointer aritmetics afterwards with functions like guest_handle_add_offset. Signed-off-by: Jean Guyader --- xen/include/asm-x86/guest_access.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --------------true Content-Type: text/x-patch; name="0004-xen-Enforce-casting-for-guest_handle_cast.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0004-xen-Enforce-casting-for-guest_handle_cast.patch" diff --git a/xen/include/asm-x86/guest_access.h b/xen/include/asm-x86/guest_access.h index 2b429c2..7e95da3 100644 --- a/xen/include/asm-x86/guest_access.h +++ b/xen/include/asm-x86/guest_access.h @@ -47,7 +47,7 @@ /* Cast a guest handle to the specified type of handle. */ #define guest_handle_cast(hnd, type) ({ \ - type *_x = (hnd).p; \ + type *_x = (type *)(hnd).p; \ (XEN_GUEST_HANDLE(type)) { _x }; \ }) --------------true 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 --------------true--