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]
Date:   Tue, 5 Nov 2019 08:50:55 -0800
From:   Eric Dumazet <edumazet@...gle.com>
To:     Deepa Dinamani <deepa.kernel@...il.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH net] net: prevent load/store tearing on sk->sk_stamp

On Tue, Nov 5, 2019 at 8:25 AM Deepa Dinamani <deepa.kernel@...il.com> wrote:

> I do not see any harm with this. Does it cause performance degradation?
>

It does not change compiler output, at least for common GCC versions.

It would change things if a hypothetical caller would do for example :

ktime_t res;

res = sock_read_timestamp(sk);
res = sock_read_timestamp(sk);

Since without  the READ_ONCE(), compiler could remove the first instance.

> Acked-by: Deepa Dinamani <deepa.kernel@...il.com>
>
> -Deepa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ