[PATCH] arm64: Correct virt_addr_valid

Laura Abbott lauraa at codeaurora.org
Mon Dec 16 13:28:45 EST 2013


On 12/13/2013 3:57 AM, Catalin Marinas wrote:
>
> OK, I re-read it now.
>
>> Yes, I believe the point was that if we call virt_addr_valid on a
>> not-direct-mapped address it should return false. We still need the
>> range check on arm64 systems as well to ensure this.
>
> On arm64 we don't have highmem, so all RAM would be directly mapped (and
> linear). Is there a case on a 64-bit architecture where pfn_valid() is
> true but the memory not mapped? We don't unmap any memory which is
> pfn_valid().
>

We don't have highmem but we still have a vmalloc region. Calling 
virt_to_page on a vmalloc address will not give a valid page so 
virt_addr_valid should return false on anything in the vmalloc region.

Thanks,
Laura

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation



More information about the linux-arm-kernel mailing list