[PATCH v2 2/2] arm64/mm/kasan: don't use vmemmap_populate() to initialize shadow
Andrey Ryabinin
aryabinin at virtuozzo.com
Tue Nov 7 08:24:38 PST 2017
On 11/06/2017 09:35 PM, Pavel Tatashin wrote:
> From: Will Deacon <will.deacon at arm.com>
>
> The kasan shadow is currently mapped using vmemmap_populate() since that
> provides a semi-convenient way to map pages into init_top_pgt. However,
> since that no longer zeroes the mapped pages, it is not suitable for kasan,
> which requires zeroed shadow memory.
>
> Add kasan_populate_shadow() interface and use it instead of
> vmemmap_populate(). Besides, this allows us to take advantage of gigantic
> pages and use them to populate the shadow, which should save us some memory
> wasted on page tables and reduce TLB pressure.
>
> Signed-off-by: Will Deacon <will.deacon at arm.com>
> Signed-off-by: Pavel Tatashin <pasha.tatashin at oracle.com>
> ---
Acked-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
More information about the linux-arm-kernel
mailing list