2019-04-27 00:23:26 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef __ASM_KASAN_H
|
|
|
|
#define __ASM_KASAN_H
|
|
|
|
|
|
|
|
#ifdef CONFIG_KASAN
|
|
|
|
#define _GLOBAL_KASAN(fn) _GLOBAL(__##fn)
|
|
|
|
#define _GLOBAL_TOC_KASAN(fn) _GLOBAL_TOC(__##fn)
|
|
|
|
#define EXPORT_SYMBOL_KASAN(fn) EXPORT_SYMBOL(__##fn)
|
|
|
|
#else
|
|
|
|
#define _GLOBAL_KASAN(fn) _GLOBAL(fn)
|
|
|
|
#define _GLOBAL_TOC_KASAN(fn) _GLOBAL_TOC(fn)
|
|
|
|
#define EXPORT_SYMBOL_KASAN(fn)
|
|
|
|
#endif
|
|
|
|
|
2019-04-27 00:23:32 +08:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
|
|
|
#include <asm/page.h>
|
|
|
|
|
|
|
|
#define KASAN_SHADOW_SCALE_SHIFT 3
|
|
|
|
|
|
|
|
#define KASAN_SHADOW_START (KASAN_SHADOW_OFFSET + \
|
|
|
|
(PAGE_OFFSET >> KASAN_SHADOW_SCALE_SHIFT))
|
|
|
|
|
|
|
|
#define KASAN_SHADOW_OFFSET ASM_CONST(CONFIG_KASAN_SHADOW_OFFSET)
|
|
|
|
|
|
|
|
#define KASAN_SHADOW_END 0UL
|
|
|
|
|
|
|
|
#define KASAN_SHADOW_SIZE (KASAN_SHADOW_END - KASAN_SHADOW_START)
|
|
|
|
|
|
|
|
#endif /* __ASSEMBLY */
|
2019-04-27 00:23:26 +08:00
|
|
|
#endif
|