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-next>] [day] [month] [year] [list]
Date:   Wed, 23 Aug 2017 23:26:04 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc:     junkang.fjk@...baba-inc.com, yang.zhang.wz@...il.com
Subject: [PATCH 0/2] KVM, pkeys: fix handling of PKRU across migration

The host pkru is restored right after vcpu exit (commit 1be0e61), so
KVM_GET_XSAVE will return the host PKRU value instead.  In general,
the PKRU value in vcpu->arch.guest_fpu.state cannot be trusted.

The first patch removes an unnecessary abstraction.  The second
fixes the bug.

Please test the patches, as I don't have the affected hardware.

Paolo

Paolo Bonzini (2):
  KVM: x86: simplify handling of PKRU
  KVM, pkeys: do not use PKRU value in vcpu->arch.guest_fpu.state

 arch/x86/include/asm/fpu/internal.h |  6 +++---
 arch/x86/include/asm/kvm_host.h     |  1 +
 arch/x86/kvm/kvm_cache_regs.h       |  5 -----
 arch/x86/kvm/mmu.h                  |  2 +-
 arch/x86/kvm/svm.c                  |  7 -------
 arch/x86/kvm/vmx.c                  | 23 ++++++-----------------
 arch/x86/kvm/x86.c                  | 17 ++++++++++++++---
 7 files changed, 25 insertions(+), 36 deletions(-)

-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ