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:	Wed, 11 Mar 2015 21:21:12 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	netdev@...r.kernel.org, salo@...gle.com
Subject: Re: [PATCH net-next] net: add real socket cookies

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Wed, 11 Mar 2015 15:30:35 -0700

> Note that sk_clone_lock() really does the clear for us :
> 
> net/core/sock.c:1541:		atomic64_set(&newsk->sk_cookie, 0);
> 
> atomic_cmpxchg() is needed here in case a concurrent dumper already
> caught the new socket.

How is newsk visible at this moment?

It is freshly allocated, and not present in any tables.  Nothing even
indirectly links to it at this point.

Visibility only happens after we return from this function, in
routines such as tcp_v4_syn_recv_sock() which do the hash table
insertion.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ