On 03/07/2016 04:36 AM, Paolo Bonzini wrote:
On 06/03/2016 09:00, Xiao Guangrong wrote:
if (vcpu_match_mmio_gva(vcpu, gva)
&& !permission_fault(vcpu, vcpu->arch.walk_mmu,
- vcpu->arch.access, access)) {
+ vcpu->arch.access, 0, access)) {
No. The pkey is not always 0.
We should cache PKEY for the mmio access and use it here to check if the
right is adequate.
This is just an optimization I think, so it can have false negatives (it
won't have many in practice because MMIO accesses are usually done in
supervisor mode). The actual check is done when
vcpu->arch.walk_mmu->gva_to_gpa is called.
Okay, this patchset disabled PKEY for soft mmu (ept = 0) so it should be safe,
however some comments would be appreciated.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html