x86/kasan: support KASAN_VMALLOC
Subsystems (4)
[email protected]
maintainerPATCH 96/158 x86/kasan: support KASAN_VMALLOC
From: Daniel Axtens <[email protected]>
Subject: x86/kasan: support KASAN_VMALLOC
In the case where KASAN directly allocates memory to back vmalloc space, don't map the early shadow page over it.
We prepopulate pgds/p4ds for the range that would otherwise be empty. This is required to get it synced to hardware on boot, allowing the lower levels of the page tables to be filled dynamically.
Signed-off-by Daniel Axtens <[email protected]>
Acked-by Dmitry Vyukov <[email protected]>
Reviewed-by Andrey Ryabinin <[email protected]>
Cc Alexander Potapenko <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Vasily Gorbik <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
arch/x86/Kconfig | 1 arch/x86/mm/kasan_init_64.c | 61 ++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+)
arch/x86/Kconfig renamed from arch/x86/Kconfig~x86-kasan-support-kasan_vmalloc +1 -0
@@ -135,6 +135,7 @@ config X86 select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_JUMP_LABEL_RELATIVE select HAVE_ARCH_KASAN if X86_64 + select HAVE_ARCH_KASAN_VMALLOC if X86_64 select HAVE_ARCH_KGDB select HAVE_ARCH_MMAP_RND_BITS if MMU select HAVE_ARCH_MMAP_RND_COMPAT_BITS if MMU && COMPAT
arch/x86/mm/kasan_init_64.c renamed from arch/x86/mm/kasan_init_64.c~x86-kasan-support-kasan_vmalloc +61 -0
73 lines not on this page · raw message
_