Index: root/xen-unstable.hg/xen/acm/acm_policy.c =================================================================== --- root.orig/xen-unstable.hg/xen/acm/acm_policy.c +++ root/xen-unstable.hg/xen/acm/acm_policy.c @@ -44,8 +44,6 @@ static void acm_doms_restore_ssidref(voi static ssidref_t oldssid_to_newssid(const struct acm_ssid_domain *, const struct acm_sized_buffer *map); -#define BYTE_ARRAY(a) ((u8 *)(a)) - int acm_set_policy(XEN_GUEST_HANDLE_64(void) buf, u32 buf_size) { @@ -711,12 +709,12 @@ acm_change_policy(struct acm_change_poli goto acm_chg_policy_exit; } - if ( copy_from_guest(BYTE_ARRAY(dels.array), + if ( copy_from_guest(dels.array, chgpolicy->del_array, - chgpolicy->delarray_size) || - copy_from_guest(BYTE_ARRAY(ssidmap.array), + dels.num_items) || + copy_from_guest(ssidmap.array, chgpolicy->chg_array, - chgpolicy->chgarray_size) || + ssidmap.num_items) || copy_from_guest(binpolicy, chgpolicy->policy_pushcache, chgpolicy->policy_pushcache_size )) @@ -845,9 +843,9 @@ acm_relabel_domains(struct acm_relabel_d memset(errors.array, 0x0, sizeof(uint32_t) * errors.num_items); } - if ( copy_from_guest(BYTE_ARRAY(relabels.array), + if ( copy_from_guest(relabels.array, relabel->relabel_map, - relabel->relabel_map_size) ) + relabels.num_items) ) { rc = -EFAULT; goto acm_relabel_doms_exit;