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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 6 May 2020 15:36:17 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Babu Moger <babu.moger@....com>, corbet@....net,
        tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
        pbonzini@...hat.com, sean.j.christopherson@...el.com
Cc:     x86@...nel.org, vkuznets@...hat.com, wanpengli@...cent.com,
        jmattson@...gle.com, joro@...tes.org, dave.hansen@...ux.intel.com,
        luto@...nel.org, peterz@...radead.org, mchehab+samsung@...nel.org,
        changbin.du@...el.com, namit@...are.com, bigeasy@...utronix.de,
        yang.shi@...ux.alibaba.com, asteinhauser@...gle.com,
        anshuman.khandual@....com, jan.kiszka@...mens.com,
        akpm@...ux-foundation.org, steven.price@....com,
        rppt@...ux.vnet.ibm.com, peterx@...hat.com,
        dan.j.williams@...el.com, arjunroy@...gle.com, logang@...tatee.com,
        thellstrom@...are.com, aarcange@...hat.com, justin.he@....com,
        robin.murphy@....com, ira.weiny@...el.com, keescook@...omium.org,
        jgross@...e.com, andrew.cooper3@...rix.com,
        pawan.kumar.gupta@...ux.intel.com, fenghua.yu@...el.com,
        vineela.tummalapalli@...el.com, yamada.masahiro@...ionext.com,
        sam@...nborg.org, acme@...hat.com, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH 2/2] KVM: SVM: Add support for MPK feature on AMD

On 5/6/20 3:02 PM, Babu Moger wrote:
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -818,6 +818,10 @@ static __init void svm_set_cpu_caps(void)
>  	if (boot_cpu_has(X86_FEATURE_LS_CFG_SSBD) ||
>  	    boot_cpu_has(X86_FEATURE_AMD_SSBD))
>  		kvm_cpu_cap_set(X86_FEATURE_VIRT_SSBD);
> +
> +	/* PKU is not yet implemented for shadow paging. */
> +	if (npt_enabled && boot_cpu_has(X86_FEATURE_OSPKE))
> +		kvm_cpu_cap_check_and_set(X86_FEATURE_PKU);
>  }

Reviewed-by: Dave Hansen <dave.hansen@...el.com>

But, I'll also say that we probably shouldn't have put the other code
into arch/x86/kvm/vmx/vmx.c in the first place.  It would be much nicer
if this refactored the current code into a common spot rather than
copying.  But, I do understand the impulse to do it the way it was done.

Powered by blists - more mailing lists