make task_struct.kcov_mode have type `enum kcov_mode'.
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
void kcov_task_init(struct task_struct *t);
void kcov_task_exit(struct task_struct *t);
+enum kcov_mode {
+ /*
+ * Tracing coverage collection mode.
+ * Covered PCs are collected in a per-task buffer.
+ */
+ KCOV_MODE_TRACE = 1,
+};
+
#else
static inline void kcov_task_init(struct task_struct *t) {}
#include <linux/resource.h>
#include <linux/timer.h>
#include <linux/hrtimer.h>
+#include <linux/kcov.h>
#include <linux/task_io_accounting.h>
#include <linux/latencytop.h>
#include <linux/cred.h>
#endif /* CONFIG_TRACING */
#ifdef CONFIG_KCOV
/* Coverage collection mode enabled for this task (0 if disabled). */
- int kcov_mode;
+ enum kcov_mode kcov_mode;
/* Size of the kcov_area. */
unsigned kcov_size;
/* Buffer for coverage collection. */
#include <linux/uaccess.h>
#include <linux/kcov.h>
-enum kcov_mode {
- /*
- * Tracing coverage collection mode.
- * Covered PCs are collected in a per-task buffer.
- */
- KCOV_MODE_TRACE = 1,
-};
-
/*
* kcov descriptor (one per opened debugfs file).
* State transitions of the descriptor: