diff options
author | Nick Hu <nickhu@andestech.com> | 2019-10-28 10:40:59 +0800 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-01-22 13:09:41 -0800 |
commit | 57ee58e39321ab4ac3f2949b90117786726cb216 (patch) | |
tree | fafba61aeb66c3a6e6366751f75e2e6012350836 | |
parent | def9d2780727cec3313ed3522d0123158d87224d (diff) | |
download | linux-57ee58e39321ab4ac3f2949b90117786726cb216.tar.bz2 |
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>
-rw-r--r-- | mm/kasan/common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/kasan/common.c b/mm/kasan/common.c index c15d8ae68c96..6aa51723b92b 100644 --- a/mm/kasan/common.c +++ b/mm/kasan/common.c @@ -110,6 +110,7 @@ void *memset(void *addr, int c, size_t len) return __memset(addr, c, len); } +#ifdef __HAVE_ARCH_MEMMOVE #undef memmove void *memmove(void *dest, const void *src, size_t len) { @@ -118,6 +119,7 @@ void *memmove(void *dest, const void *src, size_t len) return __memmove(dest, src, len); } +#endif #undef memcpy void *memcpy(void *dest, const void *src, size_t len) |