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: <CALMp9eSAnkrUaBgtDAu7CDM=-vh3Cb9fVikrfOt30K1EXCqmBw@mail.gmail.com>
Date:   Tue, 12 May 2020 09:39:44 -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 2/3] KVM: x86: Move pkru save/restore to x86.c

On Mon, May 11, 2020 at 4:33 PM Babu Moger <babu.moger@....com> wrote:
>
> MPK feature is supported by both VMX and SVM. So we can
> safely move pkru state save/restore to common code. Also
> move all the pkru data structure to kvm_vcpu_arch.
>
> Also fixes the problem Jim Mattson pointed and suggested below.
>
> "Though rdpkru and wrpkru are contingent upon CR4.PKE, the PKRU
> resource isn't. It can be read with XSAVE and written with XRSTOR.
> So, if we don't set the guest PKRU value here(kvm_load_guest_xsave_state),
> the guest can read the host value.
>
> In case of kvm_load_host_xsave_state, guest with CR4.PKE clear could
> potentially use XRSTOR to change the host PKRU value"
>
> Signed-off-by: Babu Moger <babu.moger@....com>

I would do the bugfix as a separate commit, to ease backporting it to
the stable branches.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ