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:	Wed, 16 Nov 2011 17:23:33 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>,
	Jonathan Cameron <jic23@...nel.org>,
	Michael Hennerich <michael.hennerich@...log.com>,
	linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
	device-drivers-devel@...ckfin.uclinux.org, drivers@...log.com
Subject: Re: [PATCH 2/7] regmap: Make reg_config reg_defaults const

On 11/16/2011 05:13 PM, Mark Brown wrote:
> On Wed, Nov 16, 2011 at 04:28:17PM +0100, Lars-Peter Clausen wrote:
>> The reg_defaults field usually points to a static per driver array, which should
>> not be modified. Make requirement this explicit by making reg_defaults const.
> 
> You should've got reams of sparse warnings from that - the indexed cache
> is writing to the defaults table (which is very naughty and i keep
> thinking about deleting it as a result).

This patch makes reg_defaults const in the reg_config struct not in the
regmap struct.

Since we duplicate the reg_config reg_defaults into the regmap reg_defaults
the index cache works on a runtime allocated array. (Though I wouldn't
object to see it gone. For the average uscase it uses more memory and is
slower than the rbnode cache).

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