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, 31 May 2012 17:40:33 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Krystian Garbaciak <krystian.garbaciak@...semi.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org,
	Anthony Olech <Anthony.Olech@...semi.com>
Subject: Re: [PATCH 2/4] regmap: Make internal read/write functions reentrant
 from themselves.

On Thu, May 31, 2012 at 04:19:36PM +0200, Krystian Garbaciak wrote:

> Functions _regmap_update_bits() and _regmap_write() are modified
> so they can be recurrently entered from the inside.

You should describe what you're doing here in more detail...

> The internal reading functions need no modification for current implementation
> of indirect access.

So the subject should really be "Make internal write functions
reentrant"?

> -		map->format.format_val(map->work_buf + map->format.reg_bytes
> -				       + map->format.pad_bytes, val);
> -		return _regmap_raw_write(map, reg,
> -					 map->work_buf +
> -					 map->format.reg_bytes +
> -					 map->format.pad_bytes,
> +		/* Using stack for value data, to make function reentrant */
> +		map->format.format_val(&val, val);
> +		return _regmap_raw_write(map, reg, &val,

We can't safely do this for all buses, some want to DMA and you can't
DMA from stack.  This also means that we'll no longer be able to send a
single buffer to the device as we'll never have the value immediately
following the register address and padding any more.  That'll increase
overhead on many systems, you can often see the handover on gathers on a
scope.

I don't understand why we can't take the decision to write the page
register before we start using the buffer?

Also, it seems like your mailing setup is a bit broken - these messages
aren't being threaded with each other.

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