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, 15 Oct 2013 16:25:40 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Liu, Chuansheng" <chuansheng.liu@...el.com>,
	Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] bug: Use xchg() to update WARN_ON_ONCE() static
 variable

On Tue, 15 Oct 2013 22:18:48 +0200
Frederic Weisbecker <fweisbec@...il.com> wrote:


> How about just updating __warned without a cmpxchg. It's not that critical
> if the update is not seen immediately to other CPUs. OTOH it's critical
> that's it is visible immediately to the current CPU

Well, I didn't use cmpxchg() I used xchg() which is actually quite
faster.

> 
> I mean some warrning can be hard to reproduce and happen to some users
> while staying for several kernel releases. If it's repetitive, the xchg
> might impact the performance.

But do we care about that? A WARN_ON() means the kernel (or hardware)
is buggy. It should be fixed.

But Andrew's ONCE() request is something we would want to avoid the
xchg() every time.

> 
> I may be overly paranoid, but I think barrier() (so that at least
> we don't recurse locally) alone would be better.

Heh, Boris is giving me the same argument on IRC ;-)

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ