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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 8 Sep 2016 17:15:45 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Hadar Hen Zion <hadarh@....mellanox.co.il>
Cc:     Hadar Hen Zion <hadarh@...lanox.com>,
        "David S. Miller" <davem@...emloft.net>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Jiri Pirko <jiri@...lanox.com>, Jiri Benc <jbenc@...hat.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Shmulik Ladkani <shmulik.ladkani@...il.com>,
        Tom Herbert <tom@...bertland.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Amir Vadai <amirva@...lanox.com>,
        Or Gerlitz <ogerlitz@...lanox.com>, Amir Vadai <amir@...ai.me>
Subject: Re: [PATCH net-next V6 4/4] net/sched: Introduce act_tunnel_key

On Thu, Sep 8, 2016 at 6:18 AM, Hadar Hen Zion
<hadarh@....mellanox.co.il> wrote:
> On Wed, Sep 7, 2016 at 7:27 PM, Cong Wang <xiyou.wangcong@...il.com> wrote:
>> Also, ->cleanup() should be called with RTNL, no need to
>> take read lock here.
>
> RTNL lock isn't taken when cleanup is called.

Interesting... Then we have some problem here:

1) On the netns exit path, we only take the hashtable
spinlock while detaching it from hashtable, after
all refcnt is gone of course.

2) But, when we modify an existing action in hashtable,
we immediately release the refcnt before modifying it.

Fortunately the netns is refcnt'ed too, so this problem
doesn't show in real world.

If so, then you don't need read lock either, because
refcnt guarantees this call is only called by the last
process? IOW, there is no other possible parallel
writer??

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ