mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
x86/xen: Fix xen_e820_swap_entry_with_ram()
[ Upstream commit28e03f78e6] When swapping a not page-aligned E820 map entry with RAM, the start address of the modified entry is calculated wrong (the offset into the page is subtracted instead of being added to the page address). Fixes:be35d91c88("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory") Reported-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <20260505102417.208138-1-jgross@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
06cc5ad2c1
commit
1822997aa8
@@ -656,7 +656,7 @@ static void __init xen_e820_swap_entry_with_ram(struct e820_entry *swap_entry)
|
||||
/* Fill new entry (keep size and page offset). */
|
||||
entry->type = swap_entry->type;
|
||||
entry->addr = entry_end - swap_size +
|
||||
swap_addr - swap_entry->addr;
|
||||
swap_entry->addr - swap_addr;
|
||||
entry->size = swap_entry->size;
|
||||
|
||||
/* Convert old entry to RAM, align to pages. */
|
||||
|
||||
Reference in New Issue
Block a user