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]
Date:   Wed, 13 Oct 2021 21:23:56 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     kernel test robot <lkp@...el.com>,
        Yafang Shao <laoar.shao@...il.com>, llvm@...ts.linux.dev,
        kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        x86@...nel.org
Subject: Re: [tip:sched/core 14/47] kernel/sched/fair.c:893:22: error:
 variable 'p' set but not used

On Tue, Oct 12, 2021 at 03:35:42PM +0200, Peter Zijlstra wrote:
> On Tue, Oct 12, 2021 at 01:26:54PM +0200, Peter Zijlstra wrote:
> 
> > Again, I have absolutely no intention of fixing this. IMO this is the
> > compiler being a total pain in the arse.
> > 
> > Please stop reporting this.
> 
> How's this then?
> 
> diff --git a/kernel/sched/Makefile b/kernel/sched/Makefile
> index 978fcfca5871..b0d9121c5dce 100644
> --- a/kernel/sched/Makefile
> +++ b/kernel/sched/Makefile
> @@ -3,6 +3,10 @@ ifdef CONFIG_FUNCTION_TRACER
>  CFLAGS_REMOVE_clock.o = $(CC_FLAGS_FTRACE)
>  endif
>  
> +# The compilers are complaining about unused variables inside an if(0) scope
> +# block. This is daft, shut them up.
> +ccflags-y += -Wno-unused-but-set-variable

Please consider making this

ccflags-y += $(call cc-disable-warning, unused-but-set-variable)

because -Wunused-but-set-variable was only added to clang in the 13
release but we support back to 10, meaning this will cause errors for
those older compilers.

With that:

Reviewed-by: Nathan Chancellor <nathan@...nel.org>

Additionally, perhaps this could be restricted to just fair.c?

> +
>  # These files are disabled because they produce non-interesting flaky coverage
>  # that is not a function of syscall inputs. E.g. involuntary context switches.
>  KCOV_INSTRUMENT := n
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ