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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 13 Dec 2015 23:03:43 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Luis Henriques <luis.henriques@...onical.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Steffen Klassert <steffen.klassert@...unet.com>,
	"David S. Miller" <davem@...emloft.net>,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	kernel-team@...ts.ubuntu.com
Subject: Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double
 allocations

On Sun, 2015-12-13 at 14:45 -0800, Eric Dumazet wrote:
> On Sun, 2015-12-13 at 21:49 +0000, Ben Hutchings wrote:
> > On Sun, 2015-12-13 at 13:44 -0800, Eric Dumazet wrote:
> > > On Sun, 2015-12-13 at 21:22 +0000, Ben Hutchings wrote:
> > > > On Sun, 2015-12-13 at 12:43 -0800, Eric Dumazet wrote:
> > > 
> > > > > 1) Sorry Ben, I do not understand the problem you mention.
> > > > >    What is a partially initialized device exactly ?
> > > > 
> > > > A tunnel device which is registered but hasn't had its private
> > > > structure fully initialised yet.
> > > 
> > > And you see this happening after my patch ? I am blind.
> > > 
> > > I am referring to current linux kernel, not to a backport to pre 3.18
> > > kernels, that was not considered when I wrote this patch.
> > > 
> > > By the time ipip6_fb_tunnel_init() is called, dev->tstats had been
> > > already allocated in ipip6_tunnel_init(), so what is missing ?
> > 
> > You moved this initialisation below the registration:
> > 
> > > 	ipip6_tunnel_clone_6rd(sitn->fb_tunnel_dev, sitn);
> > > 	ipip6_fb_tunnel_init(sitn->fb_tunnel_dev);
> 
> Okay, so what is the exact problem you are seeing Ben ?
> 
> ipip6_tunnel_clone_6rd() looks to not contain a fatal race or mem leak.
> 
> Note that ipip6_tunnel_clone_6rd() can be called later from ioctl()
> path.

That holds the rtnl_lock, though.

> ipip6_fb_tunnel_init() must be done once device is ready, as it
> publishes state for packet processing.

OK.

> rcu_assign_pointer(sitn->tunnels_wc[0], tunnel);
> 
> Looks like a rather correct way to register a device : init all fields,
> then publish the RCU protected pointer for packets to catch it.
> 
> Really, I do not see a problem, please elaborate.

Maybe there isn't one in this case.

Ben.

-- 
Ben Hutchings
Life would be so much easier if we could look at the source code.
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ