xref: /linux/arch/arm64/include/asm/kasan.h (revision ba5b0333a847ac026725122e085b2fea9e1674bc)
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