Re: [netfilter-core] [PATCH] no __initdata in netfilter?
From: Harald Welte
Date: Tue Dec 14 2004 - 13:53:57 EST
On Tue, Dec 14, 2004 at 07:39:11PM +0100, Andries Brouwer wrote:
> > If we _know_ that it works, and there is no bug, we could just add a
> > comment "This is handled correctly, since the ip_tables core copies the
> > data just as rulesets comming from userspace."
>
> I think that argument is valid only when satisfying the static tool
> is especially cumbersome or inefficient, requires ugly code, etc.
> In most cases a trivial rewrite will suffice, and the result is cleaner
> code, easier to maintain, fewer bugs.
yes, and that rewrite is what I did with the patch. Not really trivial,
but a small change.
Also, you only removed __initdata from ip_tables, but not arp_tables and
ip6_tables (which should have hit the same trigger in the tool)
> You say "but today nothing is wrong". But the longer the reasoning is,
> the easier one of the steps in the argument will be broken by some
> trivial change. By someone who did not know about all the invariants
> required by a certain piece of code.
Yes, but we're not talking about VM or filesystems, but a specific
function used by ip_tables internally.
I understand your point, though I think this is one of the cases where
your arguments apply the least. OTOTH, the __initdata structures we're
talking about are fairly big, space that you probably won't waste on
your embedded dsl router/firewall.
> > or alternatively pick up the (incremental) change attached to this mail.
> > I hope this makes your checker not spit any warnings.
>
> I checked, and indeed, no warnings for this patch.
great.
> But that is the only thing I checked. I would never submit it.
I checked that it compiles ;) The changes are fairly trivial.
> Probably you should send it to davem and see whether he likes it.
We'll include it with the next patchset that goes to davem for mainline
inclusion.
> Andries
--
- Harald Welte <laforge@xxxxxxxxxxxxx> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
Attachment:
signature.asc
Description: Digital signature