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:   Mon, 14 Mar 2022 11:35:07 -0700
From:   srinivas pandruvada <srinivas.pandruvada@...ux.intel.com>
To:     David Laight <David.Laight@...LAB.COM>,
        "rafael@...nel.org" <rafael@...nel.org>,
        "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
        "amitk@...nel.org" <amitk@...nel.org>,
        "rui.zhang@...el.com" <rui.zhang@...el.com>
Cc:     "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "matthewgarrett@...gle.com" <matthewgarrett@...gle.com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] thermal: int340x: Increase bitmap size

On Mon, 2022-03-14 at 15:28 +0000, David Laight wrote:
> From: Srinivas Pandruvada
> > Sent: 14 March 2022 14:50
> > 
> > The number of policies are 10, so can't be supported by the bitmap
> > size
> > of u8. Even though there are no platfoms with these many policies,
> > but
> > as correctness increase to u16.
> 
> You might as well just use 'unsigned int'.
> May generate better code and there is still padding
> in the structure.
Correct. I can update the patch.

Thanks,
Srinivas

> 
>         David
> 
> > 
> > Signed-off-by: Srinivas Pandruvada <
> > srinivas.pandruvada@...ux.intel.com>
> > Fixes: 16fc8eca1975 ("thermal/int340x_thermal: Add additional
> > UUIDs")
> > Cc: stable@...r.kernel.org
> > ---
> >  drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git
> > a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> > b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> > index 72acb1f61849..c2d3df302214 100644
> > --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> > +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> > @@ -53,7 +53,7 @@ struct int3400_thermal_priv {
> >         struct art *arts;
> >         int trt_count;
> >         struct trt *trts;
> > -       u8 uuid_bitmap;
> > +       u16 uuid_bitmap;
> >         int rel_misc_dev_res;
> >         int current_uuid_index;
> >         char *data_vault;
> > --
> > 2.31.1
> 
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes,
> MK1 1PT, UK
> Registration No: 1397386 (Wales)
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ