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: <1033024644.226.1633358010150@office.mailbox.org>
Date:   Mon, 4 Oct 2021 16:33:30 +0200 (CEST)
From:   torvic9@...lbox.org
To:     Paolo Bonzini <pbonzini@...hat.com>,
        "seanjc@...gle.com" <seanjc@...gle.com>,
        "vkuznets@...hat.com" <vkuznets@...hat.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "ndesaulniers@...gle.com" <ndesaulniers@...gle.com>,
        "nathan@...nel.org" <nathan@...nel.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "bp@...en8.de" <bp@...en8.de>
Subject: Re: [BUG] [5.15] Compilation error in arch/x86/kvm/mmu/spte.h with
 clang-14


> torvic9@...lbox.org hat am 04.10.2021 12:10 geschrieben:
> 
>  
> > Paolo Bonzini <pbonzini@...hat.com> hat am 04.10.2021 11:49 geschrieben:
> > 
> >  
> > On 04/10/21 11:30, torvic9@...lbox.org wrote:
> > > 
> > >> Paolo Bonzini <pbonzini@...hat.com> hat am 04.10.2021 11:26 geschrieben:
> > >>
> > >>   
> > >> On 04/10/21 11:08, torvic9@...lbox.org wrote:
> > >>> I encounter the following issue when compiling 5.15-rc4 with clang-14:
> > >>>
> > >>> In file included from arch/x86/kvm/mmu/mmu.c:27:
> > >>> arch/x86/kvm/mmu/spte.h:318:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
> > >>>           return __is_bad_mt_xwr(rsvd_check, spte) |
> > >>>                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >>>                                                    ||
> > >>> arch/x86/kvm/mmu/spte.h:318:9: note: cast one or both operands to int to silence this warning
> > >>
> > >> The warning is wrong, as mentioned in the line right above:
> > > 
> > > So it's an issue with clang-14 then?
> > > (I add Nick and Nathan)
> > 
> > My clang here doesn't have the option, so I'm going to ask---are you 
> > using W=1?  I can see why clang is warning for KVM's code, but in my 
> > opinion such a check should only be in -Wextra.
> 
> I don't use any options (not that I'm aware of).
> Clang version 14.0.0 5f7a5353301b776ffb0e5fb048992898507bf7ee

Probably the cause for this bug is this recent llvm commit:
https://github.com/llvm/llvm-project/commit/f59cc9542bfb461d16ad12b2cc4be4abbfd9d96e

> 
> > 
> > Paolo
> > 
> > >>
> > >>           /*
> > >>            * Use a bitwise-OR instead of a logical-OR to aggregate the reserved
> > >>            * bits and EPT's invalid memtype/XWR checks to avoid an extra Jcc
> > >>            * (this is extremely unlikely to be short-circuited as true).
> > >>            */
> > >>
> > >> Paolo
> > >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ