summaryrefslogtreecommitdiff
path: root/include/linux/kmsan_string.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2022-12-13 14:28:47 +0100
committerJiri Kosina <jkosina@suse.cz>2022-12-13 14:28:47 +0100
commitab970ae1d63822228bdc84b9c1514efbd2f66da7 (patch)
treefefc08d8dd28e4eb5465ca85de5cce2fb6f1b7ef /include/linux/kmsan_string.h
parentcfd1f6c16f7deadfe5269a76c1516405c4466481 (diff)
parent163a7fbff7a78c7c055e6c0ad26124ae551fe313 (diff)
Merge branch 'for-6.2/default-remove-cleanup' into for-linus
- removal of superfluous hid_hw_stop() calls for drivers with default .remove callback (Marcus Folkesson)
Diffstat (limited to 'include/linux/kmsan_string.h')
-rw-r--r--include/linux/kmsan_string.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/kmsan_string.h b/include/linux/kmsan_string.h
new file mode 100644
index 000000000000..7287da6f52ef
--- /dev/null
+++ b/include/linux/kmsan_string.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * KMSAN string functions API used in other headers.
+ *
+ * Copyright (C) 2022 Google LLC
+ * Author: Alexander Potapenko <glider@google.com>
+ *
+ */
+#ifndef _LINUX_KMSAN_STRING_H
+#define _LINUX_KMSAN_STRING_H
+
+/*
+ * KMSAN overrides the default memcpy/memset/memmove implementations in the
+ * kernel, which requires having __msan_XXX function prototypes in several other
+ * headers. Keep them in one place instead of open-coding.
+ */
+void *__msan_memcpy(void *dst, const void *src, size_t size);
+void *__msan_memset(void *s, int c, size_t n);
+void *__msan_memmove(void *dest, const void *src, size_t len);
+
+#endif /* _LINUX_KMSAN_STRING_H */