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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iLRkPu6XVhcwridPTrPRtfwQu61jdKZGcZ7aOXRkJy0zQ@mail.gmail.com>
Date:   Sun, 23 Oct 2022 14:33:02 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        eric.dumazet@...il.com, syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net 2/2] kcm: annotate data-races around kcm->rx_wait

On Sat, Oct 22, 2022 at 7:46 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
>
> On Thu, Oct 20, 2022 at 10:45:12PM +0000, Eric Dumazet wrote:
> > kcm->rx_psock can be read locklessly in kcm_rfree().
>
> Copy-n-paste typo here.
>
> > Annotate the read and writes accordingly.
>
> I wonder why not simply acquire mux->rx_lock earlier?

I would think kcm_rfree() is called very often (per skb)

Grabbing the spinlock would add a performance regression.

READ_ONCE()  is a no brainer here.

>
> Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ