WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] fix unaligned access in blktap

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] fix unaligned access in blktap
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Wed, 1 Aug 2007 13:44:11 +0900
Delivery-date: Tue, 31 Jul 2007 21:42:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

Using a tapdisk on IA64 outputs the following messages.

tapdisk(8027): unaligned access to 0x600000000000c01a, ip=0x40000000000130c0
tapdisk(8027): unaligned access to 0x600000000000c022, ip=0x40000000000130d1
blktapctrl(4036): unaligned access to 0x6000000000008eca, ip=0x40000000000028a0
blktapctrl(4036): unaligned access to 0x6000000000008ed2, ip=0x40000000000028a1

This patch fixes it. 
In the struct msg_hdr, uint8_t seems to be enough for type and
drivertype though...

Thanks,
Kouya

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r d69a57b29e3f tools/blktap/lib/blktaplib.h
--- a/tools/blktap/lib/blktaplib.h      Mon Jul 30 18:14:29 2007 -0600
+++ b/tools/blktap/lib/blktaplib.h      Wed Aug 01 12:58:40 2007 +0900
@@ -175,7 +175,7 @@ typedef struct msg_hdr {
        uint16_t   drivertype;
        uint16_t   cookie;
        uint8_t    readonly;
-} msg_hdr_t;
+} __attribute__ ((aligned(sizeof(unsigned long long)))) msg_hdr_t;
 
 typedef struct msg_newdev {
        uint8_t     devnum;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] fix unaligned access in blktap, Kouya Shimura <=