Re: [PATCH 1/2] riscv: Add memmove string operation.

From: Andrey Ryabinin
Date: Thu Aug 22 2019 - 11:59:23 EST

On 8/7/19 10:19 AM, Nick Hu wrote:
> There are some features which need this string operation for compilation,
> like KASAN. So the purpose of this porting is for the features like KASAN
> which cannot be compiled without it.

Compilation error can be fixed by diff bellow (I didn't test it).
If you don't need memmove very early (before kasan_early_init()) than arch-specific not-instrumented memmove()
isn't necessary to have.

mm/kasan/common.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/mm/kasan/common.c b/mm/kasan/common.c
index 6814d6d6a023..897f9520bab3 100644
--- a/mm/kasan/common.c
+++ b/mm/kasan/common.c
@@ -107,6 +107,7 @@ void *memset(void *addr, int c, size_t len)
return __memset(addr, c, len);

#undef memmove
void *memmove(void *dest, const void *src, size_t len)
@@ -115,6 +116,7 @@ void *memmove(void *dest, const void *src, size_t len)

return __memmove(dest, src, len);

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