1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __ASM_KASAN_H 3 #define __ASM_KASAN_H 4 5 #ifndef __ASSEMBLY__ 6 7 #include <linux/linkage.h> 8 #include <asm/memory.h> 9 #include <asm/mte-kasan.h> 10 #include <asm/pgtable-types.h> 11 12 #define arch_kasan_set_tag(addr, tag) __tag_set(addr, tag) 13 #define arch_kasan_reset_tag(addr) __tag_reset(addr) 14 #define arch_kasan_get_tag(addr) __tag_get(addr) 15 16 #if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS) 17 18 asmlinkage void kasan_early_init(void); 19 void kasan_init(void); 20 void kasan_copy_shadow(pgd_t *pgdir); 21 22 #else 23 static inline void kasan_init(void) { } 24 static inline void kasan_copy_shadow(pgd_t *pgdir) { } 25 #endif 26 27 #endif 28 #endif 29