From: Jean Guyader <jean.guyader@citrix.com>
To: xen-devel@lists.xen.org
Cc: Jean Guyader <jean.guyader@citrix.com>
Subject: [PATCH 4/5] xen: Enforce casting for guest_handle_cast
Date: Thu, 31 May 2012 16:07:11 +0100 [thread overview]
Message-ID: <1338476832-26653-5-git-send-email-jean.guyader@citrix.com> (raw)
In-Reply-To: <1338476832-26653-1-git-send-email-jean.guyader@citrix.com>
[-- Attachment #1: Type: text/plain, Size: 298 bytes --]
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 <jean.guyader@citrix.com>
---
xen/include/asm-x86/guest_access.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0004-xen-Enforce-casting-for-guest_handle_cast.patch --]
[-- Type: text/x-patch; name="0004-xen-Enforce-casting-for-guest_handle_cast.patch", Size: 487 bytes --]
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 }; \
})
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2012-05-31 15:07 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 15:07 [RFC][PATCH 0/5] Add V4V to Xen Jean Guyader
2012-05-31 15:07 ` [PATCH 1/5] xen: add ssize_t to types.h Jean Guyader
2012-05-31 15:29 ` Jan Beulich
2012-05-31 15:07 ` [PATCH 2/5] xen: Add headers to include/Makefile Jean Guyader
2012-05-31 15:37 ` Jan Beulich
2012-05-31 15:07 ` [PATCH 3/5] v4v: Introduce VIRQ_V4V Jean Guyader
2012-05-31 15:44 ` Jan Beulich
2012-05-31 15:07 ` Jean Guyader [this message]
2012-05-31 15:47 ` [PATCH 4/5] xen: Enforce casting for guest_handle_cast Jan Beulich
2012-06-14 14:08 ` Jean Guyader
2012-06-14 14:23 ` Jan Beulich
2012-06-14 14:26 ` Tim Deegan
2012-06-14 14:27 ` Tim Deegan
2012-06-14 14:40 ` Jean Guyader
2012-06-14 15:39 ` Jean Guyader
2012-06-14 15:50 ` Tim Deegan
2012-06-14 16:00 ` Jan Beulich
2012-06-14 21:19 ` Jean Guyader
2012-06-18 11:36 ` Jan Beulich
2012-06-18 12:50 ` Jean Guyader
2012-05-31 15:07 ` [PATCH 5/5] xen: Add V4V implementation Jean Guyader
2012-05-31 15:59 ` Jan Beulich
2012-06-01 12:41 ` [RFC][PATCH 0/5] Add V4V to Xen Jan Beulich
2012-06-01 13:24 ` George Dunlap
2012-06-14 14:01 ` Jean Guyader
2012-06-01 13:47 ` Ian Campbell
2012-06-07 8:47 ` Jean Guyader
2012-06-07 9:42 ` Jean Guyader
2012-06-07 11:40 ` Tim Deegan
2012-06-07 15:36 ` Tim Deegan
2012-06-13 10:48 ` Jean Guyader
2012-06-13 11:44 ` Tim Deegan
2012-06-14 10:55 ` Jean Guyader
2012-06-14 14:56 ` Tim Deegan
2012-06-14 15:10 ` Jean Guyader
2012-06-14 15:35 ` Tim Deegan
2012-06-14 21:14 ` Jean Guyader
2012-06-25 9:05 ` Tim Deegan
2012-06-26 14:38 ` Ian Campbell
2012-06-28 10:38 ` Jean Guyader
2012-06-28 10:50 ` Tim Deegan
2012-06-28 11:24 ` Jean Guyader
2012-06-28 11:34 ` Ian Campbell
2012-06-28 11:43 ` Jean Guyader
2012-06-28 11:58 ` Ian Campbell
2012-06-28 12:10 ` Jean Guyader
2012-06-28 12:36 ` Ian Campbell
2012-06-28 13:43 ` Jean Guyader
2012-06-28 13:47 ` Ian Campbell
2012-06-28 16:35 ` Jean Guyader
2012-07-02 14:14 ` Ian Campbell
2012-06-28 10:19 ` Jean Guyader
-- strict thread matches above, loose matches on Subject: below --
2012-05-31 14:52 Jean Guyader
2012-05-31 14:52 ` [PATCH 4/5] xen: Enforce casting for guest_handle_cast Jean Guyader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1338476832-26653-5-git-send-email-jean.guyader@citrix.com \
--to=jean.guyader@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.