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: <1316488378.29966.35.camel@gandalf.stny.rr.com>
Date:	Mon, 19 Sep 2011 23:12:58 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Christoph Lameter <cl@...ux.com>
Subject: Re: [RFC][PATCH 0/5] Introduce checks for preemptable code for
 this_cpu_read/write()

On Mon, 2011-09-19 at 19:20 -0700, Andi Kleen wrote:
> Steven Rostedt <rostedt@...dmis.org> writes:
> 
> > I just found out that the this_cpu_*() functions do not perform the
> > test to see if the usage is in atomic or not. Thus, the blind
> > conversion of the per_cpu(*, smp_processor_id()) and the get_cpu_var()
> > code to this_cpu_*() introduce the regression to detect the hard
> > to find case where a per cpu variable is used in preempt code that
> > migrates and causes bugs.
> 
> 
> Didn't preempt-rt recently get changed to not migrate in kernel-preempt
> regions. How about just fixing the normal preemption to not do this
> either.

Actually, that's part of the issue. RT has made spin_locks not migrate.
But this has also increased the overhead of those same spinlocks. I'm
hoping to do away with the big hammer approach (although Thomas is less
interested in this). I would like to have areas that require per-cpu
variables to be annotated, and not have every spinlock disable
preemption.

> 
> Then all these complications wouldn't be necessary and a whole lot 
> of code related to this could be removed too, and you would still
> have less bugs.

Note, that normal preemption doesn't migrate either. If you disable
preemption, you don't migrate.

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