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:   Sat, 22 Dec 2018 23:31:07 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Deepa Dinamani <deepa.kernel@...il.com>, davem@...emloft.net,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     viro@...iv.linux.org.uk, arnd@...db.de, y2038@...ts.linaro.org
Subject: Re: [PATCH] sock: Make sock->sk_tstamp thread-safe



On 12/21/2018 12:27 PM, Deepa Dinamani wrote:
> Al Viro mentioned that there is probably a race condition
> lurking in accesses of sk_tstamp on 32-bit machines.
> 
> sock->sk_tstamp is of type ktime_t which is always an s64.
> On a 32 bit architecture, we might run into situations of
> unsafe access as the access to the field becomes non atomic.
> 
> Use seqlocks for synchronization.
> This allows us to avoid using spinlocks for readers as
> readers do not need mutual exclusion.
>

Hi Deepa

Please come up with something that has zero added costs for 64bit kernels.

Most of us do not really care about 32bit kernels anymore, so we do not want to slow
down 64bits kernels for such things.

Look at include/linux/u64_stats_sync.h for initial thoughts.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ