Drivers: hv: vmbus: Fix virt_to_hvpfn() for X86_PAE
Dexuan Cui
maintainerPATCH 1/1 Drivers: hv: vmbus: Fix virt_to_hvpfn() for X86_PAE
In the case of X86_PAE, unsigned long is u32, but the physical address type should be u64. Due to the bug here, the netvsc driver can not load successfully, and sometimes the VM can panic due to memory corruption (the hypervisor writes data to the wrong location).
--- drivers/hv/channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hv/channel.c +1 -1
@@ -38,7 +38,7 @@static unsigned long virt_to_hvpfn (void *addr) { -unsigned long paddr; +phys_addr_t paddr;if (is_vmalloc_addr (addr)) paddr = page_to_phys(vmalloc_to_page(addr)) +
Signature · 1 line
2.17.1
From: Dexuan Cui <[email protected]> Sent: Tuesday, May 7, 2019 12:47 AM
Quoted 11 lines
In the case of
X86_PAE, unsigned long is u32, but the physical address type should be u64. Due to the bug here, the netvsc driver can not load successfully, and sometimes the VM can panic due to memory corruption (the hypervisor writes data to the wrong location).Fixes 6ba34171bcbd ("Drivers: hv: vmbus: Remove use of slow_virt_to_phys()")Cc Michael Kelley <[email protected]>Reported-and-tested-by Juliana Rodrigueiro <[email protected]>Signed-off-by Dexuan Cui <[email protected]>
Quoted 7 lines · Michael Kelley
From: Dexuan Cui <[email protected]> Sent: Tuesday, May 7, 2019 12:47 AM
Quoted 6 lines
In the case of
X86_PAE, unsigned long is u32, but the physical address type should be u64. Due to the bug here, the netvsc driver can not load successfully, and sometimes the VM can panic due to memory corruption (the hypervisor writes data to the wrong location).
Quoted 7 lines
Quoted 5 lines
Fixes 6ba34171bcbd ("Drivers: hv: vmbus: Remove use of slow_virt_to_phys()")Cc Michael Kelley <[email protected]>Reported-and-tested-by Juliana Rodrigueiro <[email protected]>Signed-off-by Dexuan Cui <[email protected]>Reviewed-by Michael Kelley <[email protected]>
Queued for hyperv-fixes, thanks!
--
Thanks,
Sasha
Hi Sasha.
I haven't spotted the following patch in the hyperv-fixes branch.
Did I look in the wrong place or it was not applied?
Thanks,
Juliana.
Quoted 21 lines · Sasha Levin
Quoted 7 lines · Michael Kelley
From: Dexuan Cui <[email protected]> Sent: Tuesday, May 7, 2019 12:47 AM
Quoted 6 lines
In the case of
X86_PAE, unsigned long is u32, but the physical address type should be u64. Due to the bug here, the netvsc driver can not load successfully, and sometimes the VM can panic due to memory corruption (the hypervisor writes data to the wrong location).Quoted 7 lines
Quoted 5 lines
Fixes 6ba34171bcbd ("Drivers: hv: vmbus: Remove use of slow_virt_to_phys()")Cc Michael Kelley <[email protected]>Reported-and-tested-by Juliana Rodrigueiro <[email protected]>Signed-off-by Dexuan Cui <[email protected]>Reviewed-by Michael Kelley <[email protected]>Queued for hyperv-fixes, thanks!
Signature · 2 lines
Thanks, Sasha
Sasha Levin
maintainerQuoted 5 lines · Juliana Rodrigueiro
Hi Sasha.
I haven't spotted the following patch in the hyperv-fixes branch.
Did I look in the wrong place or it was not applied?
I've previously dropped it, it's in there now.
--
Thanks,
Sasha