Commit eb214f2d authored by Andrey Konovalov's avatar Andrey Konovalov Committed by Linus Torvalds
Browse files

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.


Signed-off-by: default avatarAndrey Konovalov <>
Suggested-by: Vincenzo Frascino's avatarVincenzo Frascino <>
Cc: Andrey Ryabinin <>
Cc: Christoph Lameter <>
Cc: Dmitry Vyukov <>
Cc: Mark Rutland <>
Cc: Vincenzo Frascino <>
Cc: Will Deacon <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 63f3655f
......@@ -58,6 +58,12 @@
#define ARCH_DMA_MINALIGN (128)
#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)
#ifndef __ASSEMBLY__
#include <linux/bitops.h>
......@@ -298,8 +298,6 @@ void kasan_cache_create(struct kmem_cache *cache, unsigned int *size,
cache->align = round_up(cache->align, KASAN_SHADOW_SCALE_SIZE);
*flags |= SLAB_KASAN;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment