Re: [PATCH 5/27] Remove CONFIG_COMPAT code in xt_hashlimit, xt_limit

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

 



Jan Engelhardt wrote:
On Jan 4 2008 15:37, Patrick McHardy wrote:
    [NETFILTER]: Remove CONFIG_COMPAT code in xt_hashlimit, xt_limit
The kernel parts of the structures do not need to be fixed nor
    compat-converted; all other fields already use fixed types, so the
    compat code is not needed.
Did you test this? It definitely seems necessary since pointers have
different size and allignment requirements on 64 bit.

Hm you were right. I removed the compat from hashlimit and promptly got

	invalid size 64 != 52

but then again I wonder why xt_connlimit works without compat.

Because it uses __attribute__((aligned(8)))


In the hashlimit case we have a 4 byte hole before the hinfo pointer
on 64 bit which is not present on 32 bit, limit uses an unsigned long
which has different size and also has a hole before the master pointer
on 64 bit.

Even if that hole was not there, it would be

	64 != 56

or so, no?

Additionally pointer sizes differ, which makes up for another 2*4 bytes.

-
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux