From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Fri, 12 Mar 2004 23:41:17 +0000 Subject: Re: [PATCH] avoid unaligned access to data Message-Id: <20040312234117.GD2553@kroah.com> List-Id: References: <20040229204531.GA25308@suse.de> In-Reply-To: <20040229204531.GA25308@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Sun, Feb 29, 2004 at 09:45:31PM +0100, Olaf Hering wrote: > > the data access in udevinfo is usually unaligned, due to the fact that > the struct is at offset strlen(sysfspath). That makes an ia64 kernel > rather unhappy. Unless I miss something, this change makes it happy by > making an incompatible change to the database. > > > diff -p -purN udev-018/udevdb.c udev-018.align/udevdb.c > --- udev-018/udevdb.c 2004-02-19 19:38:36.000000000 +0100 > +++ udev-018.align/udevdb.c 2004-02-22 13:05:15.000000000 +0100 > @@ -44,6 +44,8 @@ > static TDB_CONTEXT *udevdb; > > > +#define my_key_align (__alignof__(char *)) Hm, can't we just pad out our data structures to provide the proper alignment? If it's really necessary... thanks, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel