summaryrefslogtreecommitdiff
path: root/mm/kmsan
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2022-10-24 23:21:44 +0200
committerAndrew Morton <akpm@linux-foundation.org>2022-10-28 13:37:23 -0700
commit78a498c3a227f2ac773a8234b2ce092a4403f2c3 (patch)
treed7efd152160584209dfcbde2aa4cfaa65f728425 /mm/kmsan
parent59c8a02e24894e75639bcecc3cb1e768a2792220 (diff)
x86: fortify: kmsan: fix KMSAN fortify builds
Ensure that KMSAN builds replace memset/memcpy/memmove calls with the respective __msan_XXX functions, and that none of the macros are redefined twice. This should allow building kernel with both CONFIG_KMSAN and CONFIG_FORTIFY_SOURCE. Link: https://lkml.kernel.org/r/20221024212144.2852069-5-glider@google.com Link: https://github.com/google/kmsan/issues/89 Signed-off-by: Alexander Potapenko <glider@google.com> Reported-by: Tamas K Lengyel <tamas.lengyel@zentific.com> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/kmsan')
-rw-r--r--mm/kmsan/instrumentation.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/kmsan/instrumentation.c b/mm/kmsan/instrumentation.c
index 280d15413268..271f135f97a1 100644
--- a/mm/kmsan/instrumentation.c
+++ b/mm/kmsan/instrumentation.c
@@ -14,6 +14,7 @@
#include "kmsan.h"
#include <linux/gfp.h>
+#include <linux/kmsan_string.h>
#include <linux/mm.h>
#include <linux/uaccess.h>