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: <CACRpkdbsuxyD1p2miA+Zgern9Fr2pS5PzsUeikViGbfMiP6TgQ@mail.gmail.com>
Date:	Mon, 17 Aug 2015 11:06:07 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Lars-Peter Clausen <lars@...afoo.de>
Cc:	Grygorii Strashko <grygorii.strashko@...com>,
	Alexandre Courbot <gnurou@...il.com>,
	Linux-OMAP <linux-omap@...r.kernel.org>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	Sekhar Nori <nsekhar@...com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Roger Quadros <rogerq@...com>
Subject: Re: [PATCH] gpiolib: irqchip: use different lockdep class for each
 gpio irqchip

On Fri, Aug 14, 2015 at 2:40 PM, Lars-Peter Clausen <lars@...afoo.de> wrote:
> On 08/14/2015 02:34 PM, Linus Walleij wrote:
> [...]
>> Every chip will get their own lock class on the heap.
>>
>> But I think it is a bit kludgy.
>>
>> Is it not possible to have  the lock key in struct gpio_chip
>> be a real member instead of a pointer and get a per-chip
>> lock that way?
>>
>> (...)
>> struct lock_class_key lock_key;
>>
>> instead of:
>>
>> struct lock_class_key  *lock_key;
>>
>> -> problem solved, without kludgy header defines?
>
>
> Lock keys need to be in persistent memory since they have a unlimited life
> time. Once registered it is expected to exist until the system is reset.

Aha I see.

OK if we fix the documentation comment I guess we can go with this,
even if it makes the header file somewhat hard to read.

I have a bit of problem with it, because lockdep instrumentation is
supposed to make development easier, not harder, now it helps
in one end with lock validation and screws up in another end by creating
API headers that are hopeless to read :(

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