1 /* SPDX-License-Identifier: GPL-2.0 */
3 * A minimal header declaring types added by KMSAN to existing kernel structs.
5 * Copyright (C) 2017-2022 Google LLC
9 #ifndef _LINUX_KMSAN_TYPES_H
10 #define _LINUX_KMSAN_TYPES_H
12 #include <linux/types.h>
14 /* These constants are defined in the MSan LLVM instrumentation pass. */
15 #define KMSAN_RETVAL_SIZE 800
16 #define KMSAN_PARAM_SIZE 800
18 struct kmsan_context_state {
19 char param_tls[KMSAN_PARAM_SIZE];
20 char retval_tls[KMSAN_RETVAL_SIZE];
21 char va_arg_tls[KMSAN_PARAM_SIZE];
22 char va_arg_origin_tls[KMSAN_PARAM_SIZE];
23 u64 va_arg_overflow_size_tls;
24 char param_origin_tls[KMSAN_PARAM_SIZE];
25 u32 retval_origin_tls;
28 #undef KMSAN_PARAM_SIZE
29 #undef KMSAN_RETVAL_SIZE
32 struct kmsan_context_state cstate;
37 #endif /* _LINUX_KMSAN_TYPES_H */