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-prev] [day] [month] [year] [list]
Date:   Thu, 21 Apr 2022 21:43:07 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Mingwei Zhang <mizhang@...gle.com>
Subject: Re: [PATCH] KVM: Fix build error on s390 due to
 kvm_flush_shadow_all() being hidden

On 4/21/22 21:26, Sean Christopherson wrote:
> Hoist kvm_flush_shadow_all() out of the #ifdef block that depends on the
> mmu_notifier being enabled and wanted by KVM.  KVM s390 doesn't utilize
> the mmu_notifier, and so the direct call to kvm_flush_shadow_all() in
> vm_destroy() rightly complains.
> 
> virt/kvm/kvm_main.c: In function ‘kvm_destroy_vm’:
> virt/kvm/kvm_main.c:1248:9: error: implicit declaration of function ‘kvm_flush_shadow_all’;
> did you mean ‘kvm_arch_flush_shadow_all’? [-Werror=implicit-function-declaration]
>   1248 |         kvm_flush_shadow_all(kvm);
>        |         ^~~~~~~~~~~~~~~~~~~~
>        |         kvm_arch_flush_shadow_all
> 
> Fixes: b56a4ff6bff3 ("KVM: SEV: add cache flush to solve SEV cache incoherency issues")
> Cc: stable@...r.kernel.org
> Cc: Mingwei Zhang <mizhang@...gle.com>
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> ---
>   virt/kvm/kvm_main.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index a719e52f3eb7..f30bb8c16f26 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -361,6 +361,12 @@ void kvm_flush_remote_tlbs(struct kvm *kvm)
>   EXPORT_SYMBOL_GPL(kvm_flush_remote_tlbs);
>   #endif
>   
> +static void kvm_flush_shadow_all(struct kvm *kvm)
> +{
> +	kvm_arch_flush_shadow_all(kvm);
> +	kvm_arch_guest_memory_reclaimed(kvm);
> +}
> +
>   #ifdef KVM_ARCH_NR_OBJS_PER_MEMORY_CACHE
>   static inline void *mmu_memory_cache_alloc_obj(struct kvm_mmu_memory_cache *mc,
>   					       gfp_t gfp_flags)
> @@ -820,12 +826,6 @@ static int kvm_mmu_notifier_test_young(struct mmu_notifier *mn,
>   					     kvm_test_age_gfn);
>   }
>   
> -static void kvm_flush_shadow_all(struct kvm *kvm)
> -{
> -	kvm_arch_flush_shadow_all(kvm);
> -	kvm_arch_guest_memory_reclaimed(kvm);
> -}
> -
>   static void kvm_mmu_notifier_release(struct mmu_notifier *mn,
>   				     struct mm_struct *mm)
>   {
> 
> base-commit: b56a4ff6bff38fc49d8e583a3fbb5e18d1a99963

Thanks, I'll squash this.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ