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: <20200608143859.GA8223@linux.intel.com>
Date:   Mon, 8 Jun 2020 07:38:59 -0700
From:   Sean Christopherson <sean.j.christopherson@...el.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     Vitaly Kuznetsov <vkuznets@...hat.com>, kvm@...r.kernel.org,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Marcelo Bandeira Condotta <mcondotta@...hat.com>,
        Makarand Sonare <makarandsonare@...gle.com>,
        Peter Xu <peterx@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] KVM: selftests: fix vmx_preemption_timer_test build
 with GCC10

On Mon, Jun 08, 2020 at 01:57:03PM +0200, Paolo Bonzini wrote:
> On 08/06/20 13:23, Vitaly Kuznetsov wrote:
> > GCC10 fails to build vmx_preemption_timer_test:
> > 
> > gcc -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99
> > -fno-stack-protector -fno-PIE -I../../../../tools/include
> >  -I../../../../tools/arch/x86/include -I../../../../usr/include/
> >  -Iinclude -Ix86_64 -Iinclude/x86_64 -I..  -pthread  -no-pie
> >  x86_64/evmcs_test.c ./linux/tools/testing/selftests/kselftest_harness.h
> >  ./linux/tools/testing/selftests/kselftest.h
> >  ./linux/tools/testing/selftests/kvm/libkvm.a
> >  -o ./linux/tools/testing/selftests/kvm/x86_64/evmcs_test
> > /usr/bin/ld: ./linux/tools/testing/selftests/kvm/libkvm.a(vmx.o):
> >  ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:603:
> >  multiple definition of `ctrl_exit_rev'; /tmp/ccMQpvNt.o:
> >  ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:603:
> >  first defined here
> > /usr/bin/ld: ./linux/tools/testing/selftests/kvm/libkvm.a(vmx.o):
> >  ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:602:
> >  multiple definition of `ctrl_pin_rev'; /tmp/ccMQpvNt.o:
> >  ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:602:
> >  first defined here
> >  ...
> > 
> > ctrl_exit_rev/ctrl_pin_rev/basic variables are only used in
> > vmx_preemption_timer_test.c, just move them there.
> > 
> > Fixes: 8d7fbf01f9af ("KVM: selftests: VMX preemption timer migration test")
> > Reported-by: Marcelo Bandeira Condotta <mcondotta@...hat.com>
> > Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
> > ---
> >  tools/testing/selftests/kvm/include/x86_64/vmx.h              | 4 ----
> >  .../testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c  | 4 ++++
> >  2 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tools/testing/selftests/kvm/include/x86_64/vmx.h b/tools/testing/selftests/kvm/include/x86_64/vmx.h
> > index ccff3e6e2704..766af9944294 100644
> > --- a/tools/testing/selftests/kvm/include/x86_64/vmx.h
> > +++ b/tools/testing/selftests/kvm/include/x86_64/vmx.h
> > @@ -598,10 +598,6 @@ union vmx_ctrl_msr {
> >  	};
> >  };
> >  
> > -union vmx_basic basic;
> > -union vmx_ctrl_msr ctrl_pin_rev;
> > -union vmx_ctrl_msr ctrl_exit_rev;
> > -
> >  struct vmx_pages *vcpu_alloc_vmx(struct kvm_vm *vm, vm_vaddr_t *p_vmx_gva);
> >  bool prepare_for_vmx_operation(struct vmx_pages *vmx);
> >  void prepare_vmcs(struct vmx_pages *vmx, void *guest_rip, void *guest_rsp);
> > diff --git a/tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c b/tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c
> > index cc72b6188ca7..a7737af1224f 100644
> > --- a/tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c
> > +++ b/tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c
> > @@ -31,6 +31,10 @@ bool l2_save_restore_done;
> >  static u64 l2_vmx_pt_start;
> >  volatile u64 l2_vmx_pt_finish;
> >  
> > +union vmx_basic basic;
> > +union vmx_ctrl_msr ctrl_pin_rev;
> > +union vmx_ctrl_msr ctrl_exit_rev;
> > +
> >  void l2_guest_code(void)
> >  {
> >  	u64 vmx_pt_delta;
> > 
> 
> Queued both, thanks.

Hmm, someone go awry with your queue a while back?

https://lkml.kernel.org/r/ce6a5284-e09b-2f51-8cb6-baa29b3ac5c3@redhat.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ