|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.20] x86/setup: correct off-by-1 in module mapping
commit c607822b5ae946cfc26efd9dd6ffb45f041e2dac
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Mar 20 12:55:32 2025 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Mar 20 12:55:32 2025 +0100
x86/setup: correct off-by-1 in module mapping
If a module's length is an exact multiple of PAGE_SIZE, the 2nd argument
passed to set_pdx_range() would be one larger than intended. Use
PFN_{UP,DOWN}() there instead.
Fixes: cd7cc5320bb2 ("x86/boot: add start and size fields to struct
boot_module")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
master commit: c3b54301fbe918c7e7e9c3b2dfe671c1ab79f882
master date: 2025-03-20 08:51:55 +0100
---
xen/arch/x86/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 8ebe5a9443..6e49d2705b 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1728,7 +1728,7 @@ void asmlinkage __init noreturn __start_xen(void)
{
unsigned long s = bi->mods[i].start, l = bi->mods[i].size;
- set_pdx_range(paddr_to_pfn(s), paddr_to_pfn(s + l) + 1);
+ set_pdx_range(PFN_DOWN(s), PFN_UP(s + l));
map_pages_to_xen((unsigned long)maddr_to_virt(s), maddr_to_mfn(s),
PFN_UP(l), PAGE_HYPERVISOR);
}
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |