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: <1392839209.18849.20.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Wed, 19 Feb 2014 11:46:49 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc:	Florian Westphal <fw@...len.de>,
	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH -next] net: tcp: add mib counters to track zero window
 transitions

On Wed, 2014-02-19 at 20:30 +0100, Hannes Frederic Sowa wrote:

> NET_STATS only use 32 bit counter and thus need not be protected with a
> seqlock on 32 bit platforms. As such, it does not matter, but e.g. the IP
> counter are prone to deadlocks if used with wrong postfix because of 64 bit
> counter thus protected by seqlock.
> 
> A pitty that the _STATS_BH postfixes have the opposite meaning of the bottom
> _bh postfixes.
> 
> Basically always safe is _STATS and if we are sure we can omit the bh disable
> call because we only call the function from bh, we can use _STATS_BH calls.

Using __this_cpu_inc() is not safe in preemptable contexts.

Sure, x86 doesn't care, but other arches might.

Fortunately LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES can be incremented
only for a retransmit, and they should always happen from BH.

Better avoid the confusion for this ultra rare case, I'll send a patch.


--
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