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: <YzG72ynMieCUaHVM@zn.tnic>
Date:   Mon, 26 Sep 2022 16:48:59 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Li Zetao <lizetao1@...wei.com>
Cc:     tglx@...utronix.de, mingo@...hat.com, dave.hansen@...ux.intel.com,
        x86@...nel.org, hpa@...or.com, brijesh.singh@....com,
        michael.roth@....com, venu.busireddy@...cle.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] x86/sev: Remove unused variable "err" in
 enforce_vmpl0()

On Sat, Sep 24, 2022 at 06:18:19PM +0800, Li Zetao wrote:
> My Compiler version is 11.2.0. I used the default .config and compiled with
> flags "-Wall -Werror", just as follows:
> 
>     make allmodconfig
> 
>     make EXTRA_CFLAGS="-Wall -Werror"

Ah, compressed/Makefile doesn't have -Wall. That's the old problem of
x86 not sharing makefiles. I need to dust off my patches which do that.

Now, if you do:

diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 35ce1a64068b..10abb7c45d04 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -34,7 +34,7 @@ targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
 # be valid.
 KBUILD_CFLAGS := -m$(BITS) -O2 $(CLANG_FLAGS)
 KBUILD_CFLAGS += -fno-strict-aliasing -fPIE
-KBUILD_CFLAGS += -Wundef
+KBUILD_CFLAGS += -Wundef -Wall
 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
 cflags-$(CONFIG_X86_32) := -march=i386
 cflags-$(CONFIG_X86_64) := -mcmodel=small -mno-red-zone

then allmodconfig triggers a bunch:

arch/x86/boot/compressed/efi.c: In function ‘efi_get_system_table’:
arch/x86/boot/compressed/efi.c:62:23: warning: unused variable ‘et’ [-Wunused-variable]
   62 |         enum efi_type et;
      |                       ^~
arch/x86/boot/compressed/efi.c: In function ‘efi_get_conf_table’:
arch/x86/boot/compressed/efi.c:134:13: warning: unused variable ‘ret’ [-Wunused-variable]
  134 |         int ret;
      |             ^~~
arch/x86/boot/compressed/acpi.c: In function ‘__efi_get_rsdp_addr’:
arch/x86/boot/compressed/acpi.c:27:13: warning: unused variable ‘ret’ [-Wunused-variable]
   27 |         int ret;
      |             ^~~
arch/x86/boot/compressed/acpi.c: In function ‘efi_get_rsdp_addr’:
arch/x86/boot/compressed/acpi.c:55:22: warning: unused variable ‘nr_tables’ [-Wunused-variable]
   55 |         unsigned int nr_tables;
      |                      ^~~~~~~~~
arch/x86/boot/compressed/sev.c: In function ‘enforce_vmpl0’:
arch/x86/boot/compressed/sev.c:256:13: warning: unused variable ‘err’ [-Wunused-variable]
  256 |         int err;
      |             ^~~


Would you like to do the above instead and fix them all in one go?

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ