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: <trinity-a100658c-7fd5-47b3-ab3f-1f0a80774ccc-1480091457793@3capp-gmx-bs57>
Date:   Fri, 25 Nov 2016 17:30:57 +0100
From:   "Lino Sanfilippo" <LinoSanfilippo@....de>
To:     "Eric Dumazet" <eric.dumazet@...il.com>
Cc:     "David Laight" <David.Laight@...LAB.COM>,
        "David Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        "Tariq Toukan" <tariqt@...lanox.com>
Subject: Aw: Re: [PATCH] mlx4: give precise rx/tx bytes/packets counters

Hi,


> 
> The READ_ONCE() are documenting the fact that no lock is taken to fetch
> the stats, while another cpus might being changing them.
> 
> I had no answer yet from https://patchwork.ozlabs.org/patch/698449/
> 
> So I thought it was not needed to explain this in the changelog, given
> that it apparently is one of the few things that can block someone to
> understand one of my changes :/
> 
> Apparently nobody really understands READ_ONCE() purpose, it is really a
> pity we have to explain this over and over.
> 

Even at the risk of showing once more a lack of understanding for READ_ONCE():
Does not a READ_ONCE() have to e paired with some kind of WRITE_ONCE()? 
Furthermore: there a quite some network drivers that ensure visibility of 
the descriptor queue indices between xmit and xmit completion function by means of
smp barriers. Could all these drivers theoretically be adjusted to use READ_ONCE(),
WRITE_ONCE() for the indices instead?

Regards,
Lino

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ