2023-08-30 17:31:07 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef __ASM_KASAN_H
|
|
|
|
#define __ASM_KASAN_H
|
|
|
|
|
2023-10-24 12:59:35 +02:00
|
|
|
#include <linux/const.h>
|
2023-08-30 17:31:07 +02:00
|
|
|
|
|
|
|
#ifdef CONFIG_KASAN
|
|
|
|
|
|
|
|
#define KASAN_SHADOW_SCALE_SHIFT 3
|
|
|
|
#define KASAN_SHADOW_SIZE \
|
|
|
|
(_AC(1, UL) << (_REGION1_SHIFT - KASAN_SHADOW_SCALE_SHIFT))
|
|
|
|
#define KASAN_SHADOW_OFFSET _AC(CONFIG_KASAN_SHADOW_OFFSET, UL)
|
|
|
|
#define KASAN_SHADOW_START KASAN_SHADOW_OFFSET
|
|
|
|
#define KASAN_SHADOW_END (KASAN_SHADOW_START + KASAN_SHADOW_SIZE)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|