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>] [day] [month] [year] [list]
Message-Id: <20251026150219.2711-1-kexinsun@smail.nju.edu.cn>
Date: Sun, 26 Oct 2025 23:02:19 +0800
From: Kexin Sun <kexinsun@...il.nju.edu.cn>
To: Tianrui Zhao <zhaotianrui@...ngson.cn>,
	Bibo Mao <maobibo@...ngson.cn>,
	Huacai Chen <chenhuacai@...nel.org>,
	Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: kvm@...r.kernel.org,
	loongarch@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	linux-mips@...r.kernel.org,
	WANG Xuerui <kernel@...0n.name>,
	Julia Lawall <Julia.Lawall@...ia.fr>,
	Yunbo Lyu <yunbolyu@....edu.sg>,
	ratnadiraw <ratnadiraw@....edu.sg>,
	Kexin Sun <kexinsun@...il.nju.edu.cn>
Subject: [PATCH] KVM: MIPS/LoongArch: Fix typo in pfn_to_pfn_prot comments

The comments in arch/{mips,loongarch}/kvm/mmu.c refer to a non-existent
function "pfn_to_pfn_prot". This is a historical typo.

In MIPS, it was introduced in commit 411740f5422a ("KVM: MIPS/MMU:
Implement KVM_CAP_SYNC_MMU") where the actual function being called was
`gfn_to_pfn_prot`.
(see `pfn = gfn_to_pfn_prot(kvm, gfn, write, &writeable);`).
This was later replaced by `kvm_faultin_pfn()` in commit 7e8f1aa59d0b
("KVM: MIPS: Use kvm_faultin_pfn() to map pfns into the guest").

The LoongArch code, likely copied from MIPS, inherited this typo upon
its introduction in commit 752e2cd7b4fb ("LoongArch: KVM: Implement
kvm mmu operations"). The actual function call was likewise updated to
`kvm_faultin_pfn()` in commit 14d02b7ff912 ("KVM: LoongArch: Use
kvm_faultin_pfn() to map pfns into the guest").

Update the comments in both files to correctly reference the current
function, `kvm_faultin_pfn`.

No functional change; comments only.

Fixes: 411740f5422a ("KVM: MIPS/MMU: Implement KVM_CAP_SYNC_MMU")
Fixes: 752e2cd7b4fb ("LoongArch: KVM: Implement kvm mmu operations").

Signed-off-by: Kexin Sun <kexinsun@...il.nju.edu.cn>
---
 arch/loongarch/kvm/mmu.c | 2 +-
 arch/mips/kvm/mmu.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/loongarch/kvm/mmu.c b/arch/loongarch/kvm/mmu.c
index 7c8143e79c12..1a9ed6f56a1b 100644
--- a/arch/loongarch/kvm/mmu.c
+++ b/arch/loongarch/kvm/mmu.c
@@ -803,7 +803,7 @@ static int kvm_map_page(struct kvm_vcpu *vcpu, unsigned long gpa, bool write)
 retry:
 	/*
 	 * Used to check for invalidations in progress, of the pfn that is
-	 * returned by pfn_to_pfn_prot below.
+	 * returned by kvm_faultin_pfn() below.
 	 */
 	mmu_seq = kvm->mmu_invalidate_seq;
 	/*
diff --git a/arch/mips/kvm/mmu.c b/arch/mips/kvm/mmu.c
index d2c3b6b41f18..da51707a2366 100644
--- a/arch/mips/kvm/mmu.c
+++ b/arch/mips/kvm/mmu.c
@@ -574,7 +574,7 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,
 retry:
 	/*
 	 * Used to check for invalidations in progress, of the pfn that is
-	 * returned by pfn_to_pfn_prot below.
+	 * returned by kvm_faultin_pfn() below.
 	 */
 	mmu_seq = kvm->mmu_invalidate_seq;
 	/*
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ