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] [day] [month] [year] [list]
Message-ID: <20200908164726.GG5551@sirena.org.uk>
Date:   Tue, 8 Sep 2020 17:47:26 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
Cc:     linux-kernel@...r.kernel.org, rafael@...nel.org,
        gregkh@...uxfoundation.org, enric.balletbo@...labora.com,
        kernel@...labora.com, dafna3@...il.com
Subject: Re: [PATCH] regmap: debugfs: potentially duplicate the name string
 of the config

On Tue, Sep 08, 2020 at 06:07:56PM +0200, Dafna Hirschfeld wrote:
> Am 08.09.20 um 17:35 schrieb Mark Brown:

> > It does not follow that the name should be copied, it equally follows
> > (and is expected by the API given that the common case is that the name
> > is a static string assigned at build time) that the caller should not
> > free the string while the regmap is active.

> I see that the same copy is already done in function __regmap_init in drivers/base/regmap/regmap.c
> added in patch 8253bb3f82554 "regmap: potentially duplicate the name string stored in regmap"
> so I thought I'll do the same.

Hrm, right.  In that case why not just use that copy we've already
taken?

> > > This fixes an error
> > > "debugfs: Directory 'dummy-' with parent 'regmap' already present!"
> > > where the name was freed in function of_syscon_register before
> > > it was accessed.

> > Fix the caller.  It is *very* much unclear to me why a syscon would be
> > assigning a name for a regmap it creates in the first place.

> I'll have a deeper look.

Whatever happens that caller looks like it shouldn't be creating an
additional name unless I'm missing something about the context.

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