On Friday 07 December 2007 13:34:07 David Miller wrote: > From: Michael Buesch <mb@xxxxxxxxx> > Date: Fri, 7 Dec 2007 12:35:11 +0100 > > > So, how do we handle unaligned data in userspace then? > > A _lot_ of applications are broken if that's right what you say. > > Applications make sure data is always properly aligned, that's how > it's handled. I don't see what the big mystery is. :-) That's not always possible. For example if we are handling some kind of wire protocol data. let's give you some real world example: b43-fwcutter The wire protocol for the iv files is the following structure: struct b43_iv { be16 a; union { be16 x; be32 y; } ((attr_packed)); } ((attr_packed)); How do I handle that in userspace? In kernel space it's simple (and we already use get_unaligned() for the 32bit value there). -- Greetings Michael. - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html