x86: kmsan: don't rename memintrinsics in uninstrumented files
authorAlexander Potapenko <glider@google.com>
Fri, 3 Mar 2023 14:14:30 +0000 (15:14 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 28 Mar 2023 23:20:11 +0000 (16:20 -0700)
commit6dc4bd4e2fe395f8c9d5d0892e45ff7fed5c66f3
treeb5bb37f58936b0bbbd8be84a7b9c519aa2c7282e
parent7cb1d7ef667716a9ff4e692e7ba1c3817d872222
x86: kmsan: don't rename memintrinsics in uninstrumented files

clang -fsanitize=kernel-memory already replaces calls to
memset/memcpy/memmove and their __builtin_ versions with
__msan_memset/__msan_memcpy/__msan_memmove in instrumented files, so
there is no need to override them.

In non-instrumented versions we are now required to leave memset() and
friends intact, so we cannot replace them with __msan_XXX() functions.

Link: https://lkml.kernel.org/r/20230303141433.3422671-1-glider@google.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Suggested-by: Marco Elver <elver@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/include/asm/string_64.h