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: <b150007f18bca17bcff59161dca81a374465b6eb.camel@redhat.com>
Date:   Thu, 15 Nov 2018 12:43:59 +0100
From:   Davide Caratti <dcaratti@...hat.com>
To:     Eric Dumazet <eric.dumazet@...il.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        "David S. Miller" <davem@...emloft.net>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock
 in the data path

On Wed, 2018-11-14 at 22:46 -0800, Eric Dumazet wrote:
> 
> On 09/13/2018 10:29 AM, Davide Caratti wrote:
> > use RCU instead of spinlocks, to protect concurrent read/write on
> > act_police configuration. This reduces the effects of contention in the
> > data path, in case multiple readers are present.
> > 
> > Signed-off-by: Davide Caratti <dcaratti@...hat.com>
> > ---
> >  net/sched/act_police.c | 156 ++++++++++++++++++++++++-----------------
> >  1 file changed, 92 insertions(+), 64 deletions(-)
> > 
> 
> I must be missing something obvious with this patch.

hello Eric,

On the opposite, I missed something obvious when I wrote that patch: there
is a race condition on tcfp_toks, tcfp_ptoks and tcfp_t_c: thank you for
noticing it.

These variables still need to be protected with a spinlock. I will do a
patch and evaluate if 'act_police' is still faster than a version where   
2d550dbad83c ("net/sched: .... ") is reverted, and share results in the
next hours.

Ok?

-- 
davide

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ