diff options
Diffstat (limited to 'arch/s390/kernel/traps.c')
-rw-r--r-- | arch/s390/kernel/traps.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 9ff5ecba26ab..f081cf1157c3 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -49,7 +49,8 @@ static inline void report_user_fault(struct pt_regs *regs, int signr) | |||
49 | return; | 49 | return; |
50 | if (!printk_ratelimit()) | 50 | if (!printk_ratelimit()) |
51 | return; | 51 | return; |
52 | printk("User process fault: interruption code 0x%X ", regs->int_code); | 52 | printk("User process fault: interruption code %04x ilc:%d ", |
53 | regs->int_code & 0xffff, regs->int_code >> 17); | ||
53 | print_vma_addr("in ", regs->psw.addr & PSW_ADDR_INSN); | 54 | print_vma_addr("in ", regs->psw.addr & PSW_ADDR_INSN); |
54 | printk("\n"); | 55 | printk("\n"); |
55 | show_regs(regs); | 56 | show_regs(regs); |
@@ -87,16 +88,16 @@ void do_report_trap(struct pt_regs *regs, int si_signo, int si_code, char *str) | |||
87 | } | 88 | } |
88 | } | 89 | } |
89 | 90 | ||
90 | static void __kprobes do_trap(struct pt_regs *regs, int si_signo, int si_code, | 91 | static void do_trap(struct pt_regs *regs, int si_signo, int si_code, char *str) |
91 | char *str) | ||
92 | { | 92 | { |
93 | if (notify_die(DIE_TRAP, str, regs, 0, | 93 | if (notify_die(DIE_TRAP, str, regs, 0, |
94 | regs->int_code, si_signo) == NOTIFY_STOP) | 94 | regs->int_code, si_signo) == NOTIFY_STOP) |
95 | return; | 95 | return; |
96 | do_report_trap(regs, si_signo, si_code, str); | 96 | do_report_trap(regs, si_signo, si_code, str); |
97 | } | 97 | } |
98 | NOKPROBE_SYMBOL(do_trap); | ||
98 | 99 | ||
99 | void __kprobes do_per_trap(struct pt_regs *regs) | 100 | void do_per_trap(struct pt_regs *regs) |
100 | { | 101 | { |
101 | siginfo_t info; | 102 | siginfo_t info; |
102 | 103 | ||
@@ -111,6 +112,7 @@ void __kprobes do_per_trap(struct pt_regs *regs) | |||
111 | (void __force __user *) current->thread.per_event.address; | 112 | (void __force __user *) current->thread.per_event.address; |
112 | force_sig_info(SIGTRAP, &info, current); | 113 | force_sig_info(SIGTRAP, &info, current); |
113 | } | 114 | } |
115 | NOKPROBE_SYMBOL(do_per_trap); | ||
114 | 116 | ||
115 | void default_trap_handler(struct pt_regs *regs) | 117 | void default_trap_handler(struct pt_regs *regs) |
116 | { | 118 | { |
@@ -151,8 +153,6 @@ DO_ERROR_INFO(privileged_op, SIGILL, ILL_PRVOPC, | |||
151 | "privileged operation") | 153 | "privileged operation") |
152 | DO_ERROR_INFO(special_op_exception, SIGILL, ILL_ILLOPN, | 154 | DO_ERROR_INFO(special_op_exception, SIGILL, ILL_ILLOPN, |
153 | "special operation exception") | 155 | "special operation exception") |
154 | DO_ERROR_INFO(translation_exception, SIGILL, ILL_ILLOPN, | ||
155 | "translation exception") | ||
156 | 156 | ||
157 | #ifdef CONFIG_64BIT | 157 | #ifdef CONFIG_64BIT |
158 | DO_ERROR_INFO(transaction_exception, SIGILL, ILL_ILLOPN, | 158 | DO_ERROR_INFO(transaction_exception, SIGILL, ILL_ILLOPN, |
@@ -179,7 +179,13 @@ static inline void do_fp_trap(struct pt_regs *regs, int fpc) | |||
179 | do_trap(regs, SIGFPE, si_code, "floating point exception"); | 179 | do_trap(regs, SIGFPE, si_code, "floating point exception"); |
180 | } | 180 | } |
181 | 181 | ||
182 | void __kprobes illegal_op(struct pt_regs *regs) | 182 | void translation_exception(struct pt_regs *regs) |
183 | { | ||
184 | /* May never happen. */ | ||
185 | die(regs, "Translation exception"); | ||
186 | } | ||
187 | |||
188 | void illegal_op(struct pt_regs *regs) | ||
183 | { | 189 | { |
184 | siginfo_t info; | 190 | siginfo_t info; |
185 | __u8 opcode[6]; | 191 | __u8 opcode[6]; |
@@ -252,7 +258,7 @@ void __kprobes illegal_op(struct pt_regs *regs) | |||
252 | if (signal) | 258 | if (signal) |
253 | do_trap(regs, signal, ILL_ILLOPC, "illegal operation"); | 259 | do_trap(regs, signal, ILL_ILLOPC, "illegal operation"); |
254 | } | 260 | } |
255 | 261 | NOKPROBE_SYMBOL(illegal_op); | |
256 | 262 | ||
257 | #ifdef CONFIG_MATHEMU | 263 | #ifdef CONFIG_MATHEMU |
258 | void specification_exception(struct pt_regs *regs) | 264 | void specification_exception(struct pt_regs *regs) |
@@ -469,7 +475,7 @@ void space_switch_exception(struct pt_regs *regs) | |||
469 | do_trap(regs, SIGILL, ILL_PRVOPC, "space switch event"); | 475 | do_trap(regs, SIGILL, ILL_PRVOPC, "space switch event"); |
470 | } | 476 | } |
471 | 477 | ||
472 | void __kprobes kernel_stack_overflow(struct pt_regs * regs) | 478 | void kernel_stack_overflow(struct pt_regs *regs) |
473 | { | 479 | { |
474 | bust_spinlocks(1); | 480 | bust_spinlocks(1); |
475 | printk("Kernel stack overflow.\n"); | 481 | printk("Kernel stack overflow.\n"); |
@@ -477,6 +483,7 @@ void __kprobes kernel_stack_overflow(struct pt_regs * regs) | |||
477 | bust_spinlocks(0); | 483 | bust_spinlocks(0); |
478 | panic("Corrupt kernel stack, can't continue."); | 484 | panic("Corrupt kernel stack, can't continue."); |
479 | } | 485 | } |
486 | NOKPROBE_SYMBOL(kernel_stack_overflow); | ||
480 | 487 | ||
481 | void __init trap_init(void) | 488 | void __init trap_init(void) |
482 | { | 489 | { |