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]
Date:   Tue, 29 Mar 2022 06:52:50 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Michael Walle <michael@...le.cc>
Cc:     Andrew Lunn <andrew@...n.ch>, Xu Yilun <yilun.xu@...el.com>,
        Tom Rix <trix@...hat.com>, Jean Delvare <jdelvare@...e.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v1 0/2] hwmon: introduce hwmon_sanitize()

On 3/28/22 15:50, Michael Walle wrote:
> Am 2022-03-28 18:27, schrieb Guenter Roeck:
>> On 3/28/22 05:56, Andrew Lunn wrote:
>>>> I'm not sure how to handle this correctly, as this touches both the
>>>> network tree and the hwmon tree. Also, the GPY PHY temperature senors
>>>> driver would use it.
>>>
>>> There are a few options:
>>>
>>> 1) Get the hwmon_sanitize_name() merged into hwmon, ask for a stable
>>> branch, and get it merged into netdev net-next.
>>>
>>> 2) Have the hwmon maintainers ACK the change and agree that it can be
>>> merged via netdev.
>>>
>>> Probably the second option is easiest, and since it is not touching
>>> the core of hwmon, it is unlikely to cause merge conflicts.
>>>
>>
>> No, it isn't the easiest solution because it also modifies a hwmon
>> driver to use it.
> 
> So that leaves us with option 1? The next version will contain the
> additional patch which moves the hwmon_is_bad_char() from the include
> to the core and make it private. That will then need an immutable
> branch from netdev to get merged back into hwmon before that patch
> can be applied, right?

We can not control if someone else starts using the function before
it is removed. As pointed out, the immutable branch needs to be from hwmon,
and the patch to make hwmon_is_bad_char private can only be applied
after all of its users are gone from the mainline kernel.

I would actually suggest to allocate the new string as part of the
function and have it return a pointer to a new string. Something like
	char *devm_hwmon_sanitize_name(struct device *dev, const char *name);
and
         char *hwmon_sanitize_name(const char *name);

because the string duplication is also part of all calling code.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ