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:   Mon, 8 Jan 2018 12:08:01 +0000
From:   Mark Brown <broonie@...nel.org>
To:     "Andrew F. Davis" <afd@...com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] regcache: flat: Add valid bit to this cache type

On Sun, Jan 07, 2018 at 05:22:34PM -0600, Andrew F. Davis wrote:
> Other regmap cache types (LZO, RBtree) report back un-successful register
> lookups when a value has not been previously written into the cache. This
> allows regmap core to perform a real un-cached lookup to fetch the value.
> The Flat type cache does not and so all read succeed reporting zero for the
> registers value, even when the actual value is not known.

> We fix this by changing the flat cache element type to a struct
> containing both the register's value and a bool signifying if this value
> is an actual cached value or not. This also opens up a path to implement
> additional regcache_ops such as "sync" and "drop" that rely on such
> validity information.

The reason we don't do this for the flat cache is that its whole purpose
is to be as fast as possible in order to make it easier for MMIO devices.  
Things that can take the hit of extra complexity should just use a rbtree
cache since if the registers are all bunched together it rapidly becomes
effectively the same data structure anyway.  Unless you really know why
you're using a flat cache you probably shouldn't.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ