Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / arm / include / asm / kasan.h
blob303c35df3135f74058f18ba795d374bcb54daa42
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * arch/arm/include/asm/kasan.h
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6 * Author: Andrey Ryabinin <ryabinin.a.a@gmail.com>
8 */
10 #ifndef __ASM_KASAN_H
11 #define __ASM_KASAN_H
13 #ifdef CONFIG_KASAN
15 #include <asm/kasan_def.h>
17 #define KASAN_SHADOW_SCALE_SHIFT 3
20 * The compiler uses a shadow offset assuming that addresses start
21 * from 0. Kernel addresses don't start from 0, so shadow
22 * for kernel really starts from 'compiler's shadow offset' +
23 * ('kernel address space start' >> KASAN_SHADOW_SCALE_SHIFT)
26 asmlinkage void kasan_early_init(void);
27 extern void kasan_init(void);
29 #else
30 static inline void kasan_init(void) { }
31 #endif
33 #endif