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: <CAHp75Vf059Exu4LxjsWg_qugCX3AjCqFun08Gvh=krFDg41sSA@mail.gmail.com>
Date:   Thu, 25 Nov 2021 23:50:22 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Denis Pauk <pauk.denis@...il.com>
Cc:     Eugene Shalygin <eugene.shalygin@...il.com>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        thomas@...ssschuh.net, Guenter Roeck <linux@...ck-us.net>,
        Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] hwmon: (nct6775) Use nct6775_*() lock function
 pointers in nct6775_data.

On Thu, Nov 25, 2021 at 11:07 PM Denis Pauk <pauk.denis@...il.com> wrote:
> On Wed, 24 Nov 2021 18:03:25 +0200
> Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> > On Mon, Nov 22, 2021 at 11:29 PM Denis Pauk <pauk.denis@...il.com>
> > wrote:

...

> > > +static int nct6775_lock(struct nct6775_data *data)
> > > +{
> > > +       mutex_lock(&data->update_lock);
> > > +
> > > +       return 0;
> > > +}
> > > +
> > > +static void nct6775_unlock(struct nct6775_data *data, struct
> > > device *dev) +{
> > > +       mutex_unlock(&data->update_lock);
> > > +}
> >
> > Have you run `sparse` against this?
> > Install `sparse` in your distribution and make kernel with
> > `make W=1 C=1 CF=-D__CHECK_ENDIAN__ ...`
> >
> > It might require using special annotations to these functions to make
> > static analysers happy.
>
> Thank you, I will validate my patches before sending with sparse also.
>
> I have tried with sparse==0.6.4:
> ---
> $ make CC="ccache gcc" W=1 C=2 CF=-D__CHECK_ENDIAN__ 2>&1 | grep
> nct6775 -n5
> ....
> 27219-  CHECK   drivers/hwmon/nct6683.c
> 27220:  CHECK   drivers/hwmon/nct6775.c
> 27221-  CHECK   drivers/hwmon/nct7802.c
> ....
> ---
>
> It has not showed any warnings. Have I missed some flag?

No, you are all good!

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ