From: Stefan Berger Subject: [PATCH] [ACM] Missing alignments for ACM module Date: Wed, 18 Oct 2006 14:41:50 -0400 Message-ID: <1161196910.4130.5.camel@941e-2.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-p/taWGPpkrufaIUG0C3/" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org --=-p/taWGPpkrufaIUG0C3/ Content-Type: text/plain Content-Transfer-Encoding: 7bit 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)' Signed-off-by: Stefan Berger --=-p/taWGPpkrufaIUG0C3/ Content-Disposition: attachment; filename=xen-acm-archindep_xen_align.diff Content-Type: text/x-patch; name=xen-acm-archindep_xen_align.diff; charset=utf-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/xen/acm/acm_chinesewall_hooks.c =================================================================== --- root.orig/xen-unstable.hg/xen/acm/acm_chinesewall_hooks.c +++ 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; Index: root/xen-unstable.hg/xen/acm/acm_simple_type_enforcement_hooks.c =================================================================== --- root.orig/xen-unstable.hg/xen/acm/acm_simple_type_enforcement_hooks.c +++ 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; --=-p/taWGPpkrufaIUG0C3/ 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.xensource.com http://lists.xensource.com/xen-devel --=-p/taWGPpkrufaIUG0C3/--