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]
Date:   Fri, 6 May 2022 21:37:52 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>
Cc:     Paolo Bonzini <pbonzini@...hat.com>, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org, Andrew Jones <drjones@...hat.com>,
        David Matlack <dmatlack@...gle.com>,
        Ben Gardon <bgardon@...gle.com>,
        Oliver Upton <oupton@...gle.com>
Subject: Re: [PATCH 003/128] KVM: selftests: Unconditionally compile KVM
 selftests with -Werror

On Thu, May 05, 2022, Vitaly Kuznetsov wrote:
> Sean Christopherson <seanjc@...gle.com> writes:
> 
> > Specify -Werror when compiling KVM's selftests, there's zero reason to
> > let warnings sneak into the selftests.
> >
> > Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> > ---
> >  tools/testing/selftests/kvm/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
> > index af582d168621..c8efaaeb0885 100644
> > --- a/tools/testing/selftests/kvm/Makefile
> > +++ b/tools/testing/selftests/kvm/Makefile
> > @@ -153,7 +153,7 @@ LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/x86/include
> >  else
> >  LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include
> >  endif
> > -CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \
> > +CFLAGS += -Wall -Werror -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \
> >  	-fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \
> >  	-I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \
> >  	-I$(<D) -Iinclude/$(UNAME_M) -I.. $(EXTRA_CFLAGS) $(KHDR_INCLUDES)
> 
> "-Werror" in kvm-unit-tests is a constant source of pain as different
> GCC versions tend to produce different warnings. It's going to be even
> worse for selftests: e.g. bisecting an 'old' kernel on a system with
> somewhat 'newer' compiler and selftests don't even build.
> 
> Personally, I'd prefer "-Werror" to be an acceptance criteria for
> upstream patches (e.g. if something produces warnings on Paolo's
> setup -- the patch doesn't get accepted) but not the hardcoded default
> in Makefile.

I've no objection to dropping this patch.  I mostly added it to ensure that I
didn't sneak in a warning in any of the intermediate patches, and I can accomplish
that by feeding in -Werror via EXTRA_CFLAGS.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ