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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d53bd488-b871-47c4-c65c-4c231eff3cf9@redhat.com>
Date:   Wed, 15 Jan 2020 19:07:41 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Sean Christopherson <sean.j.christopherson@...el.com>
Cc:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 0/5] KVM: x86: X86_FEATURE bit() cleanup

On 17/12/19 22:32, Sean Christopherson wrote:
> Small series to add build-time protections on reverse CPUID lookup (and
> other usages of bit()), and to rename the misleading-generic bit() helper
> to something that better conveys its purpose.
> 
> I don't love emulator changes in patch 1 as adding one-off helpers is a
> bit silly, but IMO it's the lesser of two evils, e.g. adding dedicated
> helpers is arguably less error prone than manually encoding a CPUID
> lookup, and the helpers approach avoids having to include cpuid.h in the
> emulator code.
> 
> v2:
>   - Rework the assertions to use the reverse_cpuid table instead of
>     using the last cpufeatures word (which was not at all intuitive).
> 
> Sean Christopherson (5):
>   KVM: x86: Add dedicated emulator helpers for querying CPUID features
>   KVM: x86: Move bit() helper to cpuid.h
>   KVM: x86: Add CPUID_7_1_EAX to the reverse CPUID table
>   KVM: x86: Expand build-time assertion on reverse CPUID usage
>   KVM: x86: Refactor and rename bit() to feature_bit() macro
> 
>  arch/x86/include/asm/kvm_emulate.h |  4 +++
>  arch/x86/kvm/cpuid.c               |  5 ++--
>  arch/x86/kvm/cpuid.h               | 41 +++++++++++++++++++++++++----
>  arch/x86/kvm/emulate.c             | 21 +++------------
>  arch/x86/kvm/svm.c                 |  4 +--
>  arch/x86/kvm/vmx/vmx.c             | 42 +++++++++++++++---------------
>  arch/x86/kvm/x86.c                 | 18 +++++++++++++
>  arch/x86/kvm/x86.h                 |  5 ----
>  8 files changed, 87 insertions(+), 53 deletions(-)
> 

Queued, thanks.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ