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] [day] [month] [year] [list]
Message-ID: <20130313120133.GN25610@opensource.wolfsonmicro.com>
Date:	Wed, 13 Mar 2013 12:01:33 +0000
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>
Cc:	patches@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regmap: Cut down on the average # of nodes in the rbtree
 cache

On Wed, Mar 13, 2013 at 11:53:43AM +0000, Dimitris Papastamos wrote:

> +	for (bitmap_size = 0, i = 0; i < map->num_reg_defaults; i++)
> +		if (map->reg_defaults[i].reg > bitmap_size)
> +			bitmap_size = map->reg_defaults[i].reg;
> +	bitmap_size++;
> +
> +	reg_bitmap = kmalloc(BITS_TO_LONGS(bitmap_size) * sizeof(long),
> +			     GFP_KERNEL);
> +	if (!reg_bitmap) {
> +		ret = -ENOMEM;
> +		goto err;
> +	}
> +	bitmap_zero(reg_bitmap, bitmap_size);
> +	rbtree_ctx->reg_bitmap = reg_bitmap;
> +	rbtree_ctx->reg_bitmap_nbits = bitmap_size;
> +

What happens if we don't have any register defaults?

This also needs a clearer name reflecting the function rather than the
type of the data.

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