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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110607125809.GA23214@somewhere>
Date:	Tue, 7 Jun 2011 14:58:13 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	Milton Miller <miltonm@....com>, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [1/4] rcu: Detect uses of rcu read side in extended quiescent
 states

On Mon, Jun 06, 2011 at 09:40:05PM -0700, Paul E. McKenney wrote:> 
> The bit I am missing is how to distinguish between spinlocks (where
> sleeping is illegal) and mutexes (where sleeping is perfectly fine).
> We could teach lockdep the difference, I suppose, but it is not clear
> to me that it is worth it.

Ah, in fact it doesn't pass through any lockdep check.

It's only a function called might_sleep() that is placed in functions
that can sleep. And inside might_sleep() it checks whether it is in a preemptible
area. So it's actually locking-agnostic, it only relies on the preempt_count
and some more for the preempt rcu cases.

I think it is called CONFIG_DEBUG_SPINLOCK_SLEEP because it was first used
for spinlock debugging purposes. But then it has a broader use now: sleep
inside preemptible section, sleep inside interrupts, sleep inside rcu.

It certainly deserves a rename, like CONFIG_DEBUG_ILLEGAL_SLEEP.

> 
> In contrast, with RCU, this is straightforward -- check for rcu_sched
> and rcu_bh, but not SRCU.
> 
> 							Thanx, Paul
> 
--
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