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]
Date:	Mon, 29 Feb 2016 10:25:22 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Sasha Levin <sasha.levin@...cle.com>
Cc:	aryabinin@...tuozzo.com, krinkin.m.u@...il.com, mingo@...e.hu,
	peterz@...radead.org, linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: +
 kernel-locking-lockdepc-make-lockdep-initialize-itself-on-demand.patch added
 to -mm tree


* Ingo Molnar <mingo@...nel.org> wrote:

> 
> * Andrew Morton <akpm@...ux-foundation.org> wrote:
> 
> > On Tue, 9 Feb 2016 12:12:29 +0100 Ingo Molnar <mingo@...nel.org> wrote:
> > 
> > > > The conceptual problem is that if some piece of code does spin_lock_init() or 
> > > > DEFINE_SPINLOCK(), that lock isn't necessarily initialized yet.
> > > 
> > > The conceptual problem is that the data structures are not build time initialized 
> > > - but the hlist conversion patch solves that problem nicely!
> > > 
> > > So I'm a happy camper.
> > 
> > OK, so the below has been in -next for nearly a week, no issues.  We
> > should get this into 4.5 to fix the CONFIG_UBSAN_ALIGNMENT issue.
> 
> So I think this patch broke liblockdep:
> 
> triton:~/tip/tools/lib/lockdep> 
> 
> In file included from lockdep.c:2:0:
> ../../../kernel/locking/lockdep.c: In function ‘look_up_lock_class’:
> ../../../kernel/locking/lockdep.c:722:2: warning: implicit declaration of function ‘hlist_for_each_entry_rcu’ [-Wimplicit-function-declaration]
>   hlist_for_each_entry_rcu(class, hash_head, hash_entry) {

The patch below fixes it.

Thanks,

	Ingo

 tools/lib/lockdep/lockdep.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/lib/lockdep/lockdep.c b/tools/lib/lockdep/lockdep.c
index f42b7e9aa48f..a0a2e3a266af 100644
--- a/tools/lib/lockdep/lockdep.c
+++ b/tools/lib/lockdep/lockdep.c
@@ -1,2 +1,8 @@
 #include <linux/lockdep.h>
+
+/* Trivial API wrappers, we don't (yet) have RCU in user-space: */
+#define hlist_for_each_entry_rcu	hlist_for_each_entry
+#define hlist_add_head_rcu		hlist_add_head
+#define hlist_del_rcu			hlist_del
+
 #include "../../../kernel/locking/lockdep.c"

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ