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:	Wed, 6 Sep 2006 08:54:51 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Andrew Morton <akpm@...l.org>, linux-kernel@...r.kernel.org,
	Arjan van de Ven <arjan@...radead.org>,
	Daniel Walker <dwalker@...sta.com>,
	Hua Zhong <hzhong@...il.com>
Subject: Re: lockdep oddity

> > > > The reason is that the BUILD_LOCK_OPS macros in kernel/lockdep.c 
> > > > don't contain any of the *_acquire calls, while all of the _unlock 
> > > > functions contain a *_release call. Hence I get immediately 
> > > > unbalanced locks.
> > > 
> > > hmmm ... that sounds like a bug. Weird - i recently ran 
> > > PREEMPT+SMP+LOCKDEP kernels and didnt notice this.
> > 
> > ok, the reason i didnt find this problem is because this is fixed in 
> > my tree, but i didnt realize that it's a fix also for upstream ...
> 
> actually ... it works fine in the upstream kernel due to this:
> 
>   * If lockdep is enabled then we use the non-preemption spin-ops
>   * even on CONFIG_PREEMPT, because lockdep assumes that interrupts are
>   * not re-enabled during lock-acquire (which the preempt-spin-ops do):
>   */
>  #if !defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) || \
>          defined(CONFIG_DEBUG_LOCK_ALLOC)
> 
> so i'm wondering, how did you you manage to get into the 
> BUILD_LOCK_OPS() branch?

That seems to be code that isn't upstream. 2.6.18-rc5-mm1 as well as
Linus' current git tree have this:

/*
 * If lockdep is enabled then we use the non-preemption spin-ops
 * even on CONFIG_PREEMPT, because lockdep assumes that interrupts are
 * not re-enabled during lock-acquire (which the preempt-spin-ops do):
 */
#if !defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) || \
        defined(CONFIG_PROVE_LOCKING)

And yes, using CONFIG_DEBUG_LOCK_ALLOC instead of CONFIG_PROVE_LOCKING fixes
this for me :)
-
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