hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8MWHA CVE: NA
--------------------------------
check_memory_region() has been renamed kasan_check_range() in commit f00748bfa024 ("kasan: prefix global functions with kasan_"). Therefore, a compilation error occurs when check_memory_region() is called in memcpy_mcs() in file mm/kasan/shadow.c, this patch fix this issue.
Fixes: 23ca830ebbef ("arm64: introduce copy_mc_to_kernel() implementation") Signed-off-by: Tong Tiangen tongtiangen@huawei.com --- mm/kasan/shadow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/kasan/shadow.c b/mm/kasan/shadow.c index ffaf2df1ed6e..9372f0c6f7ec 100644 --- a/mm/kasan/shadow.c +++ b/mm/kasan/shadow.c @@ -83,9 +83,9 @@ void *memcpy(void *dest, const void *src, size_t len) #undef memcpy_mcs int memcpy_mcs(void *dest, const void *src, size_t len) { - if (!check_memory_region((unsigned long)src, len, false, _RET_IP_) || - !check_memory_region((unsigned long)dest, len, true, _RET_IP_)) - return (unsigned long)len; + if (!kasan_check_range(src, len, false, _RET_IP_) || + !kasan_check_range(dest, len, true, _RET_IP_)) + return (int)len;
return __memcpy_mcs(dest, src, len); }