mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-29 12:28:27 +02:00
a3209bb94b
um doesn't support KASAN_INLINE together with STATIC_LINK.
Instead of failing the build, disable KASAN_INLINE when
STATIC_LINK is selected.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511290451.x9GZVJ1l-lkp@intel.com/
Fixes: 1e338f4d99 ("kasan: introduce ARCH_DEFER_KASAN and unify static key across modes")
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Link: https://patch.msgid.link/2620ab0bbba640b6237c50b9c0dca1c7d1142f5d.1764410067.git.chleroy@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
32 lines
905 B
C
32 lines
905 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_UM_KASAN_H
|
|
#define __ASM_UM_KASAN_H
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/const.h>
|
|
|
|
#define KASAN_SHADOW_OFFSET _AC(CONFIG_KASAN_SHADOW_OFFSET, UL)
|
|
|
|
/* used in kasan_mem_to_shadow to divide by 8 */
|
|
#define KASAN_SHADOW_SCALE_SHIFT 3
|
|
|
|
#ifdef CONFIG_X86_64
|
|
#define KASAN_HOST_USER_SPACE_END_ADDR 0x00007fffffffffffUL
|
|
/* KASAN_SHADOW_SIZE is the size of total address space divided by 8 */
|
|
#define KASAN_SHADOW_SIZE ((KASAN_HOST_USER_SPACE_END_ADDR + 1) >> \
|
|
KASAN_SHADOW_SCALE_SHIFT)
|
|
#else
|
|
#error "KASAN_SHADOW_SIZE is not defined for this sub-architecture"
|
|
#endif /* CONFIG_X86_64 */
|
|
|
|
#define KASAN_SHADOW_START (KASAN_SHADOW_OFFSET)
|
|
#define KASAN_SHADOW_END (KASAN_SHADOW_START + KASAN_SHADOW_SIZE)
|
|
|
|
#ifdef CONFIG_KASAN
|
|
void kasan_init(void);
|
|
#else
|
|
static inline void kasan_init(void) { }
|
|
#endif /* CONFIG_KASAN */
|
|
|
|
#endif /* __ASM_UM_KASAN_H */
|