summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2023-09-20 14:26:29 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2023-09-20 14:26:29 +0800
commit2a86f1b56a30e242caf7ee1268af68f4f49ce847 (patch)
treeef96811d4c46d9fd858fb66282bdf325e57df99e /include
parentb795fb9f5861ee256070d59e33130980a01fadd7 (diff)
downloadlinux-stable-2a86f1b56a30e242caf7ee1268af68f4f49ce847.tar.gz
linux-stable-2a86f1b56a30e242caf7ee1268af68f4f49ce847.tar.bz2
linux-stable-2a86f1b56a30e242caf7ee1268af68f4f49ce847.zip
kasan: Cleanup the __HAVE_ARCH_SHADOW_MAP usage
As Linus suggested, __HAVE_ARCH_XYZ is "stupid" and "having historical uses of it doesn't make it good". So migrate __HAVE_ARCH_SHADOW_MAP to separate macros named after the respective functions. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Reviewed-by: WANG Xuerui <git@xen0n.name> Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kasan.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index 3df5499f7936..842623d708c2 100644
--- a/include/linux/kasan.h
+++ b/include/linux/kasan.h
@@ -54,7 +54,7 @@ extern p4d_t kasan_early_shadow_p4d[MAX_PTRS_PER_P4D];
int kasan_populate_early_shadow(const void *shadow_start,
const void *shadow_end);
-#ifndef __HAVE_ARCH_SHADOW_MAP
+#ifndef kasan_mem_to_shadow
static inline void *kasan_mem_to_shadow(const void *addr)
{
return (void *)((unsigned long)addr >> KASAN_SHADOW_SCALE_SHIFT)