Re: [PATCHv2] arm64: Correctly bounds check virt_addr_valid

2016-09-22 Thread Will Deacon
On Wed, Sep 21, 2016 at 03:25:04PM -0700, Laura Abbott wrote: > > virt_addr_valid is supposed to return true if and only if virt_to_page > returns a valid page structure. The current macro does math on whatever > address is given and passes that to pfn_valid to verify. vmalloc and > module address

Re: [PATCHv2] arm64: Correctly bounds check virt_addr_valid

2016-09-21 Thread Kees Cook
On Wed, Sep 21, 2016 at 3:25 PM, Laura Abbott wrote: > > virt_addr_valid is supposed to return true if and only if virt_to_page > returns a valid page structure. The current macro does math on whatever > address is given and passes that to pfn_valid to verify. vmalloc and > module addresses can ha

[PATCHv2] arm64: Correctly bounds check virt_addr_valid

2016-09-21 Thread Laura Abbott
virt_addr_valid is supposed to return true if and only if virt_to_page returns a valid page structure. The current macro does math on whatever address is given and passes that to pfn_valid to verify. vmalloc and module addresses can happen to generate a pfn that 'happens' to be valid. Fix this by