From 613b1589a3da73cdc5e9313d65bc7c723f574531 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Sun, 21 Apr 2024 17:11:37 -0400 Subject: Always dereference the post-I/O-MMU-translated address in mmu.c Previously attempted to dereference non-I/O-MMU translated addresses, which resulted in accessing effectively arbitrary physical addresses, causing errononus results from search_page_directory() in particular. --- mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmu.c b/mmu.c index 70c00f9..ea21f4e 100644 --- a/mmu.c +++ b/mmu.c @@ -62,7 +62,7 @@ void __iomem *pd_deref(struct nvdebug_state *g, uintptr_t addr, enum PD_TARGET p if (!phys) return 0; - return phys_to_virt(addr); + return phys_to_virt(phys); } // Internal helper for search_page_directory(). -- cgit v1.2.2