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: <Pine.LNX.4.64.0609151535190.2721@twin.jikos.cz>
Date:	Fri, 15 Sep 2006 15:38:51 +0200 (CEST)
From:	Jiri Kosina <jikos@...os.cz>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
cc:	Arjan van de Ven <arjan@...radead.org>,
	lkml <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 0/3] Synaptics - fix lockdep warnings

On Fri, 15 Sep 2006, Dmitry Torokhov wrote:

> I understand what Ingo is saying about detecting deadlocks across the 
> pool of locks of the same class not waiting till they really clash, it 
> is really useful. I also want to make my code as independent of lockdep 
> as possible. Having a speciall marking on the locks themselves (done 
> upon creation) instead of altering call sites is the cleanest way IMHO. 
> Can we have a flag in the lock structure that would tell lockdep that it 
> is OK for the given lock to be taken several times (i.e. the locks are 
> really on the different objects)? This would still allow to detect 
> incorrect locking across different classes.

Yes, but unfortunately marking the lock as 'can-be-taken-multiple-times' 
is weaker than using the nested locking provided by lockdep.

i.e. if you mark a lock this way, it opens door for having deadlock, which 
won't be detected by lockdep. This will happen if the code, by mistake, 
really takes the _very same_ lock twice. lockdep will not be able to 
detect this, when the lock is marked in a way you propose, but is able to 
detect this when using the nested semantics.

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