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: <CAM_iQpV+FMvXQDO8o9=x90ybT87OWrSthaxt6soJ_Mhug=vSzA@mail.gmail.com>
Date:   Wed, 8 May 2019 22:34:39 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Jason Wang <jasowang@...hat.com>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        YueHaibing <yuehaibing@...wei.com>,
        "weiyongjun (A)" <weiyongjun1@...wei.com>,
        Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH net V2] tuntap: synchronize through tfiles array instead
 of tun->numqueues

On Tue, May 7, 2019 at 7:54 PM Jason Wang <jasowang@...hat.com> wrote:
> This is only true if you can make sure tfile[tun->numqueues] is not
> freed. Either my patch or SOCK_RCU_FREE can solve this, but for
> SOCK_RCU_FREE we need do extra careful audit to make sure it doesn't
> break someting. So synchronize through pointers in tfiles[] which is
> already protected by RCU is much more easier. It can make sure no
> dereference from xmit path after synchornize_net(). And this matches the
> assumptions of the codes after synchronize_net().
>

It is hard to tell which sock_put() matches with this synchronize_net()
given the call path is complicated.

With SOCK_RCU_FREE, no such a problem, all sock_put() will be safe.
So to me SOCK_RCU_FREE is much easier to understand and audit.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ