8 #include <linux/linkage.h>
9 #include <asm/memory.h>
12 * KASAN_SHADOW_START: beginning of the kernel virtual addresses.
13 * KASAN_SHADOW_END: KASAN_SHADOW_START + 1/8 of kernel virtual addresses.
15 #define KASAN_SHADOW_START (VA_START)
16 #define KASAN_SHADOW_END (KASAN_SHADOW_START + (1UL << (VA_BITS - 3)))
19 * This value is used to map an address to the corresponding shadow
20 * address by the following formula:
21 * shadow_addr = (address >> 3) + KASAN_SHADOW_OFFSET;
23 * (1 << 61) shadow addresses - [KASAN_SHADOW_OFFSET,KASAN_SHADOW_END]
24 * cover all 64-bits of virtual addresses. So KASAN_SHADOW_OFFSET
25 * should satisfy the following equation:
26 * KASAN_SHADOW_OFFSET = KASAN_SHADOW_END - (1ULL << 61)
28 #define KASAN_SHADOW_OFFSET (KASAN_SHADOW_END - (1ULL << (64 - 3)))
30 void kasan_init(void);
31 asmlinkage
void kasan_early_init(void);
34 static inline void kasan_init(void) { }