1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef _ASM_X86_KASAN_H 3 #define _ASM_X86_KASAN_H 4 5 #include <linux/const.h> 6 #define KASAN_SHADOW_OFFSET _AC(CONFIG_KASAN_S 7 #define KASAN_SHADOW_SCALE_SHIFT 3 8 9 /* 10 * Compiler uses shadow offset assuming that a 11 * from 0. Kernel addresses don't start from 0 12 * for kernel really starts from compiler's sh 13 * 'kernel address space start' >> KASAN_SHADO 14 */ 15 #define KASAN_SHADOW_START (KASAN_SHADOW_ 16 ((-1UL 17 18 /* 19 * 47 bits for kernel address -> (47 - KASAN_S 20 * 56 bits for kernel address -> (56 - KASAN_S 21 */ 22 #define KASAN_SHADOW_END (KASAN_SHADOW_ 23 (1ULL 24 25 26 #ifndef __ASSEMBLY__ 27 28 #ifdef CONFIG_KASAN 29 void __init kasan_early_init(void); 30 void __init kasan_init(void); 31 void __init kasan_populate_shadow_for_vaddr(vo 32 #else 33 static inline void kasan_early_init(void) { } 34 static inline void kasan_init(void) { } 35 static inline void kasan_populate_shadow_for_v 36 37 #endif 38 39 #endif 40 41 #endif 42
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.