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: <20130821144442.GD26118@sirena.org.uk>
Date:	Wed, 21 Aug 2013 15:44:42 +0100
From:	Mark Brown <broonie@...nel.org>
To:	David Jander <david.jander@...tonic.nl>
Cc:	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers: regmap: bugfix in regcache-rbtree.c

On Wed, Aug 21, 2013 at 04:21:43PM +0200, David Jander wrote:

> I hope you can explain to me how regcache_rbtree_node_alloc() is supposed to
> work, because I start to think that something in there is broken...
> Specially the code at line 323 strikes me:

> 	if (!rbnode->blklen) {
> 		rbnode->blklen = sizeof(*rbnode);
> 		rbnode->base_reg = reg;
> 	}

That's intended to avoid creating lots of tiny blocks.  I think this bit
is actually OK but what should be happening here is that the collision
gets noticed when we try to insert the block and we at least constrain
the size of the new block if not merge it with the old one immediately
after (which is obvioulsy better).

As a bug fix setting blklen to be a single register ought to avoid
triggering problems though it will be less efficient - does that work
for you?  Doing the merging is going to be too much for a fix.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ