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:	Tue, 20 Apr 2010 18:09:27 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Greg KH <gregkh@...e.de>
Cc:	Lai Jiangshan <laijs@...fujitsu.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	WANG Cong <xiyou.wangcong@...il.com>,
	Tejun Heo <tj@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [BUG] sysfs: don't use allocated key for lockdep

On Tue, 20 Apr 2010, Greg KH wrote:

> > lockdep_init_map() {
> > ......
> > 	/*
> > 	 * Sanity check, the lock-class key must be persistent:
> > 	 */
> > 	if (!static_obj(key)) {
> > 		printk("BUG: key %p not in .data!\n", key);
> > 		DEBUG_LOCKS_WARN_ON(1);
> > 		return;
> > 	}
> > 	lock->key = key;
> > ......
> > }
> > 
> > Could you please fix it.
> 
> All in-kernel attributes should now be fixed, so what exactly is the
> remaining issue?

Are they?

How about my fix to drivers/hwmon/asus_atk0110.c for example, I sent last 
week? http://lkml.org/lkml/2010/4/14/458

> > ----------------
> > One other comment (not relate to this bug, but relate to the commit):
> > It is not a very good idea that use one lockdep class per sysfs attribute.
> > 
> > First: we don't have too much lockdep class resource.
> > Second: lockdep validator is O(N*N) algorithm.
> >         (N is the number of used lockdep class)
> > 
> > So it is recommended that use only one class for a group of locks.
> > 
> > For some nesting requirement, you can use
> > lock_acquire(...,subclass,...nest_lock,...)
> > 
> > Or change the design.
> > --------------------
> > 
> > BUG: key ffff880042c68220 not in .data!
> > ------------[ cut here ]------------
> > WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0xe6/0x4fb()
> > Hardware name: Lenovo WQ T168/T468 G6
> > Modules linked in: mptsas(+) mptscsih mptbase scsi_transport_sas ext4 jbd2 crc16 uhci_hcd ohci_hcd ehci_hcd
> > Pid: 1329, comm: modprobe Not tainted 2.6.34-rc3-22949-gbc8a97a-dirty #1
> 
> Please try 2.6.34-rc5 and let us know if this still shows up.

This particular one should indeed by fixed by upstream commit 
ebd09ec93c90c8 though.

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

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