xref: /linux-6.15/include/linux/kmsan_string.h (revision 78a498c3)
1*78a498c3SAlexander Potapenko /* SPDX-License-Identifier: GPL-2.0 */
2*78a498c3SAlexander Potapenko /*
3*78a498c3SAlexander Potapenko  * KMSAN string functions API used in other headers.
4*78a498c3SAlexander Potapenko  *
5*78a498c3SAlexander Potapenko  * Copyright (C) 2022 Google LLC
6*78a498c3SAlexander Potapenko  * Author: Alexander Potapenko <[email protected]>
7*78a498c3SAlexander Potapenko  *
8*78a498c3SAlexander Potapenko  */
9*78a498c3SAlexander Potapenko #ifndef _LINUX_KMSAN_STRING_H
10*78a498c3SAlexander Potapenko #define _LINUX_KMSAN_STRING_H
11*78a498c3SAlexander Potapenko 
12*78a498c3SAlexander Potapenko /*
13*78a498c3SAlexander Potapenko  * KMSAN overrides the default memcpy/memset/memmove implementations in the
14*78a498c3SAlexander Potapenko  * kernel, which requires having __msan_XXX function prototypes in several other
15*78a498c3SAlexander Potapenko  * headers. Keep them in one place instead of open-coding.
16*78a498c3SAlexander Potapenko  */
17*78a498c3SAlexander Potapenko void *__msan_memcpy(void *dst, const void *src, size_t size);
18*78a498c3SAlexander Potapenko void *__msan_memset(void *s, int c, size_t n);
19*78a498c3SAlexander Potapenko void *__msan_memmove(void *dest, const void *src, size_t len);
20*78a498c3SAlexander Potapenko 
21*78a498c3SAlexander Potapenko #endif /* _LINUX_KMSAN_STRING_H */
22