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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120418081647.GA3021@opensource.wolfsonmicro.com>
Date:	Wed, 18 Apr 2012 09:16:47 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Laxman Dewangan <ldewangan@...dia.com>
Cc:	Bryan Freed <bfreed@...omium.org>,
	Jonathan Cameron <jic23@....ac.uk>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"max@...o.at" <max@...o.at>,
	"jbrenner@...sinc.com" <jbrenner@...sinc.com>,
	"lars@...afoo.de" <lars@...afoo.de>,
	"grundler@...omium.org" <grundler@...omium.org>,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: iio: light: isl29018: use regmap for register
 access

On Wed, Apr 18, 2012 at 11:49:41AM +0530, Laxman Dewangan wrote:

> yes, the caching is done before actual transfer and it can make
> cache dirty in case of transfer failure.
> I am not sure what should be correct handling here: make cache dirty
> or revert the value to original one?
> But using the regmap will provide the common behavior across the
> driver and all driver will have same behavior rather than handling
> on differently across driver.
> So if there is any other policy for this, it will be same for all driver.

I'd mark the cache as dirty I guess, though you'll then need to arrange
to resync it at some point (presumably after you've taken recovery
action) so that won't be enough by itself.  Or reset the device and
bring it back up manually if you think that might work.

regmap doesn't make much effort here since if physical I/O has started
failing you've generally lost the plot completely, 90% of the time it's
not going to be possible to reover the situation at all and if you can
then there's a couple of different strategies that might work and which
one is appropriate is going to depend on the device.  I'll do a patch to
flag the cache as dirty since I can't see how it'd make the situation
any worse but the driver will still need to do something to handle this
situation for that to take any effect.

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