x86/kasan, mm: Introduce generic kasan_populate_zero_shadow()
authorAndrey Ryabinin <[email protected]>
Thu, 13 Aug 2015 05:37:24 +0000 (08:37 +0300)
committerIngo Molnar <[email protected]>
Sat, 22 Aug 2015 12:54:55 +0000 (14:54 +0200)
commit69786cdb379bbc6eab14cf2393c1abd879316e85
treeddfaf2f85b64057553a745c9080c2e6714880613
parent920e277e17f12870188f4564887a95ae9ac03e31
x86/kasan, mm: Introduce generic kasan_populate_zero_shadow()

Introduce generic kasan_populate_zero_shadow(shadow_start,
shadow_end). This function maps kasan_zero_page to the
[shadow_start, shadow_end] addresses.

This replaces x86_64 specific populate_zero_shadow() and will
be used for ARM64 in follow on patches.

The main changes from original version are:

 * Use p?d_populate*() instead of set_p?d()
 * Use memblock allocator directly instead of vmemmap_alloc_block()
 * __pa() instead of __pa_nodebug(). __pa() causes troubles
   iff we use it before kasan_early_init(). kasan_populate_zero_shadow()
   will be used later, so we ok with __pa() here.

Signed-off-by: Andrey Ryabinin <[email protected]>
Acked-by: Catalin Marinas <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Alexey Klimov <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Aneesh Kumar K.V <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: David Keitel <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Yury <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/mm/kasan_init_64.c
include/linux/kasan.h
mm/kasan/Makefile
mm/kasan/kasan_init.c [new file with mode: 0644]