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] [day] [month] [year] [list]
Message-ID: <56567025.6030005@lab.ntt.co.jp>
Date:	Thu, 26 Nov 2015 11:36:21 +0900
From:	Takuya Yoshikawa <yoshikawa_takuya_b1@....ntt.co.jp>
To:	Paolo Bonzini <pbonzini@...hat.com>,
	Xiao Guangrong <guangrong.xiao@...ux.intel.com>
Cc:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
	mtosatti@...hat.com
Subject: Re: [PATCH 09/10] KVM: x86: MMU: Move parent_pte handling from
 kvm_mmu_get_page() to link_shadow_page()

On 2015/11/26 1:32, Paolo Bonzini wrote:
> On 20/11/2015 09:57, Xiao Guangrong wrote:

>> You can move this patch to the front of
>> [PATCH 08/10] KVM: x86: MMU: Use for_each_rmap_spte macro instead of
>> pte_list_walk()
>>
>> By moving kvm_mmu_mark_parents_unsync() to the behind of mmu_spte_set()
>> (then the parent
>> spte is present now), you can directly clean up for_each_rmap_spte().
>
> So basically squash together the two patches (8/10 and 9/10) except the
> change to kvm_mmu_mark_parents_unsync; then in the second patch switch
> from pte_list_walk to for_each_rmap_spte.
>
> That makes sense indeed.

Sorry for my being late to respond to Xiao's suggestions.  I could not
use my development machine for a while this week.

In short, this kvm_mmu_mark_parents_unsync() call in kvm_mmu_get_page()
should have been mark_unsync() for the new parent_pte only, because we
are constructing the mappings from/to it and other parents in the
sp->parent_ptes are not related to this fault?

As the code has been this way for some time, a bit scary to change it,
but I'll do some tests without that extra kvm_mmu_mark_parents_unsync()
with a guest (with ept=0) this afternoon.

   Takuya


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ