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:	Thu, 28 Jun 2012 09:46:47 +0100
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Eric Dumazet" <eric.dumazet@...il.com>,
	"Rick Jones" <rick.jones2@...com>
Cc:	"Ben Greear" <greearb@...delatech.com>,
	"Stephen Hemminger" <shemminger@...tta.com>,
	"Tom Parkin" <tparkin@...alix.com>, <netdev@...r.kernel.org>,
	"James Chapman" <jchapman@...alix.com>
Subject: RE: [PATCH v2] l2tp: use per-cpu variables for u64_stats updates

 
> [1] : LLTX drivers case 
>    since ndo_start_xmit() can be run concurrently by many cpus, safely
> updating an "unsigned long" requires additional hassle :
> 
>    1) Use of a spinlock to protect the update.
>    2) Use atomic_long_t instead of "unsigned long"
>    3) Use percpu data

4) These are statistics so it shouldn't really matter if
   they are out by a small number.  So the errors
   introduced by unlocked updates can probably be ignored.
   So just use 'unsigned long'.

   Might be worth putting in gcc barriers so that the
   load and store instructions aren't separated too far.

	David


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