Re: [RFC][PATCH] A generic boolean

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jes Sorensen wrote:

And what will break if you make that switch?

If we are lucky, some binary only modules? :-)

But you're right, it may just have to be documented as one of those
nasty issues to watch out for.


What is really poisonous is structures which get padded when all the members are naturally aligned. Unfortunately gcc produces really crap code with __attribute__((packed)) on some architectures, so just using that isn't a good solution. On the other hand, non-AEABI ARM sometimes needs it!

For the lack of a __attribute__((nopad)) that would throw a warning or error on excessive padding, I fear that our best option is an __abi annotation which would enforce certain rules using sparse, and presumably provide __attribute__((packed)) on ARM:

- All padding must be explicit.
- All members must be naturally aligned.
- No unportable constructs, like non-int-sized bitfields.

	-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux