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, 20 Sep 2011 08:44:56 -0400
From:	Valdis.Kletnieks@...edu
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Christoph Lameter <cl@...two.org>, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [RFC][PATCH 0/5] Introduce checks for preemptable code for this_cpu_read/write()

On Mon, 19 Sep 2011 23:06:17 EDT, Steven Rostedt said:

> It is really confusing to know which version to use. I'm confused by the
> this_cpu_*() compared with __this_cpu_*(). I'm guessing that most places
> should use __this_cpu*(). But really this_cpu() should be the default,
> and the places that can have it outside of preemption should have
> another name. Maybe use the raw_this_cpu() or safe_this_cpu(), as there
> is an irqsafe_this_cpu(). Maybe make a preemptsafe_cpu_*(). There should
> only be a very few locations that are OK to have preemption enabled when
> calling the this_cpu() code. Lets have those have the funny names and
> not be the default "this_cpu_*()".

What's the latency hit on those very few locations if we simply put our
collective foot down and not support a preemptable version of this_cpu_*()?
"Yes, you *could* preempt here, but for our collective sanity that's not
supported"...

> All this_cpu*() code, except the funny named ones, should make sure
> preemption is disabled, otherwise give a nasty warning. As that is
> usually a bug if you are using a per cpu variable and can migrate away.
> The next reference to that value may be incorrect.

You get a much prettier diffstat if you just nuke the funny named ones. ;)

But of course it's early morning and I'm still caffeine-deficient and probably
overlooking some crucial use case. ;)



Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ