xref: /linux/arch/arm64/include/asm/kasan.h (revision 78c3925c048c752334873f56c3a3d1c9d53e0416)
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 
21 #else
22 static inline void kasan_init(void) { }
23 #endif
24 
25 #endif
26 #endif
27