Skip to contentSkip to conversation

Missing alignments for ACM module

PATCH New Stefan Berger 1 participant 1 message Oct 18, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Missing alignments for ACM module

Forgot to attach patch in previous mail.

These are the missing alignment operations for the ACM module. (the part that was so tightly coupled to the previously posted patch '2/3: make ACM architecture independent (Xen part)'

xen-unstable.hg/xen/acm/acm_chinesewall_hooks.c +2 -0
Index: root/xen-unstable.hg/xen/acm/acm_chinesewall_hooks.c
===================================================================
@@ -154,6 +154,8 @@ static int chwall_dump_policy(u8 * buf, 
     ret = ntohl(chwall_buf->chwall_conflict_aggregate_offset) +
         sizeof(domaintype_t) * chwall_bin_pol.max_types;
 
+    ret = (ret + 7) & ~7;
+
     if (buf_size < ret)
         return -EINVAL;
 
xen-unstable.hg/xen/acm/acm_simple_type_enforcement_hooks.c +2 -0
Index: root/xen-unstable.hg/xen/acm/acm_simple_type_enforcement_hooks.c
===================================================================
@@ -150,6 +150,8 @@ ste_dump_policy(u8 *buf, u32 buf_size) {
     ret = ntohl(ste_buf->ste_ssid_offset) +
         sizeof(domaintype_t)*ste_bin_pol.max_ssidrefs*ste_bin_pol.max_types;
 
+    ret = (ret + 7) & ~7;
+
     if (buf_size < ret)
         return -EINVAL;
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel