Skip to content

Commit 57ee58e

Browse files
Nick Hupalmer-dabbelt
authored andcommitted
kasan: No KASAN's memmove check if archs don't have it.
If archs don't have memmove then the C implementation from lib/string.c is used, and then it's instrumented by compiler. So there is no need to add KASAN's memmove to manual checks. Signed-off-by: Nick Hu <nickhu@andestech.com> Acked-by: Dmitry Vyukov <dvyukov@google.com> Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
1 parent def9d27 commit 57ee58e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mm/kasan/common.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ void *memset(void *addr, int c, size_t len)
110110
return __memset(addr, c, len);
111111
}
112112

113+
#ifdef __HAVE_ARCH_MEMMOVE
113114
#undef memmove
114115
void *memmove(void *dest, const void *src, size_t len)
115116
{
@@ -118,6 +119,7 @@ void *memmove(void *dest, const void *src, size_t len)
118119

119120
return __memmove(dest, src, len);
120121
}
122+
#endif
121123

122124
#undef memcpy
123125
void *memcpy(void *dest, const void *src, size_t len)

0 commit comments

Comments
 (0)