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-next>] [day] [month] [year] [list]
Message-Id: <20210412130938.68178-1-david.edmondson@oracle.com>
Date:   Mon, 12 Apr 2021 14:09:31 +0100
From:   David Edmondson <david.edmondson@...cle.com>
To:     linux-kernel@...r.kernel.org
Cc:     kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Sean Christopherson <seanjc@...gle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Joerg Roedel <joro@...tes.org>,
        Wanpeng Li <wanpengli@...cent.com>,
        Borislav Petkov <bp@...en8.de>,
        Jim Mattson <jmattson@...gle.com>,
        Ingo Molnar <mingo@...hat.com>,
        David Edmondson <david.edmondson@...cle.com>
Subject: [PATCH 0/6] KVM: x86: Make the cause of instruction emulation available to user-space

Instruction emulation happens for a variety of reasons, yet on error
we have no idea exactly what triggered it. Add a cause of emulation to
the various originators and pass it upstream when emulation fails.

Joao originally produced the patches but is busy with other things and
I wanted to use it, so picked it up.

Tested by reverting commit 51b958e5aeb1e18c00332e0b37c5d4e95a3eff84
("KVM: x86: clflushopt should be treated as a no-op by emulation")
then running the test included in
https://lore.kernel.org/r/20201118121129.6276-1-david.edmondson@oracle.com.

Joao Martins (6):
  KVM: x86: add an emulation_reason to x86_emulate_instruction()
  KVM: x86: pass emulation_reason to handle_emulation_failure()
  KVM: x86: add emulation_reason to kvm_emulate_instruction()
  KVM: x86: pass a proper reason to kvm_emulate_instruction()
  KVM: SVM: pass a proper reason in kvm_emulate_instruction()
  KVM: VMX: pass a proper reason in kvm_emulate_instruction()

 arch/x86/include/asm/kvm_host.h | 27 +++++++++++++++++++++++--
 arch/x86/kvm/mmu/mmu.c          |  4 ++--
 arch/x86/kvm/svm/avic.c         |  3 ++-
 arch/x86/kvm/svm/svm.c          | 26 +++++++++++++-----------
 arch/x86/kvm/vmx/vmx.c          | 17 ++++++++--------
 arch/x86/kvm/x86.c              | 35 ++++++++++++++++++++++-----------
 arch/x86/kvm/x86.h              |  3 ++-
 7 files changed, 78 insertions(+), 37 deletions(-)

-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ