22 Aug, 2015

1 commit

  • 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
    Acked-by: Catalin Marinas
    Cc: Alexander Potapenko
    Cc: Alexey Klimov
    Cc: Andrew Morton
    Cc: Aneesh Kumar K.V
    Cc: Arnd Bergmann
    Cc: David Keitel
    Cc: Dmitry Vyukov
    Cc: Linus Torvalds
    Cc: Linus Walleij
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: Yury
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-mm@kvack.org
    Link: http://lkml.kernel.org/r/1439444244-26057-3-git-send-email-ryabinin.a.a@gmail.com
    Signed-off-by: Ingo Molnar

    Andrey Ryabinin