Skip to contentSkip to conversation

x86/kasan: support KASAN_VMALLOC

PATCH In review [email protected] 1 participant 1 message Dec 1, 2019

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 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.

---

 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

_