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:   Tue, 13 Jun 2023 16:39:05 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Waqar Hameed <waqar.hameed@...s.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>, kernel@...s.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] regmap: Add debugfs file for forcing field writes

On Tue, Jun 13, 2023 at 05:02:27PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Jun 13, 2023 at 01:42:27PM +0200, Waqar Hameed wrote:

> > +#undef REGMAP_ALLOW_FORCE_WRITE_FIELD_DEBUGFS
> > +#ifdef REGMAP_ALLOW_FORCE_WRITE_FIELD_DEBUGFS
> > +	debugfs_create_bool("force_write_field", 0600, map->debugfs,
> > +			    &map->force_write_field);
> > +#endif

> Please no, that means this will never ever ever get used, and if it
> happens to break the build or runtime, no one will ever notice it.

> If you need this for your device/tree/distro, great, just keep it as an
> out-of-tree patch with the huge header "NEVER ENABLE THIS IN A REAL
> SYSTEM" or something like that.

We have an existing setting that parallels this which enables writes via
debugfs - there *is* demand for this sort of thing in development where
this is a viable configuration mechanism, having something in tree in a
way that requires an out of tree patch like you're suggesting to enable
it documents why the feature isn't something you can enable without code
changes whereas just not having anything means people send patches
adding the feature.

This one is very much safer than the general write thing, we probably
*could* have a Kconfig option but changing the guarantees underneath
drivers feels like it's going to explode if we just let it happen.

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