32 vs 64 bits
Hi all,
I'm trying to understand why the following commit has been done:
Removes KERNEL_64_USERSPACE_32
Yasuyuki KOZAKAI [Sat, 30 Jun 2007 10:47:57 +0000 (10:47 +0000)]
The recent kernel has compat layer for iptables. It doesn't have compat layer for libipq and ip6tables, but ip6tables with KERNEL_64_USERSPACE_32 is still broken. We should fix kernel instead of fixing them if and when we want use their 32bit binary with 64bit kernel.
Where is the compat layer? If I look in a recent kernel, it seems that ip_queue.h still uses long and is broken.
http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=blob;f=include/linux/netfilter_ipv4/ip_queue.h;hb=59b8bfd8fd608821e5addc9f4682c7f2424afd8c
Am I wrong?
If yes, what is the right way to fix this? Updating the API?
Thank you,
Nicolas
Quoted 8 lines · Nicolas Dichtel
Hi all,
I'm trying to understand why the following commit has been done:
Removes
KERNEL_64_USERSPACE_32
Quoted 8 lines
Yasuyuki KOZAKAI [Sat, 30 Jun 2007 10:47:57 +0000 (10:47 +0000)]
The recent kernel has compat layer for iptables. It doesn't have compat layer for libipq and ip6tables, but ip6tables with
KERNEL_64_USERSPACE_32is still broken. We should fix kernel instead of fixing them if and when we want use their 32bit binary with 64bit kernel.Where is the compat layer?
For example, net/netfilter/xt_MARK.c there are some regions with "#ifdef CONFIG_COMPAT". People used to use the C type "long", which has different sizes across different platforms, leading to a mess and evidently the compat conversion functions. Many of the Xtables modules do not suffer from this and hence there is not that much compat code left.
Quoted 3 lines
If I look in a recent kernel, it seems that
ip_queue.hstill uses long and is broken.
[linux/netfilter_ipv4/ip_queue.h]
Indeed this seems so.
Quoted 2 lines
Am I wrong?
If yes, what is the right way to fix this? Updating the API?
Use libnetfilter_queue ;-)