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, 26 Jul 2021 14:01:51 +0200
From:   Matthias Schiffer <matthias.schiffer@...tq-group.com>
To:     Mark Brown <broonie@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        David Lechner <david@...hnology.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regmap: do not call regmap_debugfs_init() from
 regmap_attach_dev()

On Mon, 2021-07-26 at 12:47 +0100, Mark Brown wrote:
> * PGP Signed by an unknown key
> 
> On Mon, Jul 26, 2021 at 09:36:27AM +0200, Matthias Schiffer wrote:
> > regmap_debugfs_init() should never be called twice for the same regmap,
> > as it initializes various fields of the regmap struct, including list
> > heads and mutices. A visible symptom are messages like:
> > 
> >     debugfs: Directory 'dummy-iomuxc-gpr@...4000' with parent 'regmap'
> >     already present!
> > 
> > This happened whenever regmap_attach_dev() was called for an existing
> > regmap. Remove the call from regmap_attach_dev() and change
> > __regmap_init() so that regmap_debugfs_init() is called exactly once.
> 
> The use case for regmap_attach_dev() is that there was no device when
> the regmap was initially instantiated due to it running very early, we
> want to attach the device when we figure out what it is which includes
> setting up the debugfs stuff.  Whatever is managing to call this with
> the same device as has already been set is clearly not that use case.
> 
> 

Hi Mark,

I'm not talking about a case where regmap_attach_dev() is called when
there is already a device attached; as far as I can tell such a thing
does not happen in current kernel code.

Please have a look at the commit in the Fixes: tag. The duplicate
regmap_debugfs_init() happens even when no device was passed in
__regmap_init(), so the regmap_attach_dev() is the first time a device
it attached.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ