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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080911.150006.53056393.davem@davemloft.net>
Date:	Thu, 11 Sep 2008 15:00:06 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	paulmck@...ux.vnet.ibm.com
Cc:	herbert@...dor.apana.org.au, timo.teras@....fi,
	netdev@...r.kernel.org
Subject: Re: xfrm_state locking regression...

From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Date: Thu, 11 Sep 2008 14:24:59 -0700

> On Wed, Sep 10, 2008 at 12:33:12AM +1000, Herbert Xu wrote:
> > On Mon, Sep 08, 2008 at 05:25:13PM -0700, David Miller wrote:
> > > 
> > > The only comment I would make is that maybe it's a bit excessive
> > > to trigger the GC worker every time we walk the states.
> > 
> > Good point!
> > 
> > I've avoided the memory barrier by simply extending the mutexed
> > section in the GC to cover the list splicing.  Here's the updated
> > patch:
> > 
> > ipsec: Use RCU-like construct for saved state within a walk
> > 
> > Now that we save states within a walk we need synchronisation
> > so that the list the saved state is on doesn't disappear from
> > under us.
> > 
> > As it stands this is done by keeping the state on the list which
> > is bad because it gets in the way of the management of the state
> > life-cycle.
> > 
> > An alternative is to make our own pseudo-RCU system where we use
> > counters to indicate which state can't be freed immediately as
> > it may be referenced by an ongoing walk when that resumes.
> 
> There is only one reader at a time, right?  Otherwise, I don't see how
> the increments and reads of xfrm_state_walk_completed line up.

The RTNL semaphore is held across the modifications of the counters.
--
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