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]
Message-ID: <b5f70864-baf9-4590-880d-96727b7b80cb@sirena.org.uk>
Date: Tue, 6 Jan 2026 15:12:23 +0000
From: Mark Brown <broonie@...nel.org>
To: "Sheetal ." <sheetal@...dia.com>
Cc: Sander Vanheule <sander@...nheule.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J . Wysocki" <rafael@...nel.org>,
	Danilo Krummrich <dakr@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
	Thierry Reding <thierry.reding@...il.com>,
	Jonathan Hunter <jonathanh@...dia.com>,
	linux-kernel@...r.kernel.org, linux-sound@...r.kernel.org,
	linux-tegra@...r.kernel.org
Subject: Re: [RFC PATCH 1/2] regmap: Add cache_default_is_zero flag for flat
 cache

On Tue, Jan 06, 2026 at 07:38:26PM +0530, Sheetal . wrote:

> 2. No functional benefit: Entries like { REG, 0x0 } only set the
>    validity bit; the cache value is already zero.

For sparse caches specifying the register also allocates the cache
entry.

> Add a cache_default_is_zero flag to struct regmap_config. When set,
> the flat cache marks registers as valid on first read instead of
> warning. This ensures only accessed registers are marked valid,

Why do this on first read rather than than just fill the valid flags
during initialisation?

> index b0b9be750d93..bf918f88bfd3 100644
> --- a/include/linux/regmap.h
> +++ b/include/linux/regmap.h
> @@ -452,6 +452,7 @@ struct regmap_config {
>  	enum regcache_type cache_type;
>  	const void *reg_defaults_raw;
>  	unsigned int num_reg_defaults_raw;
> +	bool cache_default_is_zero;

It would be better if this were something specific to the flat cache
since otherwise we have to consider what this means for the other cache
types.

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