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]
Date:   Tue, 6 Apr 2021 14:26:01 +0800
From:   Keqian Zhu <zhukeqian1@...wei.com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        <linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>
CC:     Ben Gardon <bgardon@...gle.com>
Subject: Re: [PATCH] KVM: MMU: protect TDP MMU pages only down to required
 level

Hi Paolo,

I'm just going to fix this issue, and found that you have done this ;-)
Please feel free to add:

Reviewed-by: Keqian Zhu <zhukeqian1@...wei.com>

Thanks,
Keqian

On 2021/4/2 20:17, Paolo Bonzini wrote:
> When using manual protection of dirty pages, it is not necessary
> to protect nested page tables down to the 4K level; instead KVM
> can protect only hugepages in order to split them lazily, and
> delay write protection at 4K-granularity until KVM_CLEAR_DIRTY_LOG.
> This was overlooked in the TDP MMU, so do it there as well.
> 
> Fixes: a6a0b05da9f37 ("kvm: x86/mmu: Support dirty logging for the TDP MMU")
> Cc: Ben Gardon <bgardon@...gle.com>
> Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>
> ---
>  arch/x86/kvm/mmu/mmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index efb41f31e80a..0d92a269c5fa 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -5538,7 +5538,7 @@ void kvm_mmu_slot_remove_write_access(struct kvm *kvm,
>  	flush = slot_handle_level(kvm, memslot, slot_rmap_write_protect,
>  				start_level, KVM_MAX_HUGEPAGE_LEVEL, false);
>  	if (is_tdp_mmu_enabled(kvm))
> -		flush |= kvm_tdp_mmu_wrprot_slot(kvm, memslot, PG_LEVEL_4K);
> +		flush |= kvm_tdp_mmu_wrprot_slot(kvm, memslot, start_level);
>  	write_unlock(&kvm->mmu_lock);
>  
>  	/*
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ