]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/kasan: Fix KASAN shadow region page tables
authorAlexander Popov <alpopov@ptsecurity.com>
Thu, 2 Jul 2015 09:09:34 +0000 (12:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Aug 2015 19:21:52 +0000 (12:21 -0700)
commit2fe36f4f2f2ae489cb7ab431b9a35947d426bbbb
tree2ab2e2b0b1794d0498556ec11b671d1bd60937e9
parent16e28fc11cd6a2d04a488486cb7c945168dc2a8d
x86/kasan: Fix KASAN shadow region page tables

commit 5d5aa3cfca5cf74cd928daf3674642e6004328d1 upstream.

Currently KASAN shadow region page tables created without
respect of physical offset (phys_base). This causes kernel halt
when phys_base is not zero.

So let's initialize KASAN shadow region page tables in
kasan_early_init() using __pa_nodebug() which considers
phys_base.

This patch also separates x86_64_start_kernel() from KASAN low
level details by moving kasan_map_early_shadow(init_level4_pgt)
into kasan_early_init().

Remove the comment before clear_bss() which stopped bringing
much profit to the code readability. Otherwise describing all
the new order dependencies would be too verbose.

Signed-off-by: Alexander Popov <alpopov@ptsecurity.com>
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <adech.fo@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1435828178-10975-3-git-send-email-a.ryabinin@samsung.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/kasan.h
arch/x86/kernel/head64.c
arch/x86/kernel/head_64.S
arch/x86/mm/kasan_init_64.c