Re: [PATCH] powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash

2017-05-18 Thread Breno Leitao
On Thu, May 18, 2017 at 08:37:31PM +1000, Michael Ellerman wrote: > virt_addr_valid() is supposed to tell you if it's OK to call virt_to_page() on > an address. What this means in practice is that it should only return true for > addresses in the linear mapping which are backed by a valid PFN. > >

Re: [PATCH] powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash

2017-05-18 Thread Balbir Singh
On Thu, May 18, 2017 at 8:37 PM, Michael Ellerman wrote: > virt_addr_valid() is supposed to tell you if it's OK to call virt_to_page() on > an address. What this means in practice is that it should only return true for > addresses in the linear mapping which are backed by a valid PFN. > > We are f

Re: [PATCH] powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash

2017-05-18 Thread Paul Mackerras
On Thu, May 18, 2017 at 08:37:31PM +1000, Michael Ellerman wrote: > virt_addr_valid() is supposed to tell you if it's OK to call virt_to_page() on > an address. What this means in practice is that it should only return true for > addresses in the linear mapping which are backed by a valid PFN. > >

[PATCH] powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash

2017-05-18 Thread Michael Ellerman
virt_addr_valid() is supposed to tell you if it's OK to call virt_to_page() on an address. What this means in practice is that it should only return true for addresses in the linear mapping which are backed by a valid PFN. We are failing to properly check that the address is in the linear mapping,