+ kasan-slub-handle-pointer-tags-in-early_kmem_cache_node_alloc.patch added to -mm tree

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

 



The patch titled
     Subject: kasan, slub: handle pointer tags in early_kmem_cache_node_alloc
has been added to the -mm tree.  Its filename is
     kasan-slub-handle-pointer-tags-in-early_kmem_cache_node_alloc.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/kasan-slub-handle-pointer-tags-in-early_kmem_cache_node_alloc.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/kasan-slub-handle-pointer-tags-in-early_kmem_cache_node_alloc.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Andrey Konovalov <andreyknvl@xxxxxxxxxx>
Subject: kasan, slub: handle pointer tags in early_kmem_cache_node_alloc

The previous patch updated KASAN hooks signatures and their usage in SLAB
and SLUB code, except for the early_kmem_cache_node_alloc function.  This
patch handles that function separately, as it requires to reorder some of
the initialization code to correctly propagate a tagged pointer in case a
tag is assigned by kasan_kmalloc.

Link: http://lkml.kernel.org/r/fc8d0fdcf733a7a52e8d0daaa650f4736a57de8c.1544099024.git.andreyknvl@xxxxxxxxxx
Signed-off-by: Andrey Konovalov <andreyknvl@xxxxxxxxxx>
Cc: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>
Cc: Christoph Lameter <cl@xxxxxxxxx>
Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
Cc: Mark Rutland <mark.rutland@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/slub.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/mm/slub.c~kasan-slub-handle-pointer-tags-in-early_kmem_cache_node_alloc
+++ a/mm/slub.c
@@ -3364,16 +3364,16 @@ static void early_kmem_cache_node_alloc(
 
 	n = page->freelist;
 	BUG_ON(!n);
-	page->freelist = get_freepointer(kmem_cache_node, n);
-	page->inuse = 1;
-	page->frozen = 0;
-	kmem_cache_node->node[node] = n;
 #ifdef CONFIG_SLUB_DEBUG
 	init_object(kmem_cache_node, n, SLUB_RED_ACTIVE);
 	init_tracking(kmem_cache_node, n);
 #endif
-	kasan_kmalloc(kmem_cache_node, n, sizeof(struct kmem_cache_node),
+	n = kasan_kmalloc(kmem_cache_node, n, sizeof(struct kmem_cache_node),
 		      GFP_KERNEL);
+	page->freelist = get_freepointer(kmem_cache_node, n);
+	page->inuse = 1;
+	page->frozen = 0;
+	kmem_cache_node->node[node] = n;
 	init_kmem_cache_node(n);
 	inc_slabs_node(kmem_cache_node, node, page->objects);
 
_

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

kasan-mm-change-hooks-signatures.patch
kasan-slub-handle-pointer-tags-in-early_kmem_cache_node_alloc.patch
kasan-move-common-generic-and-tag-based-code-to-commonc.patch
kasan-rename-source-files-to-reflect-the-new-naming-scheme.patch
kasan-add-config_kasan_generic-and-config_kasan_sw_tags.patch
kasan-arm64-adjust-shadow-size-for-tag-based-mode.patch
kasan-rename-kasan_zero_page-to-kasan_early_shadow_page.patch
kasan-initialize-shadow-to-0xff-for-tag-based-mode.patch
arm64-move-untagged_addr-macro-from-uaccessh-to-memoryh.patch
kasan-add-tag-related-helper-functions.patch
kasan-arm64-untag-address-in-_virt_addr_is_linear.patch
kasan-preassign-tags-to-objects-with-ctors-or-slab_typesafe_by_rcu.patch
kasan-arm64-fix-up-fault-handling-logic.patch
kasan-arm64-enable-top-byte-ignore-for-the-kernel.patch
kasan-mm-perform-untagged-pointers-comparison-in-krealloc.patch
kasan-split-out-generic_reportc-from-reportc.patch
kasan-add-bug-reporting-routines-for-tag-based-mode.patch
mm-move-obj_to_index-to-include-linux-slab_defh.patch
kasan-add-hooks-implementation-for-tag-based-mode.patch
kasan-arm64-add-brk-handler-for-inline-instrumentation.patch
kasan-mm-arm64-tag-non-slab-memory-allocated-via-pagealloc.patch
kasan-add-__must_check-annotations-to-kasan-hooks.patch
kasan-arm64-select-have_arch_kasan_sw_tags.patch
kasan-update-documentation.patch
kasan-add-spdx-license-identifier-mark-to-source-files.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