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:   Wed, 11 May 2022 20:21:00 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     "Rafael J . Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>, linux-hwmon@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [PATCH 0/3] hwmon: Introduce and use hwmon_device_register_for_thermal

On Wed, May 11, 2022 at 5:12 PM Guenter Roeck <linux@...ck-us.net> wrote:
>
> The thermal subsystem registers a hwmon driver without providing
> chip information or sysfs group information. This is for legacy reasons
> and would be difficult to change.
>
> At the same time, several attempts have been made to convert hwmon
> drivers using the deprecated hwmon_device_register() to use
> hwmon_device_register_with_info() by just providing NULL parameters.
> This is an abuse of the hwmon API. To prevent this abuse, we want to
> enforce that a parent device pointer as well as chip information is
> provided when registering a hwmon device using
> hwmon_device_register_with_info().
>
> To be able to do this, introduce and use a special API for use only by
> the thermal subsystem (patches 1 and 2). Patch 3 makes the 'dev' and 'chip'
> parameters of hwmon_device_register_with_info() mandatory.
>
> ----------------------------------------------------------------
> Guenter Roeck (3):
>       hwmon: Introduce hwmon_device_register_for_thermal
>       thermal/drivers/thermal_hwmon: Use hwmon_device_register_for_thermal()
>       hwmon: Make chip parameter for with_info API mandatory
>
>  Documentation/hwmon/hwmon-kernel-api.rst |  2 +-
>  drivers/hwmon/hwmon.c                    | 41 ++++++++++++++++++++++++++++++++---------
>  drivers/thermal/thermal_hwmon.c          |  6 ++++--
>  include/linux/hwmon.h                    |  3 +++
>  4 files changed, 40 insertions(+), 12 deletions(-)

This looks good to me from the thermal perspective, so please feel
free to add my ACKs to the first two patches.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ