* alignment problem with ebt_among on ppc
@ 2012-02-03 7:21 joe
2012-02-09 19:22 ` Bart De Schuymer
0 siblings, 1 reply; 8+ messages in thread
From: joe @ 2012-02-03 7:21 UTC (permalink / raw)
To: netfilter-devel
hi,
i'm currently faced with an alignment problem of ebt_among with ppc
architecture.
Trying to add a rule using the among extension leads to the following
syslog entry:
ebtables: among: wrong size: 2104 against expected 2100, rounded to 2100
I tried to analyze the problem and I observed that there have been several
problems regarding EBT_ALIGN in the past with x86_64 and sparc
architecure. But I didn't find anything about ppc.
What I've seen is that ebt_among extension of ebtables uses
__alignof__(_xt_align) while the corresponding kernel module uses
__alignof__(ebt_replace) to determin the alignment in EBT_ALIGN().
These are the results of these values on different platforms:
x86 x86_64 ppc
__alignof__(_xt_align) 4 8 8
__alignof__(ebt_replace) 4 8 4
So I assume here we can see why ebtales fails to add rules which use the
among extension.
I'm using kernel 2.6.33 and ebtables 2.0.10-4
Is this a known issue or are there any suggestions how to circumvent this
problem?
Thankyou very much.
Best regards
Joerg
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: alignment problem with ebt_among on ppc
2012-02-03 7:21 alignment problem with ebt_among on ppc joe
@ 2012-02-09 19:22 ` Bart De Schuymer
2012-02-10 12:17 ` Joerg Willmann
0 siblings, 1 reply; 8+ messages in thread
From: Bart De Schuymer @ 2012-02-09 19:22 UTC (permalink / raw)
To: joe; +Cc: netfilter-devel
Op 3/02/2012 8:21, joe@clnt.de schreef:
> What I've seen is that ebt_among extension of ebtables uses
> __alignof__(_xt_align) while the corresponding kernel module uses
> __alignof__(ebt_replace) to determin the alignment in EBT_ALIGN().
>
> These are the results of these values on different platforms:
>
> x86 x86_64 ppc
> __alignof__(_xt_align) 4 8 8
> __alignof__(ebt_replace) 4 8 4
>
> So I assume here we can see why ebtales fails to add rules which use the
> among extension.
>
> I'm using kernel 2.6.33 and ebtables 2.0.10-4
>
> Is this a known issue or are there any suggestions how to circumvent this
> problem?
> Thankyou very much.
The userspace alignment was changed to _xt_align to fix an alignment
issue on a userspace32-kernel64 system (I think it was for an ARM
device). So userspace must be right. The kernel alignment macro needs to
change so it also uses _xt_align instead of ebt_replace. The userspace
changes date back from June 29, 2009.
Can you do these changes and provide a patch?
cheers,
Bart
--
Bart De Schuymer
www.artinalgorithms.be
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: alignment problem with ebt_among on ppc
2012-02-09 19:22 ` Bart De Schuymer
@ 2012-02-10 12:17 ` Joerg Willmann
2012-02-10 17:39 ` Jan Engelhardt
2012-02-14 18:31 ` Bart De Schuymer
0 siblings, 2 replies; 8+ messages in thread
From: Joerg Willmann @ 2012-02-10 12:17 UTC (permalink / raw)
To: Bart De Schuymer; +Cc: netfilter-devel
On Thu, 9 Feb 2012, Bart De Schuymer wrote:
> Op 3/02/2012 8:21, joe@clnt.de schreef:
>> What I've seen is that ebt_among extension of ebtables uses
>> __alignof__(_xt_align) while the corresponding kernel module uses
>> __alignof__(ebt_replace) to determin the alignment in EBT_ALIGN().
>>
>> These are the results of these values on different platforms:
>>
>> x86 x86_64 ppc
>> __alignof__(_xt_align) 4 8 8
>> __alignof__(ebt_replace) 4 8 4
>>
>> So I assume here we can see why ebtales fails to add rules which use the
>> among extension.
>>
>> I'm using kernel 2.6.33 and ebtables 2.0.10-4
>>
>> Is this a known issue or are there any suggestions how to circumvent this
>> problem?
>> Thankyou very much.
>
> The userspace alignment was changed to _xt_align to fix an alignment issue on
> a userspace32-kernel64 system (I think it was for an ARM device). So
> userspace must be right. The kernel alignment macro needs to change so it
> also uses _xt_align instead of ebt_replace. The userspace changes date back
> from June 29, 2009.
> Can you do these changes and provide a patch?
>
Thank you very much for the input. I did the proposed changes which solved
my problem.
See below for the patch (hopefully it's the way you expect it...)
Best regards,
Joerg
---
diff -rupN a/include/linux/netfilter_bridge/ebtables.h
b/include/linux/netfilter_bridge/ebtables.h
--- a/include/linux/netfilter_bridge/ebtables.h 2010-08-02
19:27:18.000000000 +0200
+++ b/include/linux/netfilter_bridge/ebtables.h 2012-02-10
12:01:56.464822589 +0100
@@ -285,8 +285,8 @@ struct ebt_table {
struct module *me;
};
-#define EBT_ALIGN(s) (((s) + (__alignof__(struct ebt_replace)-1)) & \
- ~(__alignof__(struct ebt_replace)-1))
+#define EBT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) & \
+ ~(__alignof__(struct _xt_align)-1))
extern struct ebt_table *ebt_register_table(struct net *net,
const struct ebt_table
*table);
extern void ebt_unregister_table(struct ebt_table *table);
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: alignment problem with ebt_among on ppc
2012-02-10 12:17 ` Joerg Willmann
@ 2012-02-10 17:39 ` Jan Engelhardt
2012-02-14 18:31 ` Bart De Schuymer
1 sibling, 0 replies; 8+ messages in thread
From: Jan Engelhardt @ 2012-02-10 17:39 UTC (permalink / raw)
To: Joerg Willmann; +Cc: Bart De Schuymer, netfilter-devel
On Friday 2012-02-10 13:17, Joerg Willmann wrote:
> On Thu, 9 Feb 2012, Bart De Schuymer wrote:
>
>> Op 3/02/2012 8:21, joe@clnt.de schreef:
>>> What I've seen is that ebt_among extension of ebtables uses
>>> __alignof__(_xt_align) while the corresponding kernel module uses
>>> __alignof__(ebt_replace) to determin the alignment in EBT_ALIGN().
>>>
>>> These are the results of these values on different platforms:
>>>
>>> x86 x86_64 ppc
>>> __alignof__(_xt_align) 4 8 8
>>> __alignof__(ebt_replace) 4 8 4
>>>
>>> So I assume here we can see why ebtales fails to add rules which use the
>>> among extension.
>>>
>>> I'm using kernel 2.6.33 and ebtables 2.0.10-4
>>>
>>> Is this a known issue or are there any suggestions how to circumvent this
>>> problem?
>>> Thankyou very much.
>>
>> The userspace alignment was changed to _xt_align to fix an alignment issue on
>> a userspace32-kernel64 system (I think it was for an ARM device). So userspace
>> must be right. The kernel alignment macro needs to change so it also uses
>> _xt_align instead of ebt_replace. The userspace changes date back from June
>> 29, 2009.
>> Can you do these changes and provide a patch?
>>
> Thank you very much for the input. I did the proposed changes which solved my
> problem.
> See below for the patch (hopefully it's the way you expect it...)
>
> -#define EBT_ALIGN(s) (((s) + (__alignof__(struct ebt_replace)-1)) & \
> - ~(__alignof__(struct ebt_replace)-1))
> +#define EBT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) & \
> + ~(__alignof__(struct _xt_align)-1))
I think we had such a patch before (and the fact that it was not apply
probably tells some story), let me check the history books..
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: alignment problem with ebt_among on ppc
2012-02-10 12:17 ` Joerg Willmann
2012-02-10 17:39 ` Jan Engelhardt
@ 2012-02-14 18:31 ` Bart De Schuymer
2012-02-14 19:56 ` Pablo Neira Ayuso
1 sibling, 1 reply; 8+ messages in thread
From: Bart De Schuymer @ 2012-02-14 18:31 UTC (permalink / raw)
To: Joerg Willmann; +Cc: netfilter-devel
Op 10/02/2012 13:17, Joerg Willmann schreef:
> On Thu, 9 Feb 2012, Bart De Schuymer wrote:
>
>> Op 3/02/2012 8:21, joe@clnt.de schreef:
>>> What I've seen is that ebt_among extension of ebtables uses
>>> __alignof__(_xt_align) while the corresponding kernel module uses
>>> __alignof__(ebt_replace) to determin the alignment in EBT_ALIGN().
>>>
>>> These are the results of these values on different platforms:
>>>
>>> x86 x86_64 ppc
>>> __alignof__(_xt_align) 4 8 8
>>> __alignof__(ebt_replace) 4 8 4
>>>
>>> So I assume here we can see why ebtales fails to add rules which use
>>> the
>>> among extension.
>>>
>>> I'm using kernel 2.6.33 and ebtables 2.0.10-4
>>>
>>> Is this a known issue or are there any suggestions how to circumvent
>>> this
>>> problem?
>>> Thankyou very much.
>>
>> The userspace alignment was changed to _xt_align to fix an alignment
>> issue on a userspace32-kernel64 system (I think it was for an ARM
>> device). So userspace must be right. The kernel alignment macro needs
>> to change so it also uses _xt_align instead of ebt_replace. The
>> userspace changes date back from June 29, 2009.
>> Can you do these changes and provide a patch?
>>
> Thank you very much for the input. I did the proposed changes which
> solved my problem.
> See below for the patch (hopefully it's the way you expect it...)
>
> Best regards,
> Joerg
>
> ---
>
>
> diff -rupN a/include/linux/netfilter_bridge/ebtables.h
> b/include/linux/netfilter_bridge/ebtables.h
> --- a/include/linux/netfilter_bridge/ebtables.h 2010-08-02
> 19:27:18.000000000 +0200
> +++ b/include/linux/netfilter_bridge/ebtables.h 2012-02-10
> 12:01:56.464822589 +0100
> @@ -285,8 +285,8 @@ struct ebt_table {
> struct module *me;
> };
>
> -#define EBT_ALIGN(s) (((s) + (__alignof__(struct ebt_replace)-1)) & \
> - ~(__alignof__(struct ebt_replace)-1))
> +#define EBT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) & \
> + ~(__alignof__(struct _xt_align)-1))
> extern struct ebt_table *ebt_register_table(struct net *net,
> const struct ebt_table *table);
> extern void ebt_unregister_table(struct ebt_table *table);
>
>
This patch is fine by me... Please apply.
Signed-off by: Bart De Schuymer <bdschuym@pandora.be>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: alignment problem with ebt_among on ppc
2012-02-14 18:31 ` Bart De Schuymer
@ 2012-02-14 19:56 ` Pablo Neira Ayuso
2012-02-21 12:32 ` Pablo Neira Ayuso
0 siblings, 1 reply; 8+ messages in thread
From: Pablo Neira Ayuso @ 2012-02-14 19:56 UTC (permalink / raw)
To: Bart De Schuymer; +Cc: Joerg Willmann, netfilter-devel
On Tue, Feb 14, 2012 at 07:31:03PM +0100, Bart De Schuymer wrote:
> Op 10/02/2012 13:17, Joerg Willmann schreef:
> >On Thu, 9 Feb 2012, Bart De Schuymer wrote:
> >
> >>Op 3/02/2012 8:21, joe@clnt.de schreef:
> >>>What I've seen is that ebt_among extension of ebtables uses
> >>>__alignof__(_xt_align) while the corresponding kernel module uses
> >>>__alignof__(ebt_replace) to determin the alignment in EBT_ALIGN().
> >>>
> >>>These are the results of these values on different platforms:
> >>>
> >>>x86 x86_64 ppc
> >>>__alignof__(_xt_align) 4 8 8
> >>>__alignof__(ebt_replace) 4 8 4
> >>>
> >>>So I assume here we can see why ebtales fails to add rules
> >>>which use the
> >>>among extension.
> >>>
> >>>I'm using kernel 2.6.33 and ebtables 2.0.10-4
> >>>
> >>>Is this a known issue or are there any suggestions how to
> >>>circumvent this
> >>>problem?
> >>>Thankyou very much.
> >>
> >>The userspace alignment was changed to _xt_align to fix an
> >>alignment issue on a userspace32-kernel64 system (I think it was
> >>for an ARM device). So userspace must be right. The kernel
> >>alignment macro needs to change so it also uses _xt_align
> >>instead of ebt_replace. The userspace changes date back from
> >>June 29, 2009.
> >>Can you do these changes and provide a patch?
> >>
> >Thank you very much for the input. I did the proposed changes
> >which solved my problem.
> >See below for the patch (hopefully it's the way you expect it...)
> >
> >Best regards,
> >Joerg
> >
> >---
> >
> >
> >diff -rupN a/include/linux/netfilter_bridge/ebtables.h
> >b/include/linux/netfilter_bridge/ebtables.h
> >--- a/include/linux/netfilter_bridge/ebtables.h 2010-08-02
> >19:27:18.000000000 +0200
> >+++ b/include/linux/netfilter_bridge/ebtables.h 2012-02-10
> >12:01:56.464822589 +0100
> >@@ -285,8 +285,8 @@ struct ebt_table {
> > struct module *me;
> > };
> >
> >-#define EBT_ALIGN(s) (((s) + (__alignof__(struct ebt_replace)-1)) & \
> >- ~(__alignof__(struct ebt_replace)-1))
> >+#define EBT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) & \
> >+ ~(__alignof__(struct _xt_align)-1))
> > extern struct ebt_table *ebt_register_table(struct net *net,
> > const struct ebt_table *table);
> > extern void ebt_unregister_table(struct ebt_table *table);
> >
> >
> This patch is fine by me... Please apply.
>
> Signed-off by: Bart De Schuymer <bdschuym@pandora.be>
I'd appreciate if you can send me a well-formed patch that I can
easily apply, it's composed of:
1) title
2) description
3) signed-off-by section
4) patch
Thank you!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: alignment problem with ebt_among on ppc
2012-02-14 19:56 ` Pablo Neira Ayuso
@ 2012-02-21 12:32 ` Pablo Neira Ayuso
0 siblings, 0 replies; 8+ messages in thread
From: Pablo Neira Ayuso @ 2012-02-21 12:32 UTC (permalink / raw)
To: Bart De Schuymer; +Cc: Joerg Willmann, netfilter-devel
On Tue, Feb 14, 2012 at 08:56:15PM +0100, Pablo Neira Ayuso wrote:
> > This patch is fine by me... Please apply.
> >
> > Signed-off by: Bart De Schuymer <bdschuym@pandora.be>
>
> I'd appreciate if you can send me a well-formed patch that I can
> easily apply, it's composed of:
>
> 1) title
>
> 2) description
>
> 3) signed-off-by section
>
> 4) patch
>
> Thank you!
OK, you don't seem to make my life easy :-(
I have enqueued the following patch for the net tree:
commit 88ba136d6635b262f77cc418d536115fb8e4d4ab
Author: Joerg Willmann <joe@clnt.de>
Date: Tue Feb 21 13:26:14 2012 +0100
netfilter: ebtables: fix alignment problem in ppc
http://1984.lsi.us.es/git/net/log/?h=nf
Please, rise your hand if you find any problem with it. I'll pass it
soon to davem.
^ permalink raw reply [flat|nested] 8+ messages in thread
* alignment problem with ebt_among on ppc
@ 2012-02-08 9:27 Joerg Willmann
0 siblings, 0 replies; 8+ messages in thread
From: Joerg Willmann @ 2012-02-08 9:27 UTC (permalink / raw)
To: netfilter
Hi,
I'm currently faced with an alignment problem of ebt_among with ppc
architecture.
Trying to add a rule using the among extension leads to the following
syslog entry:
ebtables: among: wrong size: 2104 against expected 2100, rounded to 2100
I tried to analyze the problem and I observed that there have been several
problems regarding EBT_ALIGN in the past with x86_64 and sparc
architecure. But I didn't find anything about ppc.
What I've seen is that ebt_among extension of ebtables uses
__alignof__(_xt_align) while the corresponding kernel module uses
__alignof__(ebt_replace) to determin the alignment in EBT_ALIGN().
These are the results of these values on different platforms:
x86 x86_64 ppc
__alignof__(_xt_align) 4 8 8
__alignof__(ebt_replace) 4 8 4
So I assume here we can see why ebtales fails to add rules which use the
among extension.
I'm using kernel 2.6.33 and ebtables 2.0.10-4
Is this a known issue or are there any suggestions how to circumvent this
problem?
Thankyou very much.
Best regards
Joerg
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-02-21 12:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-03 7:21 alignment problem with ebt_among on ppc joe
2012-02-09 19:22 ` Bart De Schuymer
2012-02-10 12:17 ` Joerg Willmann
2012-02-10 17:39 ` Jan Engelhardt
2012-02-14 18:31 ` Bart De Schuymer
2012-02-14 19:56 ` Pablo Neira Ayuso
2012-02-21 12:32 ` Pablo Neira Ayuso
2012-02-08 9:27 Joerg Willmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.