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]
Date:	Wed, 13 Jan 2016 13:37:33 -0500
From:	Sasha Levin <sasha.levin@...cle.com>
To:	Pablo Neira Ayuso <pablo@...filter.org>
Cc:	Florian Westphal <fw@...len.de>, kaber@...sh.net,
	kadlec@...ckhole.kfki.hu, davem@...emloft.net,
	netfilter-devel@...r.kernel.org, coreteam@...filter.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netfilter: nf_conntrack: use safer way to lock all
 buckets

On 01/13/2016 11:54 AM, Pablo Neira Ayuso wrote:
> On Sun, Jan 10, 2016 at 02:06:37AM +0100, Florian Westphal wrote:
>> > Sasha Levin <sasha.levin@...cle.com> wrote:
>>> > > Fix this by using a global lock and synchronize all buckets on it when we
>>> > > need to lock them all. This is pretty heavyweight, but is only done when we
>>> > > need to resize the hashtable, and that doesn't happen often enough (or at all).
>> > 
>>> > > diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
>>> > > index 3cb3cb8..3c008ce 100644
>>> > > --- a/net/netfilter/nf_conntrack_core.c
>>> > > +++ b/net/netfilter/nf_conntrack_core.c
>>> > > @@ -66,6 +66,32 @@ EXPORT_SYMBOL_GPL(nf_conntrack_locks);
>>> > >  __cacheline_aligned_in_smp DEFINE_SPINLOCK(nf_conntrack_expect_lock);
>>> > >  EXPORT_SYMBOL_GPL(nf_conntrack_expect_lock);
>>> > >  
>>> > > +spinlock_t nf_conntrack_locks_all_lock;
>>> > > +bool nf_conntrack_locks_all;
>> > 
>> > Seems both of these can be static and __read_mostly too --
>> > as you already note resizing virtually never happens.
>> >
>> > Otherwise:
>> > Reviewed-by: Florian Westphal <fw@...len.de>
> Sasha, would you resubmit addressing Florian's feedback?

Yup, sorry - still catching up with the holidays vacation :(


Thanks,
Sasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ