4 #include <linux/kernel.h>
5 #include <linux/types.h>
6 #include <linux/ptrace.h>
8 #include <linux/string.h>
18 #define SHADOW_COPY_SIZE (1 << CONFIG_KMEMCHECK_SHADOW_COPY_SHIFT)
49 static unsigned int error_count;
50 static unsigned int error_rd;
51 static unsigned int error_wr;
52 static unsigned int error_missed_count;
63 e = &error_fifo[error_wr];
77 e = &error_fifo[error_rd];
86 static const char *
desc[] = {
93 static const char short_desc[] = {
111 desc[e->
state] :
"(invalid shadow state)",
128 * (
int) (e->
address & (SHADOW_COPY_SIZE - 1)),
'^');
139 static void do_wakeup(
unsigned long data)
141 while (error_count > 0)
144 if (error_missed_count > 0) {
146 "the queue was too small\n", error_missed_count);
147 error_missed_count = 0;
159 static unsigned long prev_ip;
166 if (regs->ip == prev_ip)
184 e->
trace.nr_entries = 0;
202 tasklet_hi_schedule_first(&kmemcheck_tasklet);
220 e->
trace.nr_entries = 0;
226 tasklet_hi_schedule_first(&kmemcheck_tasklet);