Patch series "kasan: assorted clean-ups". Code clean-ups, nothing worthy of being backported to stable. This patch (of 11): Unify and improve the comments for KASAN_SHADOW_START/END definitions from include/asm/kasan.h and include/asm/memory.h. Also put both definitions together in include/asm/memory.h. Also clarify the related BUILD_BUG_ON checks in mm/kasan_init.c. Link: https://lkml.kernel.org/r/cover.1703188911.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/140108ca0b164648c395a41fbeecb0601b1ae9e1.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Marco Elver <elver@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
29 lines
671 B
C
29 lines
671 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_KASAN_H
|
|
#define __ASM_KASAN_H
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/linkage.h>
|
|
#include <asm/memory.h>
|
|
#include <asm/mte-kasan.h>
|
|
#include <asm/pgtable-types.h>
|
|
|
|
#define arch_kasan_set_tag(addr, tag) __tag_set(addr, tag)
|
|
#define arch_kasan_reset_tag(addr) __tag_reset(addr)
|
|
#define arch_kasan_get_tag(addr) __tag_get(addr)
|
|
|
|
#if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
|
|
|
|
asmlinkage void kasan_early_init(void);
|
|
void kasan_init(void);
|
|
void kasan_copy_shadow(pgd_t *pgdir);
|
|
|
|
#else
|
|
static inline void kasan_init(void) { }
|
|
static inline void kasan_copy_shadow(pgd_t *pgdir) { }
|
|
#endif
|
|
|
|
#endif
|
|
#endif
|