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:	Thu, 25 Jun 2015 17:59:51 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Nicolas Boichat <drinkcat@...omium.org>,
	Mark Brown <broonie@...nel.org>
CC:	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	Antti Palosaari <crope@....fi>, Ingo Molnar <mingo@...hat.com>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, Bard Liao <bardliao@...ltek.com>,
	Oder Chiou <oder_chiou@...ltek.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
	alsa-devel@...a-project.org,
	Anatol Pomozov <anatol.pomozov@...il.com>
Subject: Re: [RFC PATCH 1/2] regmap: add configurable lock class key for lockdep

[...]
> diff --git a/include/linux/regmap.h b/include/linux/regmap.h
> index 116655d..09aaaf5 100644
> --- a/include/linux/regmap.h
> +++ b/include/linux/regmap.h
> @@ -135,6 +135,12 @@ typedef void (*regmap_unlock)(void *);
>    * @lock_arg:	  this field is passed as the only argument of lock/unlock
>    *		  functions (ignored in case regular lock/unlock functions
>    *		  are not overridden).
> + * @lock_class_key: Custom lock class key for lockdep validator. Use that to
> + *                  silence false lockdep nested locking warning, when this
> + *                  regmap needs to access another regmap during read/write
> + *                  operations (directly in read/write functions, or
> + *                  indirectly, e.g. through bus accesses).

The recommendation when to use this is the wrong way around. The presented 
criteria is true for all devices since the bus master might be using regmap 
to implements its IO. Any regmap instance that might be used from within 
another regmap instance needs a custom lock class. This includes bus masters 
as well as resource providers like clock chips or regulators.
--
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