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: <20190613154953.GB2242@nanopsycho>
Date:   Thu, 13 Jun 2019 17:49:53 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Vlad Buslov <vladbu@...lanox.com>
Cc:     netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
        davem@...emloft.net, pablo@...filter.org, alexanderk@...lanox.com,
        pabeni@...hat.com, mlxsw@...lanox.com,
        Jiri Pirko <jiri@...lanox.com>
Subject: Re: [PATCH net] net: sched: flower: don't call synchronize_rcu() on
 mask creation

Thu, Jun 13, 2019 at 04:54:04PM CEST, vladbu@...lanox.com wrote:
>Current flower mask creating code assumes that temporary mask that is used
>when inserting new filter is stack allocated. To prevent race condition
>with data patch synchronize_rcu() is called every time fl_create_new_mask()
>replaces temporary stack allocated mask. As reported by Jiri, this
>increases runtime of creating 20000 flower classifiers from 4 seconds to
>163 seconds. However, this design is no longer necessary since temporary
>mask was converted to be dynamically allocated by commit 2cddd2014782
>("net/sched: cls_flower: allocate mask dynamically in fl_change()").
>
>Remove synchronize_rcu() calls from mask creation code. Instead, refactor
>fl_change() to always deallocate temporary mask with rcu grace period.
>
>Fixes: 195c234d15c9 ("net: sched: flower: handle concurrent mask insertion")
>Reported-by: Jiri Pirko <jiri@...lanox.com>
>Signed-off-by: Vlad Buslov <vladbu@...lanox.com>

Tested-by: Jiri Pirko <jiri@...lanox.com>
Acked-by: Jiri Pirko <jiri@...lanox.com>

Thanks Vlad!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ