x86/string: correct memmove()'s forwarding to memcpy()

With memcpy() expanding to the compiler builtin, we may not hand it
overlapping source and destination. We strictly mean to forward to our
own implementation (a few lines up in the same source file).

Fixes: 78825e1c60 ("x86/string: Clean up x86/string.h")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 7b93d92a35
master date: 2021-02-04 13:59:56 +0100
This commit is contained in:
Jan Beulich committed 2021-03-05 15:43:52 +01:00
1 parent e9cb958823
commit 2c813771c5
1 file changed
+2 -1
+2 -1
View File
@@ -43,7 +43,8 @@ void *(memmove)(void *dest, const void *src, size_t n)
return dest;
if ( dest < src )
return memcpy(dest, src, n);
/* Depends on Xen's implementation operating forwards. */
return (memcpy)(dest, src, n);
asm volatile (
" std ; "
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.