diff options
Diffstat (limited to 'arch/um/kernel/trap_user.c')
-rw-r--r-- | arch/um/kernel/trap_user.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/arch/um/kernel/trap_user.c b/arch/um/kernel/trap_user.c index f825a6eda3f5..e9ccd6b8d3c7 100644 --- a/arch/um/kernel/trap_user.c +++ b/arch/um/kernel/trap_user.c | |||
@@ -40,35 +40,14 @@ void kill_child_dead(int pid) | |||
40 | } while(1); | 40 | } while(1); |
41 | } | 41 | } |
42 | 42 | ||
43 | /* Unlocked - don't care if this is a bit off */ | ||
44 | int nsegfaults = 0; | ||
45 | |||
46 | struct { | ||
47 | unsigned long address; | ||
48 | int is_write; | ||
49 | int pid; | ||
50 | unsigned long sp; | ||
51 | int is_user; | ||
52 | } segfault_record[1024]; | ||
53 | |||
54 | void segv_handler(int sig, union uml_pt_regs *regs) | 43 | void segv_handler(int sig, union uml_pt_regs *regs) |
55 | { | 44 | { |
56 | int index, max; | ||
57 | struct faultinfo * fi = UPT_FAULTINFO(regs); | 45 | struct faultinfo * fi = UPT_FAULTINFO(regs); |
58 | 46 | ||
59 | if(UPT_IS_USER(regs) && !SEGV_IS_FIXABLE(fi)){ | 47 | if(UPT_IS_USER(regs) && !SEGV_IS_FIXABLE(fi)){ |
60 | bad_segv(*fi, UPT_IP(regs)); | 48 | bad_segv(*fi, UPT_IP(regs)); |
61 | return; | 49 | return; |
62 | } | 50 | } |
63 | max = sizeof(segfault_record)/sizeof(segfault_record[0]); | ||
64 | index = next_trap_index(max); | ||
65 | |||
66 | nsegfaults++; | ||
67 | segfault_record[index].address = FAULT_ADDRESS(*fi); | ||
68 | segfault_record[index].pid = os_getpid(); | ||
69 | segfault_record[index].is_write = FAULT_WRITE(*fi); | ||
70 | segfault_record[index].sp = UPT_SP(regs); | ||
71 | segfault_record[index].is_user = UPT_IS_USER(regs); | ||
72 | segv(*fi, UPT_IP(regs), UPT_IS_USER(regs), regs); | 51 | segv(*fi, UPT_IP(regs), UPT_IS_USER(regs), regs); |
73 | } | 52 | } |
74 | 53 | ||