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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 29 Apr 2015 17:46:32 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Kevin Cernekee <cernekee@...omium.org>
Cc:	Liam Girdwood <lgirdwood@...il.com>,
	Lars-Peter Clausen <lars@...afoo.de>, dgreid@...omium.org,
	Andrew Bresticker <abrestic@...omium.org>,
	Olof Johansson <olofj@...omium.org>,
	alsa-devel@...a-project.org, devicetree@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 1/4] regmap: cache: Add "was_reset" argument to
 regcache_sync_region()

On Wed, Apr 29, 2015 at 07:13:27AM -0700, Kevin Cernekee wrote:
> On Wed, Apr 29, 2015 at 3:40 AM, Mark Brown <broonie@...nel.org> wrote:

> > Like I said above we can tell if the hardware was reset because
> > mark_dirty() is called.

> That covers the public API, but I do not understand how you intended
> for this data to be stored in the rbtree if the use of a dirty bitmask
> is discouraged.

We just need a single boolean?

> i.e. regcache_sync() finds a register value marked "present".  How do
> we know whether we need to write it back to the hardware?  For the
> special case of "cached non default register values immediately after
> a HW reset" you can mostly figure this out, but if there was no HW
> reset how do we know which entries changed while the HW was
> inaccessible?

In the first instance do we care?

> > I'm not suggesting that we do anything based on the presence of a cache
> > entry, I'm suggesting that we could avoid having to ever cache values
> > that never get referenced on a system (which can be a lot of them for
> > common use cases) saving us memory.

> This seems to be solving a different problem.  It sounds like you are
> more worried about regcache_sync() writing back lots of default values
> for registers that were never touched, than performing unnecessary
> writes to a few (actively used) registers that weren't changed while
> we were in cache_only mode.  Is that accurate?

No.  This is nothing to do with sync, it's just something that might be
nice.

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