kmsan_string.h 681 B

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