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]
Message-ID: <20180307182328.GG12290@flask>
Date:   Wed, 7 Mar 2018 19:23:28 +0100
From:   Radim Krčmář <rkrcmar@...hat.com>
To:     Matthias Kaehlcke <mka@...omium.org>
Cc:     Paolo Bonzini <pbonzini@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Guenter Roeck <groeck@...omium.org>
Subject: Re: [PATCH] KVM: x86: Make enum conversion explicit in
 kvm_pdptr_read()

2018-02-26 14:42-0800, Matthias Kaehlcke:
> The type 'enum kvm_reg_ex' is an extension of 'enum kvm_reg', however
> the extension is only semantical and the compiler doesn't know about the
> relationship between the two types. In kvm_pdptr_read() a value of the
> extended type is passed to kvm_x86_ops->cache_reg(), which expects a
> value of the base type. Clang raises the following warning about the
> type mismatch:

Yeah, expressing this in C type system seems impossible.

> arch/x86/kvm/kvm_cache_regs.h:44:32: warning: implicit conversion from
>   enumeration type 'enum kvm_reg_ex' to different enumeration type
>   'enum kvm_reg' [-Wenum-conversion]
>     kvm_x86_ops->cache_reg(vcpu, VCPU_EXREG_PDPTR);
> 
> Cast VCPU_EXREG_PDPTR to 'enum kvm_reg' to make the compiler happy.
> 
> Signed-off-by: Matthias Kaehlcke <mka@...omium.org>
> ---

Applied, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ