lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100921093853.GA8664@ff.dom.local>
Date:	Tue, 21 Sep 2010 09:38:53 +0000
From:	Jarek Poplawski <jarkao2@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Nick Bowler <nbowler@...iptictech.com>,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: Regression, bisected: reference leak with IPSec since ~2.6.31

On Tue, Sep 21, 2010 at 11:21:00AM +0200, Eric Dumazet wrote:
> Le mardi 21 septembre 2010 ?? 09:12 +0000, Jarek Poplawski a écrit :
> > On 2010-09-20 23:31, Eric Dumazet wrote:
> > ...
> > > @@ -510,11 +509,13 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
> > >  				goto slow_path;
> > >  
> > >  			BUG_ON(frag->sk);
> > > -			if (skb->sk) {
> > > +		}
> > > +		if (skb->sk) {
> > > +			skb_walk_frags(skb, frag) {
> > >  				frag->sk = skb->sk;
> > >  				frag->destructor = sock_wfree;
> > 
> > Nice catch, but it seems doing it in the first loop as now, and
> > reverting changes before goto slow_path might be more optimal here.
> > 
> 
> I thought of this, but found this function already very complex.
> 
> Once everything is in cpu caches, the added loop is very cheap.

I hope you're right with this.

> 
> I liked the :
> 
> <check everything without changing state>
> if something wrong
> 	goto slow_path
> else
> 	<OK, lets do destructive things>
> 

But it's an optimization of the "unlikely" case btw. ;-)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ