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]
Message-ID: <Y4EX7DLt/Lvde/SJ@sirena.org.uk>
Date:   Fri, 25 Nov 2022 19:30:52 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Alexander Stein <alexander.stein@...tq-group.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] regmap: cache: downgrade log level for no cache
 defaults message

On Wed, Sep 21, 2022 at 09:10:54AM +0200, Alexander Stein wrote:

> Having no cache defaults is not a mistake, especially for devices
> which do have some kind of strapping values which can't be provided
> statically. For this case a warning is the wrong log level, the initial
> cache values do need to be read form hardware. Reduce level to info.

>  	if (!map->reg_defaults_raw) {
>  		bool cache_bypass = map->cache_bypass;
> -		dev_warn(map->dev, "No cache defaults, reading back from HW\n");
> +		dev_info(map->dev, "No cache defaults, reading back from HW\n");

This is a warning which is only generated in the case where we have a
non-sparse cache where we won't read from the hardware in the csae of
missing values and will instead just substitute zero as a default value.
It's warning that we might end up changing values for the device
unexpectedly in the case of a read/modify/write cycle that doesn't
actually check what the device currently has set.

In this case if you can't use a rbtree cache I would recommend
bootstrapping by initially reading without a cache first to get the
default values, then replacing the regmap with one that uses the
defaults you just read.  You'll need some care over suspend/resume
though.

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