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:   Wed, 28 Oct 2020 18:36:06 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Valdis Klētnieks <valdis.kletnieks@...edu>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        bgardon@...gle.com
Subject: Re: [PATCH 04/22] KVM: mmu: extract spte.h and spte.c

On 27/10/20 15:46, Valdis Klētnieks wrote:
> This died a horrid death on my laptop when building with W=1.
> 
>   CC      arch/x86/kvm/mmu/tdp_iter.o
> In file included from arch/x86/kvm/mmu/tdp_iter.c:5:
> arch/x86/kvm/mmu/spte.h:120:18: error: 'shadow_nonpresent_or_rsvd_mask_len' defined but not used [-Werror=unused-const-variable=]
>   120 | static const u64 shadow_nonpresent_or_rsvd_mask_len = 5;
>       |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/x86/kvm/mmu/spte.h:115:18: error: 'shadow_acc_track_saved_bits_shift' defined but not used [-Werror=unused-const-variable=]
>   115 | static const u64 shadow_acc_track_saved_bits_shift = PT64_SECOND_AVAIL_BITS_SHIFT;
>       |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/x86/kvm/mmu/spte.h:113:18: error: 'shadow_acc_track_saved_bits_mask' defined but not used [-Werror=unused-const-variable=]
>   113 | static const u64 shadow_acc_track_saved_bits_mask = PT64_EPT_READABLE_MASK |
>       |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[2]: *** [scripts/Makefile.build:283: arch/x86/kvm/mmu/tdp_iter.o] Error 1
> make[1]: *** [scripts/Makefile.build:500: arch/x86/kvm] Error 2
> make: *** [Makefile:1799: arch/x86] Error 2
> 
> Do we really need to define 3 static variables in every .c file that includes
> this .h file, directly or not?

I'd expect the compiler to get rid of them, but I will change them to
#defines to fix the warnings.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ