| .. | .. |
|---|
| 192 | 192 | local_irq_enable(); |
|---|
| 193 | 193 | while (1); |
|---|
| 194 | 194 | } |
|---|
| 195 | | - do_exit(SIGSEGV); |
|---|
| 195 | + make_task_dead(SIGSEGV); |
|---|
| 196 | 196 | } |
|---|
| 197 | 197 | |
|---|
| 198 | 198 | #ifndef CONFIG_MATHEMU |
|---|
| .. | .. |
|---|
| 235 | 235 | { |
|---|
| 236 | 236 | int signo, code; |
|---|
| 237 | 237 | |
|---|
| 238 | | - if ((regs->ps & ~IPL_MAX) == 0) { |
|---|
| 238 | + if (type == 3) { /* FEN fault */ |
|---|
| 239 | + /* Irritating users can call PAL_clrfen to disable the |
|---|
| 240 | + FPU for the process. The kernel will then trap in |
|---|
| 241 | + do_switch_stack and undo_switch_stack when we try |
|---|
| 242 | + to save and restore the FP registers. |
|---|
| 243 | + |
|---|
| 244 | + Given that GCC by default generates code that uses the |
|---|
| 245 | + FP registers, PAL_clrfen is not useful except for DoS |
|---|
| 246 | + attacks. So turn the bleeding FPU back on and be done |
|---|
| 247 | + with it. */ |
|---|
| 248 | + current_thread_info()->pcb.flags |= 1; |
|---|
| 249 | + __reload_thread(¤t_thread_info()->pcb); |
|---|
| 250 | + return; |
|---|
| 251 | + } |
|---|
| 252 | + if (!user_mode(regs)) { |
|---|
| 239 | 253 | if (type == 1) { |
|---|
| 240 | 254 | const unsigned int *data |
|---|
| 241 | 255 | = (const unsigned int *) regs->pc; |
|---|
| .. | .. |
|---|
| 367 | 381 | } |
|---|
| 368 | 382 | } |
|---|
| 369 | 383 | break; |
|---|
| 370 | | - |
|---|
| 371 | | - case 3: /* FEN fault */ |
|---|
| 372 | | - /* Irritating users can call PAL_clrfen to disable the |
|---|
| 373 | | - FPU for the process. The kernel will then trap in |
|---|
| 374 | | - do_switch_stack and undo_switch_stack when we try |
|---|
| 375 | | - to save and restore the FP registers. |
|---|
| 376 | | - |
|---|
| 377 | | - Given that GCC by default generates code that uses the |
|---|
| 378 | | - FP registers, PAL_clrfen is not useful except for DoS |
|---|
| 379 | | - attacks. So turn the bleeding FPU back on and be done |
|---|
| 380 | | - with it. */ |
|---|
| 381 | | - current_thread_info()->pcb.flags |= 1; |
|---|
| 382 | | - __reload_thread(¤t_thread_info()->pcb); |
|---|
| 383 | | - return; |
|---|
| 384 | 384 | |
|---|
| 385 | 385 | case 5: /* illoc */ |
|---|
| 386 | 386 | default: /* unexpected instruction-fault type */ |
|---|
| .. | .. |
|---|
| 577 | 577 | |
|---|
| 578 | 578 | printk("Bad unaligned kernel access at %016lx: %p %lx %lu\n", |
|---|
| 579 | 579 | pc, va, opcode, reg); |
|---|
| 580 | | - do_exit(SIGSEGV); |
|---|
| 580 | + make_task_dead(SIGSEGV); |
|---|
| 581 | 581 | |
|---|
| 582 | 582 | got_exception: |
|---|
| 583 | 583 | /* Ok, we caught the exception, but we don't want it. Is there |
|---|
| .. | .. |
|---|
| 632 | 632 | local_irq_enable(); |
|---|
| 633 | 633 | while (1); |
|---|
| 634 | 634 | } |
|---|
| 635 | | - do_exit(SIGSEGV); |
|---|
| 635 | + make_task_dead(SIGSEGV); |
|---|
| 636 | 636 | } |
|---|
| 637 | 637 | |
|---|
| 638 | 638 | /* |
|---|