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: <20150219102750.GC3198@finisterre.sirena.org.uk>
Date:	Thu, 19 Feb 2015 19:27:50 +0900
From:	Mark Brown <broonie@...nel.org>
To:	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/2] regmap: Add range check in _regmap_raw_read()

On Thu, Feb 19, 2015 at 08:40:39AM +0000, Srinivas Kandagatla wrote:

> +	/* Check for readable registers before we start */
> +	for (i = 0; i < count; i++)
> +		if (!regmap_readable(map, reg + (i * map->reg_stride)))
> +			return -EINVAL;

That's starting to look pretty expensive especially if what we're
looking for is just max_register really...  This is one of the reasons
we're not religious about checking for readability everywhere, and
obviously even if we avoid triggering this particular thing we still
have to cope with both the caller and devices that didn't specify
readability.  A cheaper check for just max_register would be less
concerning but it feels like we're trying to paper over a symptom with
this rather than fix a problem.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ