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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240120114412.2208a8c1@canb.auug.org.au>
Date: Sat, 20 Jan 2024 11:44:12 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Randy Dunlap
 <rdunlap@...radead.org>, Huacai Chen <chenhuacai@...ngson.cn>, Huacai Chen
 <chenhuacai@...nel.org>, Tianrui Zhao <zhaotianrui@...ngson.cn>, Bibo Mao
 <maobibo@...ngson.cn>, kvm@...r.kernel.org, loongarch@...ts.linux.dev,
 linux-kernel@...r.kernel.org, Xuerui Wang <kernel@...0n.name>, Jiaxun Yang
 <jiaxun.yang@...goat.com>
Subject: Re: [PATCH] LoongArch: KVM: Fix build due to API changes

Hi all,

On Wed, 20 Dec 2023 14:40:24 +1100 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> On Fri, 15 Dec 2023 21:08:06 -0800 Randy Dunlap <rdunlap@...radead.org> wrote:
> >
> > Someone please merge this patch...  
> 
> I have applied it to my merge of the kvm tree today and will keep
> applying it until it is applied to the kvm tree ...
> 
> It looks like this:
> 
> From: Huacai Chen <chenhuacai@...ngson.cn>
> To: Paolo Bonzini <pbonzini@...hat.com>,
> 	Huacai Chen <chenhuacai@...nel.org>,
> 	Tianrui Zhao <zhaotianrui@...ngson.cn>,
> 	Bibo Mao <maobibo@...ngson.cn>
> Cc: kvm@...r.kernel.org,
> 	loongarch@...ts.linux.dev,
> 	linux-kernel@...r.kernel.org,
> 	Xuerui Wang <kernel@...0n.name>,
> 	Jiaxun Yang <jiaxun.yang@...goat.com>,
> 	Huacai Chen <chenhuacai@...ngson.cn>
> Subject: [PATCH] LoongArch: KVM: Fix build due to API changes
> Date: Wed, 15 Nov 2023 17:07:35 +0800
> 
> Commit 8569992d64b8f750e34b7858eac ("KVM: Use gfn instead of hva for
> mmu_notifier_retry") replaces mmu_invalidate_retry_hva() usage with
> mmu_invalidate_retry_gfn() for X86, LoongArch also need similar changes
> to fix build.
> 
> Fixes: 8569992d64b8 ("KVM: Use gfn instead of hva for mmu_notifier_retry")
> Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Tested-by: Randy Dunlap <rdunlap@...radead.org> # build-tested
> Acked-by: Randy Dunlap <rdunlap@...radead.org>
> Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> ---
>  arch/loongarch/kvm/mmu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/loongarch/kvm/mmu.c b/arch/loongarch/kvm/mmu.c
> index 80480df5f550..9463ebecd39b 100644
> --- a/arch/loongarch/kvm/mmu.c
> +++ b/arch/loongarch/kvm/mmu.c
> @@ -627,7 +627,7 @@ static bool fault_supports_huge_mapping(struct kvm_memory_slot *memslot,
>   *
>   * There are several ways to safely use this helper:
>   *
> - * - Check mmu_invalidate_retry_hva() after grabbing the mapping level, before
> + * - Check mmu_invalidate_retry_gfn() after grabbing the mapping level, before
>   *   consuming it.  In this case, mmu_lock doesn't need to be held during the
>   *   lookup, but it does need to be held while checking the MMU notifier.
>   *
> @@ -807,7 +807,7 @@ static int kvm_map_page(struct kvm_vcpu *vcpu, unsigned long gpa, bool write)
>  
>  	/* Check if an invalidation has taken place since we got pfn */
>  	spin_lock(&kvm->mmu_lock);
> -	if (mmu_invalidate_retry_hva(kvm, mmu_seq, hva)) {
> +	if (mmu_invalidate_retry_gfn(kvm, mmu_seq, gfn)) {
>  		/*
>  		 * This can happen when mappings are changed asynchronously, but
>  		 * also synchronously if a COW is triggered by
> -- 
> 2.39.3
> 
> Though my Signed-off-by is not necessary if it applied to the kvm tree.

OK, so it needed to be applied to the merge commit when the loongarch
tree was merged by Linus, but appears to have been forgotten. :-(

-- 
Cheers,
Stephen Rothwell

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ