Re: [PATCH v2 3/3] mm/vmalloc: fix vmalloc_to_page for huge vmap mappings
From: Anshuman Khandual <hidden>
Date: 2019-07-01 09:58:29
Also in:
linux-mm, linuxppc-dev
From: Anshuman Khandual <hidden>
Date: 2019-07-01 09:58:29
Also in:
linux-mm, linuxppc-dev
On 07/01/2019 12:10 PM, Nicholas Piggin wrote:
vmalloc_to_page returns NULL for addresses mapped by larger pages[*].
Whether or not a vmap is huge depends on the architecture details,
alignments, boot options, etc., which the caller can not be expected
to know. Therefore HUGE_VMAP is a regression for vmalloc_to_page.
This change teaches vmalloc_to_page about larger pages, and returns
the struct page that corresponds to the offset within the large page.
This makes the API agnostic to mapping implementation details.
[*] As explained by commit 029c54b095995 ("mm/vmalloc.c: huge-vmap:
fail gracefully on unexpected huge vmap mappings")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>Reviewed-by: Anshuman Khandual <redacted> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel