* Re: Iptable loop during kernel startup
[not found] <BFECAF9E178F144FAEF2BF4CE739C668030B5903@exmail1.se.axis.com>
@ 2007-01-10 10:57 ` Patrick McHardy
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2007-01-10 10:57 UTC (permalink / raw)
To: Mikael Starvik
Cc: 'Linux Kernel Mailing List', Edgar Iglesias,
Netfilter Development Mailinglist
Mikael Starvik wrote:
> I have a kernel with
>
> CONFIG_IP_NF_TABLES=y
> CONFIG_IP_NF_FILTER=y
> CONFIG_IP_NF_TARGET_LOG=y
>
> all other NF options are off.
Which iptables/kernel versions are you using?
> During kernel startup I get
> iptables: loop hook 1 pos 00000022
>
> when filter tries to register at module_init.
>
> Any ideas why I get this loop?
Please post your ruleset and the kernel config.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Iptable loop during kernel startup
[not found] <BFECAF9E178F144FAEF2BF4CE739C668044DEB07@exmail1.se.axis.com>
@ 2007-01-10 11:29 ` Mikael Starvik
2007-01-10 12:49 ` Patrick McHardy
2007-01-10 12:58 ` Mikael Starvik
0 siblings, 2 replies; 6+ messages in thread
From: Mikael Starvik @ 2007-01-10 11:29 UTC (permalink / raw)
To: 'Patrick McHardy', Mikael Starvik
Cc: 'Linux Kernel Mailing List', Edgar Iglesias,
'Netfilter Development Mailinglist'
>Which iptables/kernel versions are you using?
2.6.19. After further testing it seams to be a compiler/CPU issue. The exact
same kernelconfig works on ARM. So I have to dig some...
/Mikael
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Iptable loop during kernel startup
2007-01-10 11:29 ` Mikael Starvik
@ 2007-01-10 12:49 ` Patrick McHardy
2007-01-10 12:58 ` Mikael Starvik
1 sibling, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2007-01-10 12:49 UTC (permalink / raw)
To: Mikael Starvik
Cc: 'Linux Kernel Mailing List', Edgar Iglesias,
'Netfilter Development Mailinglist'
Mikael Starvik wrote:
>>Which iptables/kernel versions are you using?
>
>
> 2.6.19. After further testing it seams to be a compiler/CPU issue. The exact
>
> same kernelconfig works on ARM. So I have to dig some...
On which architecture did the error occur? It could be related
to 32 bit compat issues ..
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Iptable loop during kernel startup
2007-01-10 11:29 ` Mikael Starvik
2007-01-10 12:49 ` Patrick McHardy
@ 2007-01-10 12:58 ` Mikael Starvik
2007-01-10 13:05 ` Patrick McHardy
1 sibling, 1 reply; 6+ messages in thread
From: Mikael Starvik @ 2007-01-10 12:58 UTC (permalink / raw)
To: Mikael Starvik, 'Patrick McHardy'
Cc: 'Linux Kernel Mailing List', Edgar Iglesias,
'Netfilter Development Mailinglist'
Ok, this is what happens:
iptable_filter sets up initial_table.
The part that says { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" }
initializes a xt_entry_target struct. target_size gets the value
0x24 and name "".
This is copied to loc_cpu_entry in iptables.c:ipt_register_table()
and translate_table is called
translate_table calls IPT_ENTRY_ITERATE with the
check_entry_function
check_entry does t->u.kernel.target = target;
On this particular architecture u.user.name and u.kernel.target in
struct xt_entry_target has the same address (because of the union). So
name that was previously "" gets mangled here.
check_entry returns into translate_table which calls mark_source_chains
mark_source_chains compares t->target.u.user.name with
IPT_STANDARD_TARGET. name has been mangled above and the comparision
fails. On my ARM platform name has not been mangled (I guess this is
because target and name doesn't share address by I haven't checked).
So... Is it really correct to modify the target pointer there?
/Mikael
-----Original Message-----
From: Mikael Starvik
Sent: Wednesday, January 10, 2007 12:29 PM
To: 'Patrick McHardy'; Mikael Starvik
Cc: 'Linux Kernel Mailing List'; Edgar Iglesias; 'Netfilter Development
Mailinglist'
Subject: RE: Iptable loop during kernel startup
>Which iptables/kernel versions are you using?
2.6.19. After further testing it seams to be a compiler/CPU issue. The exact
same kernelconfig works on ARM. So I have to dig some...
/Mikael
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Iptable loop during kernel startup
[not found] <BFECAF9E178F144FAEF2BF4CE739C668044DEB69@exmail1.se.axis.com>
@ 2007-01-10 13:00 ` Mikael Starvik
0 siblings, 0 replies; 6+ messages in thread
From: Mikael Starvik @ 2007-01-10 13:00 UTC (permalink / raw)
To: 'Patrick McHardy', Mikael Starvik
Cc: 'Linux Kernel Mailing List', Edgar Iglesias,
'Netfilter Development Mailinglist'
The architecture is called CRIS. Its a straightforward 32-bit only arch. The
only special about this architecture that it doesn't force any alignment of
data (so a packed struct and an unpacked struct is always the same).
/Mikael
-----Original Message-----
From: Patrick McHardy [mailto:kaber@trash.net]
Sent: Wednesday, January 10, 2007 1:50 PM
To: Mikael Starvik
Cc: 'Linux Kernel Mailing List'; Edgar Iglesias; 'Netfilter Development
Mailinglist'
Subject: Re: Iptable loop during kernel startup
Mikael Starvik wrote:
>>Which iptables/kernel versions are you using?
>
>
> 2.6.19. After further testing it seams to be a compiler/CPU issue. The
exact
>
> same kernelconfig works on ARM. So I have to dig some...
On which architecture did the error occur? It could be related
to 32 bit compat issues ..
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Iptable loop during kernel startup
2007-01-10 12:58 ` Mikael Starvik
@ 2007-01-10 13:05 ` Patrick McHardy
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2007-01-10 13:05 UTC (permalink / raw)
To: Mikael Starvik
Cc: 'Linux Kernel Mailing List', Edgar Iglesias,
'Netfilter Development Mailinglist'
Mikael Starvik wrote:
> Ok, this is what happens:
>
> iptable_filter sets up initial_table.
> The part that says { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" }
> initializes a xt_entry_target struct. target_size gets the value
> 0x24 and name "".
> This is copied to loc_cpu_entry in iptables.c:ipt_register_table()
> and translate_table is called
> translate_table calls IPT_ENTRY_ITERATE with the
> check_entry_function
> check_entry does t->u.kernel.target = target;
>
> On this particular architecture u.user.name and u.kernel.target in
> struct xt_entry_target has the same address (because of the union). So
> name that was previously "" gets mangled here.
>
> check_entry returns into translate_table which calls mark_source_chains
> mark_source_chains compares t->target.u.user.name with
> IPT_STANDARD_TARGET. name has been mangled above and the comparision
> fails. On my ARM platform name has not been mangled (I guess this is
> because target and name doesn't share address by I haven't checked).
>
> So... Is it really correct to modify the target pointer there?
Please try the latest -stable kernel, this should be fixed already.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-01-10 13:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <BFECAF9E178F144FAEF2BF4CE739C668030B5903@exmail1.se.axis.com>
2007-01-10 10:57 ` Iptable loop during kernel startup Patrick McHardy
[not found] <BFECAF9E178F144FAEF2BF4CE739C668044DEB07@exmail1.se.axis.com>
2007-01-10 11:29 ` Mikael Starvik
2007-01-10 12:49 ` Patrick McHardy
2007-01-10 12:58 ` Mikael Starvik
2007-01-10 13:05 ` Patrick McHardy
[not found] <BFECAF9E178F144FAEF2BF4CE739C668044DEB69@exmail1.se.axis.com>
2007-01-10 13:00 ` Mikael Starvik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).