This source file includes following definitions.
- check_one_table
- check_page_tables
1
2
3
4
5
6
7 #include <linux/signal.h>
8 #include <linux/sched.h>
9 #include <linux/head.h>
10 #include <linux/kernel.h>
11 #include <linux/errno.h>
12 #include <linux/string.h>
13 #include <linux/types.h>
14 #include <linux/ptrace.h>
15 #include <linux/mman.h>
16
17 #include <asm/system.h>
18
19 extern unsigned long high_memory;
20
21 static int check_one_table(struct pde * page_dir)
22 {
23 if (pgd_none(*page_dir))
24 return 0;
25 if (pgd_bad(*page_dir))
26 return 1;
27 return 0;
28 }
29
30
31
32
33 void check_page_tables(void)
34 {
35 struct pgd * pg_dir;
36 static int err = 0;
37
38 int stack_level = (long)(&pg_dir)-current->kernel_stack_page;
39 if (stack_level < 1500) printk ("** %d ** ",stack_level);
40 pg_dir = PAGE_DIR_OFFSET(current, 0);
41 if (err == 0) {
42 int i;
43 for (i = 0 ; i < PTRS_PER_PAGE ; i++,page_dir++){
44 int notok = check_one_table(page_dir);
45 if (notok){
46 err++;
47 printk ("|%d:%08lx| ",i, page_dir->pgd);
48 }
49 }
50 if (err) printk ("\nErreur MM %d\n",err);
51 }
52 }