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: <aTd03OxYFeRtvoU-@sirena.co.uk>
Date: Tue, 9 Dec 2025 10:01:16 +0900
From: Mark Brown <broonie@...nel.org>
To: Sander Vanheule <sander@...nheule.net>
Cc: "Sheetal ." <sheetal@...dia.com>, linux-sound@...r.kernel.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>,
	Charles Keepax <ckeepax@...nsource.cirrus.com>,
	linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: tegra: Fix uninitialized flat cache warning in
 tegra210_ahub

On Mon, Dec 08, 2025 at 09:57:01PM +0100, Sander Vanheule wrote:
> On Mon, 2025-12-08 at 10:50 +0530, Sheetal . wrote:

> > The tegra210_ahub driver started triggering a warning after commit
> > e062bdfdd6ad ("regmap: warn users about uninitialized flat cache"),
> > which flags drivers using REGCACHE_FLAT without register defaults.
> > Since the driver omits default definitions because its registers are
> > zero initialized, the following warning is shown:
> > 
> >   WARNING KERN tegra210-ahub 2900800.ahub: using zero-initialized flat cache,
> > this may cause unexpected behavior

> > Switch to REGCACHE_FLAT_S which is the recommended cache type for
> > sparse register maps without defaults. This cache type initializes
> > entries on-demand from hardware, eliminating the warning while using
> > memory efficiently.

Like Sander says we can't just do this without checking that the driver
isn't relying on the fact that the cache ends up defaulting to zero
initialisation, that's the whole reason there are two separate cache
types here.

> > Fixes: e062bdfdd6ad ("regmap: warn users about uninitialized flat cache")

> I disagree with this tag. The commit is working as intended by giving a warning.

Yes.

> This device's reset state happens to match the zero-initialization of the flat
> cache, so there were no issues here. An earlier version of this sparse flat
> cache indicated a potential problem with another driver, so there are likely
> drivers out there that do need fixing:

The driver could also just provide the defaults FWIW but there's likely
to be little practical difference.

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