@@ -127,7 +127,7 @@ do_kexec_op(
extern long
do_xsm_op(
- XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_xsm_op);
+ XEN_GUEST_HANDLE_PARAM(void) u_xsm_op);
#ifdef CONFIG_ARGO
extern long do_argo_op(
@@ -198,7 +198,7 @@ compat_set_timer_op(
s32 hi);
extern int compat_xsm_op(
- XEN_GUEST_HANDLE_PARAM(xsm_op_t) op);
+ XEN_GUEST_HANDLE_PARAM(void) op);
extern int compat_kexec_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) uarg);
@@ -442,13 +442,13 @@ static XSM_INLINE int xsm_hypfs_op(XSM_DEFAULT_VOID)
return xsm_default_action(action, current->domain, NULL);
}
-static XSM_INLINE long xsm_do_xsm_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) op)
+static XSM_INLINE long xsm_do_xsm_op(XEN_GUEST_HANDLE_PARAM(void) op)
{
return -ENOSYS;
}
#ifdef CONFIG_COMPAT
-static XSM_INLINE int xsm_do_compat_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) op)
+static XSM_INLINE int xsm_do_compat_op(XEN_GUEST_HANDLE_PARAM(void) op)
{
return -ENOSYS;
}
@@ -18,9 +18,6 @@
#include <xen/sched.h>
#include <xen/multiboot.h>
-typedef void xsm_op_t;
-DEFINE_XEN_GUEST_HANDLE(xsm_op_t);
-
/* policy magic number (defined by XSM_MAGIC) */
typedef u32 xsm_magic_t;
@@ -129,9 +126,9 @@ struct xsm_operations {
int (*page_offline)(uint32_t cmd);
int (*hypfs_op)(void);
- long (*do_xsm_op) (XEN_GUEST_HANDLE_PARAM(xsm_op_t) op);
+ long (*do_xsm_op) (XEN_GUEST_HANDLE_PARAM(void) op);
#ifdef CONFIG_COMPAT
- int (*do_compat_op) (XEN_GUEST_HANDLE_PARAM(xsm_op_t) op);
+ int (*do_compat_op) (XEN_GUEST_HANDLE_PARAM(void) op);
#endif
int (*hvm_param) (struct domain *d, unsigned long op);
@@ -543,13 +540,13 @@ static inline int xsm_hypfs_op(xsm_default_t def)
return xsm_ops->hypfs_op();
}
-static inline long xsm_do_xsm_op (XEN_GUEST_HANDLE_PARAM(xsm_op_t) op)
+static inline long xsm_do_xsm_op (XEN_GUEST_HANDLE_PARAM(void) op)
{
return xsm_ops->do_xsm_op(op);
}
#ifdef CONFIG_COMPAT
-static inline int xsm_do_compat_op (XEN_GUEST_HANDLE_PARAM(xsm_op_t) op)
+static inline int xsm_do_compat_op (XEN_GUEST_HANDLE_PARAM(void) op)
{
return xsm_ops->do_compat_op(op);
}
@@ -607,7 +607,7 @@ static int flask_relabel_domain(struct xen_flask_relabel *arg)
#endif /* !COMPAT */
-ret_t do_flask_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_flask_op)
+ret_t do_flask_op(XEN_GUEST_HANDLE_PARAM(void) u_flask_op)
{
xen_flask_op_t op;
int rv;
@@ -1742,8 +1742,8 @@ static int flask_argo_send(const struct domain *d, const struct domain *t)
#endif
-long do_flask_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_flask_op);
-int compat_flask_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_flask_op);
+long do_flask_op(XEN_GUEST_HANDLE_PARAM(void) u_flask_op);
+int compat_flask_op(XEN_GUEST_HANDLE_PARAM(void) u_flask_op);
static struct xsm_operations flask_ops = {
.security_domaininfo = flask_security_domaininfo,
@@ -213,13 +213,13 @@ int __init register_xsm(struct xsm_operations *ops)
#endif
-long do_xsm_op (XEN_GUEST_HANDLE_PARAM(xsm_op_t) op)
+long do_xsm_op(XEN_GUEST_HANDLE_PARAM(void) op)
{
return xsm_do_xsm_op(op);
}
#ifdef CONFIG_COMPAT
-int compat_xsm_op (XEN_GUEST_HANDLE_PARAM(xsm_op_t) op)
+int compat_xsm_op(XEN_GUEST_HANDLE_PARAM(void) op)
{
return xsm_do_compat_op(op);
}
The type xsm_op_t masks the use of void pointers. This commit drops the xsm_op_t type and replaces it and all its uses with an explicit void. Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com> --- xen/include/xen/hypercall.h | 4 ++-- xen/include/xsm/dummy.h | 4 ++-- xen/include/xsm/xsm.h | 11 ++++------- xen/xsm/flask/flask_op.c | 2 +- xen/xsm/flask/hooks.c | 4 ++-- xen/xsm/xsm_core.c | 4 ++-- 6 files changed, 13 insertions(+), 16 deletions(-)