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: <CAJZ5v0iL=zDAzu7xUCYmr7OgSD_-ynqA03sOTJ3SWUT72RfngA@mail.gmail.com>
Date: Fri, 5 Sep 2025 20:53:17 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Lukasz Luba <lukasz.luba@....com>, Osama Abdelkader <osama.abdelkader@...il.com>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	daniel.lezcano@...aro.org, rui.zhang@...el.com
Subject: Re: [PATCH v2] thermal: hwmon: replace deprecated strcpy() with strscpy()

On Thu, Sep 4, 2025 at 9:45 AM Lukasz Luba <lukasz.luba@....com> wrote:
>
>
>
> On 9/3/25 20:20, Osama Abdelkader wrote:
> > strcpy() is deprecated, use strscpy() instead for consistency with thermal
> > subsystem since this is the only strcpy there.
> >
> > Signed-off-by: Osama Abdelkader <osama.abdelkader@...il.com>
> > ---
> > v2:
> > Improve the commit msg: add that this is the only strcpy left in thermal subsystem
> > ---
> >   drivers/thermal/thermal_hwmon.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
> > index 0ecccd4d8556..64cc3ab949fe 100644
> > --- a/drivers/thermal/thermal_hwmon.c
> > +++ b/drivers/thermal/thermal_hwmon.c
> > @@ -96,7 +96,7 @@ thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz)
> >
> >       mutex_lock(&thermal_hwmon_list_lock);
> >       list_for_each_entry(hwmon, &thermal_hwmon_list, node) {
> > -             strcpy(type, tz->type);
> > +             strscpy(type, tz->type);
> >               strreplace(type, '-', '_');
> >               if (!strcmp(hwmon->type, type)) {
> >                       mutex_unlock(&thermal_hwmon_list_lock);
>
>
> LGTM, that was indeed the single occurrence in thermal sub-system.
> Thanks!
>
> Reviewed-by: Lukasz Luba <lukasz.luba@....com>

Applied as 6.18 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ