Re: [PATCH] x86/mm: fix slow_virt_to_phys() for X86_PAE again

From: Toshi Kani
Date: Thu Feb 25 2016 - 11:10:30 EST


On Thu, 2016-02-25 at 01:58 -0800, Dexuan Cui wrote:
> "d1cd12108346: x86, pageattr: Prevent overflow in slow_virt_to_phys() for
> X86_PAE"
> was unintentionally removed by the recent
> "34437e67a672: x86/mm: Fix slow_virt_to_phys() to handle large PAT bit".
>
> And, the variable 'phys_addr' was defined as "unsigned long" by mistake
> -- it should
> be "phys_addr_t".
>
> As a result, Hyper-V network driver in 32-PAE Linux guest can't work
> again.
>
> Fixes: "commmit 34437e67a672: x86/mm: Fix slow_virt_to_phys() to handle
> large PAT bit"
> Signed-off-by: Dexuan Cui <decui@xxxxxxxxxxxxx>
> Cc: Toshi Kani <toshi.kani@xxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
> Cc: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> Cc: gregkh@xxxxxxxxxxxxxxxxxxx
> Cc: linux-mm@xxxxxxxxx
> Cc: olaf@xxxxxxxxx
> Cc: apw@xxxxxxxxxxxxx
> Cc: jasowang@xxxxxxxxxx
> Cc: stable@xxxxxxxxxxxxxxx

Thanks for the fix and adding the comment to explain the trick! ÂThe change
looks good to me.

Reviewed-by: Toshi Kani <toshi.kani@xxxxxxx>

-Toshi