[folded-merged] kasan-support-backing-vmalloc-space-with-real-shadow-memory-update.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: update to "kasan: support backing vmalloc space with real shadow memory"
has been removed from the -mm tree.  Its filename was
     kasan-support-backing-vmalloc-space-with-real-shadow-memory-update.patch

This patch was dropped because it was folded into kasan-support-backing-vmalloc-space-with-real-shadow-memory.patch

------------------------------------------------------
From: Daniel Axtens <dja@xxxxxxxxxx>
Subject: update to "kasan: support backing vmalloc space with real shadow memory"

There are 2 changes:

 - A fixup to the per-cpu allocator path to avoid allocating memory
   under a spinlock, thanks Qian Cai.

 - Insert flush_cache_vmap() between mapping shadow and poisoning
   it. This is a no-op on x86 and arm64, but on powerpc it does a
   ptesync instruction which prevents occasional page faults.

Link: http://lkml.kernel.org/r/20191120052719.7201-1-dja@xxxxxxxxxx
Signed-off-by: Daniel Axtens <dja@xxxxxxxxxx>
Signed-off-by: Mark Rutland <mark.rutland@xxxxxxx> [shadow rework]
Co-developed-by: Mark Rutland <mark.rutland@xxxxxxx>
Acked-by: Vasily Gorbik <gor@xxxxxxxxxxxxx>
Reviewed-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>
Cc: Alexander Potapenko <glider@xxxxxxxxxx>
Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
Cc: Christophe Leroy <christophe.leroy@xxxxxx>
Cc: Qian Cai <cai@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/kasan/common.c |    2 ++
 mm/vmalloc.c      |    5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

--- a/mm/kasan/common.c~kasan-support-backing-vmalloc-space-with-real-shadow-memory-update
+++ a/mm/kasan/common.c
@@ -794,6 +794,8 @@ int kasan_populate_vmalloc(unsigned long
 	if (ret)
 		return ret;
 
+	flush_cache_vmap(shadow_start, shadow_end);
+
 	kasan_unpoison_shadow(area->addr, requested_size);
 
 	area->flags |= VM_KASAN;
--- a/mm/vmalloc.c~kasan-support-backing-vmalloc-space-with-real-shadow-memory-update
+++ a/mm/vmalloc.c
@@ -3414,11 +3414,14 @@ retry:
 
 		setup_vmalloc_vm_locked(vms[area], vas[area], VM_ALLOC,
 				 pcpu_get_vm_areas);
+	}
+	spin_unlock(&vmap_area_lock);
 
+	/* populate the shadow space outside of the lock */
+	for (area = 0; area < nr_vms; area++) {
 		/* assume success here */
 		kasan_populate_vmalloc(sizes[area], vms[area]);
 	}
-	spin_unlock(&vmap_area_lock);
 
 	kfree(vas);
 	return vms;
_

Patches currently in -mm which might be from dja@xxxxxxxxxx are

kasan-support-backing-vmalloc-space-with-real-shadow-memory.patch
kasan-add-test-for-vmalloc.patch
fork-support-vmap_stack-with-kasan_vmalloc.patch
x86-kasan-support-kasan_vmalloc.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux