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: <20210726121140.GH4670@sirena.org.uk>
Date:   Mon, 26 Jul 2021 13:11:40 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Matthias Schiffer <matthias.schiffer@...tq-group.com>
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, Jul 26, 2021 at 02:01:51PM +0200, Matthias Schiffer wrote:
> On Mon, 2021-07-26 at 12:47 +0100, Mark Brown wrote:

> > 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.

> 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.

So in that case how are we managing to create a debugfs file with the
same name given (which was the problem you were reporting) that the
device name is embedded in the name of the debugfs file?

> 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.

That's not what your patch says it's fixing, your patch says it's
fixing an attempt to recreate the same directory as we had originally
(we should probably clean up the one with no device but that's not what
your commit does).  I think what you need to look at here is that we
store map->debugfs_name and don't overwrite it when the device is
supplied.

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