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: <CALMp9eTs4hYpDK+KzXEzaAptcfor+9f7cM9Yd9kvd5v27sdFRw@mail.gmail.com>
Date:   Mon, 11 May 2020 16:51:54 -0700
From:   Jim Mattson <jmattson@...gle.com>
To:     Babu Moger <babu.moger@....com>
Cc:     Jonathan Corbet <corbet@....net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Joerg Roedel <joro@...tes.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        mchehab+samsung@...nel.org, changbin.du@...el.com,
        Nadav Amit <namit@...are.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        yang.shi@...ux.alibaba.com,
        Anthony Steinhauser <asteinhauser@...gle.com>,
        anshuman.khandual@....com, Jan Kiszka <jan.kiszka@...mens.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        steven.price@....com, rppt@...ux.vnet.ibm.com, peterx@...hat.com,
        Dan Williams <dan.j.williams@...el.com>,
        Arjun Roy <arjunroy@...gle.com>, logang@...tatee.com,
        Thomas Hellstrom <thellstrom@...are.com>,
        Andrea Arcangeli <aarcange@...hat.com>, justin.he@....com,
        robin.murphy@....com, ira.weiny@...el.com,
        Kees Cook <keescook@...omium.org>,
        Juergen Gross <jgross@...e.com>,
        Andrew Cooper <andrew.cooper3@...rix.com>,
        pawan.kumar.gupta@...ux.intel.com,
        "Yu, Fenghua" <fenghua.yu@...el.com>,
        vineela.tummalapalli@...el.com, yamada.masahiro@...ionext.com,
        sam@...nborg.org, acme@...hat.com, linux-doc@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>,
        kvm list <kvm@...r.kernel.org>
Subject: Re: [PATCH v3 3/3] KVM: x86: Move MPK feature detection to common code

On Mon, May 11, 2020 at 4:33 PM Babu Moger <babu.moger@....com> wrote:
>
> Both Intel and AMD support (MPK) Memory Protection Key feature.
> Move the feature detection from VMX to the common code. It should
> work for both the platforms now.
>
> Signed-off-by: Babu Moger <babu.moger@....com>
> ---
>  arch/x86/kvm/cpuid.c   |    4 +++-
>  arch/x86/kvm/vmx/vmx.c |    4 ----
>  2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index 901cd1fdecd9..3da7d6ea7574 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -278,6 +278,8 @@ void kvm_set_cpu_caps(void)
>  #ifdef CONFIG_X86_64
>         unsigned int f_gbpages = F(GBPAGES);
>         unsigned int f_lm = F(LM);
> +       /* PKU is not yet implemented for shadow paging. */
> +       unsigned int f_pku = tdp_enabled ? F(PKU) : 0;

I think we still want to require that OSPKE be set on the host before
exposing PKU to the guest.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ