+ kasan-arm64-use-arch_slab_minalign-instead-of-manual-aligning.patch added to -mm tree

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

 



The patch titled
     Subject: kasan, arm64: use ARCH_SLAB_MINALIGN instead of manual aligning
has been added to the -mm tree.  Its filename is
     kasan-arm64-use-arch_slab_minalign-instead-of-manual-aligning.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/kasan-arm64-use-arch_slab_minalign-instead-of-manual-aligning.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/kasan-arm64-use-arch_slab_minalign-instead-of-manual-aligning.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, arm64: use ARCH_SLAB_MINALIGN instead of manual aligning

Instead of changing cache->align to be aligned to KASAN_SHADOW_SCALE_SIZE
in kasan_cache_create() we can reuse the ARCH_SLAB_MINALIGN macro.

Link: http://lkml.kernel.org/r/52ddd881916bcc153a9924c154daacde78522227.1546540962.git.andreyknvl@xxxxxxxxxx
Signed-off-by: Andrey Konovalov <andreyknvl@xxxxxxxxxx>
Suggested-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
Cc: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>
Cc: Christoph Lameter <cl@xxxxxxxxx>
Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
Cc: Mark Rutland <mark.rutland@xxxxxxx>
Cc: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
Cc: Will Deacon <will.deacon@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/arm64/include/asm/cache.h |    6 ++++++
 mm/kasan/common.c              |    2 --
 2 files changed, 6 insertions(+), 2 deletions(-)

--- a/arch/arm64/include/asm/cache.h~kasan-arm64-use-arch_slab_minalign-instead-of-manual-aligning
+++ a/arch/arm64/include/asm/cache.h
@@ -58,6 +58,12 @@
  */
 #define ARCH_DMA_MINALIGN	(128)
 
+#ifdef CONFIG_KASAN_SW_TAGS
+#define ARCH_SLAB_MINALIGN	(1ULL << KASAN_SHADOW_SCALE_SHIFT)
+#else
+#define ARCH_SLAB_MINALIGN	__alignof__(unsigned long long)
+#endif
+
 #ifndef __ASSEMBLY__
 
 #include <linux/bitops.h>
--- a/mm/kasan/common.c~kasan-arm64-use-arch_slab_minalign-instead-of-manual-aligning
+++ a/mm/kasan/common.c
@@ -298,8 +298,6 @@ void kasan_cache_create(struct kmem_cach
 		return;
 	}
 
-	cache->align = round_up(cache->align, KASAN_SHADOW_SCALE_SIZE);
-
 	*flags |= SLAB_KASAN;
 }
 
_

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

kasan-arm64-use-arch_slab_minalign-instead-of-manual-aligning.patch
kasan-make-tag-based-mode-work-with-config_hardened_usercopy.patch
kasan-fix-krealloc-handling-for-tag-based-mode.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