This source file includes following definitions.
- do_page_fault
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 #include <linux/mman.h>
17 #include <linux/mm.h>
18 #include <linux/kernel.h>
19 #include <linux/ptrace.h>
20
21 #include <asm/pgtable.h>
22
23 void die(const char *str, struct pt_regs *fp, unsigned long err);
24
25
26
27
28
29
30
31
32
33
34
35
36 asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address,
37 unsigned long error_code)
38 {
39 #ifdef DEBUG
40 pr_debug("regs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld\n",
41 regs->sr, regs->pc, address, error_code);
42 #endif
43
44
45
46
47
48 if ((unsigned long) address < PAGE_SIZE)
49 pr_alert("Unable to handle kernel NULL pointer dereference");
50 else
51 pr_alert("Unable to handle kernel access");
52 printk(" at virtual address %08lx\n", address);
53 if (!user_mode(regs))
54 die("Oops", regs, error_code);
55 do_exit(SIGKILL);
56
57 return 1;
58 }