> The only issue I see is the kernel-userspace communication. If userspace and
> kernel use the same header file to describe their communication structs
> (like struct ipt_replace) one has to make sure they use the same size.
> On a sparc64 an unsigned int for the kernel is 64 bits, for userspace it's
> 32 bits. What one can do is make __u32 of all the unsigned ints (and all
> other types who's size is machine dependent), __u32 is garanteed to be 32
> bits. Now, this makes it silly for a 64 bit kernel, as it will be using only
> 32 bits. Using __u64 instead seems worse to me, because then a 32 bit kernel
> has to go calculate with 64 bits, must be slower.

The only _sane_ solution, is to have separate user level and kernel includes.
Mixing kernel includes into user level compilation just won't work, and it
is extremely ugly to make concessions in type naming on both sides in an
attempt to make the definitions shared. This makes the respective interface
ugly for all archs, for the sake of a single niche arch with complications.

best regards
  Patrick

Reply via email to