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]
Message-ID: <df6ab72faf9f1484f7f850ad7386f76b60e5bf02.camel@intel.com>
Date:   Tue, 21 Mar 2023 10:29:22 +0000
From:   "Winiarska, Iwona" <iwona.winiarska@...el.com>
To:     "pmenzel@...gen.mpg.de" <pmenzel@...gen.mpg.de>
CC:     "linux@...ck-us.net" <linux@...ck-us.net>,
        "andriy.shevchenko@...ux.intel.com" 
        <andriy.shevchenko@...ux.intel.com>,
        "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
        "openbmc@...ts.ozlabs.org" <openbmc@...ts.ozlabs.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "jdelvare@...e.com" <jdelvare@...e.com>,
        "fercerpav@...il.com" <fercerpav@...il.com>
Subject: Re: [PATCH] hwmon: (peci/cputemp) Fix miscalculated DTS for SKX

On Tue, 2023-03-21 at 10:41 +0100, Paul Menzel wrote:
> Dear Iwona,
> 
> 
> Am 21.03.23 um 10:04 schrieb Iwona Winiarska:
> > For Skylake, DTS temperature of the CPU is reported in S10.6 format
> > instead of S8.8.
> > 
> > Reported-by: Paul Fertser <fercerpav@...il.com>
> > Link: https://lore.kernel.org/lkml/ZBhHS7v+98NK56is@home.paul.comp/
> > Signed-off-by: Iwona Winiarska <iwona.winiarska@...el.com>
> > ---
> >   drivers/hwmon/peci/cputemp.c | 8 +++++++-
> >   1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/hwmon/peci/cputemp.c b/drivers/hwmon/peci/cputemp.c
> > index 30850a479f61..87d56f0fc888 100644
> > --- a/drivers/hwmon/peci/cputemp.c
> > +++ b/drivers/hwmon/peci/cputemp.c
> > @@ -537,6 +537,12 @@ static const struct cpu_info cpu_hsx = {
> >         .thermal_margin_to_millidegree =
> > &dts_eight_dot_eight_to_millidegree,
> >   };
> >   
> > +static const struct cpu_info cpu_skx = {
> > +       .reg            = &resolved_cores_reg_hsx,
> 
> This is not aligned. Why not only use one space before the equal sign?

Yeah - same alignment problem is present in cpu_hsx and cpu_icx though, so I
just followed along for skx to not stand out visually.
So while I agree that alignment is broken here, I think it might be better to
separate out the potential cleanup from the fix.

Thanks
-Iwona 

> 
> > +       .min_peci_revision = 0x33,
> > +       .thermal_margin_to_millidegree = &dts_ten_dot_six_to_millidegree,
> > +};
> > +
> >   static const struct cpu_info cpu_icx = {
> >         .reg            = &resolved_cores_reg_icx,
> >         .min_peci_revision = 0x40,
> > @@ -558,7 +564,7 @@ static const struct auxiliary_device_id
> > peci_cputemp_ids[] = {
> >         },
> >         {
> >                 .name = "peci_cpu.cputemp.skx",
> > -               .driver_data = (kernel_ulong_t)&cpu_hsx,
> > +               .driver_data = (kernel_ulong_t)&cpu_skx,
> >         },
> >         {
> >                 .name = "peci_cpu.cputemp.icx",
> 
> 
> Kind regards,
> 
> Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ