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: <YP+ZOx8BETgufxBS@kroah.com>
Date:   Tue, 27 Jul 2021 07:27:23 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     Bill Wendling <morbo@...gle.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        clang-built-linux@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] base: mark 'no_warn' as unused

On Mon, Jul 26, 2021 at 01:47:33PM -0700, Nathan Chancellor wrote:
> + Greg and Rafael as the maintainer and reviewer of drivers/base/module.c
> respectively, drop everyone else.

Odd no one cc:ed us originally, I guess they didn't want the patch ever
merged?  :(

> 
> Original post:
> 
> https://lore.kernel.org/r/20210726201924.3202278-2-morbo@google.com/
> 
> On 7/26/2021 1:19 PM, 'Bill Wendling' via Clang Built Linux wrote:
> > Fix the following build warning:
> > 
> >    drivers/base/module.c:36:6: error: variable 'no_warn' set but not used [-Werror,-Wunused-but-set-variable]
> >          int no_warn;

That's not going to be a good warning to ever have the kernel use due to
how lots of hardware works (i.e. we need to do a read after a write but
we can throw the read away as it does not matter).


> > 
> > This variable is used to remove another warning, but causes a warning
> > itself. Mark it as 'unused' to avoid that.
> > 
> > Signed-off-by: Bill Wendling <morbo@...gle.com>
> 
> Even though they evaluate to the same thing, it might be worth using
> "__always_unused" here because it is :)

But it is not unused, the value is written into it.

So this isn't ok, sometimes we want to write to variables but never care
about the value, that does not mean the compiler should complain about
it.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ