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]
Message-ID: <20250508163138.GA834338@ax162>
Date: Thu, 8 May 2025 17:31:38 +0100
From: Nathan Chancellor <nathan@...nel.org>
To: WangYuli <wangyuli@...ontech.com>
Cc: masahiroy@...nel.org, nicolas.schier@...ux.dev,
	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
	zhanjun@...ontech.com, niecheng1@...ontech.com,
	guanwentao@...ontech.com
Subject: Re: [PATCH] extrawarn: Use cc-disable-warning for
 shift-negative-value

On Wed, May 07, 2025 at 01:47:05PM +0800, WangYuli wrote:
> The -Wno-shift-negative-value option is not supported by GCC 5.4.0.

The patch is fine (albeit slightly incomplete because other places add
this unconditionally) but this is not going to matter soon because the
minimum version of GCC is being bumped to 8.1:

https://git.kernel.org/next/linux-next/c/118c40b7b50340bf7ff7e0adee8e3bab6e552c82

Even though we claim to support GCC 5, I suspect that basically nobody
uses it in practice since this flag was added by 1344794a59db2.

> This could potentially result in extra warnings under certain
> circumstances.
> 
> Utilize cc-disable-warning to prevent the following from occurring:
>   mm/vmscan.c: At top level:
>   cc1: error: unrecognized command line option ‘-Wno-shift-negative-value’ [-Werror]
>   cc1: all warnings being treated as errors
> 
> Link: https://lore.kernel.org/all/62726950F697595A+20250507040827.1147510-1-wangyuli@uniontech.com/
> Signed-off-by: WangYuli <wangyuli@...ontech.com>
> ---
>  scripts/Makefile.extrawarn | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
> index d88acdf40855..375475e7b3bd 100644
> --- a/scripts/Makefile.extrawarn
> +++ b/scripts/Makefile.extrawarn
> @@ -158,7 +158,7 @@ else
>  # The following turn off the warnings enabled by -Wextra
>  KBUILD_CFLAGS += -Wno-missing-field-initializers
>  KBUILD_CFLAGS += -Wno-type-limits
> -KBUILD_CFLAGS += -Wno-shift-negative-value
> +KBUILD_CFLAGS += $(call cc-disable-warning, shift-negative-value)
>  
>  ifdef CONFIG_CC_IS_CLANG
>  KBUILD_CFLAGS += -Wno-enum-enum-conversion
> -- 
> 2.49.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ