diff options
Diffstat (limited to 'arch/x86/mm/fault_64.c')
-rw-r--r-- | arch/x86/mm/fault_64.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/x86/mm/fault_64.c b/arch/x86/mm/fault_64.c index 0e26230669ca..88a7abda29ce 100644 --- a/arch/x86/mm/fault_64.c +++ b/arch/x86/mm/fault_64.c | |||
@@ -198,7 +198,7 @@ KERN_ERR "******* Disabling USB legacy in the BIOS may also help.\n"; | |||
198 | static int is_errata93(struct pt_regs *regs, unsigned long address) | 198 | static int is_errata93(struct pt_regs *regs, unsigned long address) |
199 | { | 199 | { |
200 | static int warned; | 200 | static int warned; |
201 | if (address != regs->rip) | 201 | if (address != regs->ip) |
202 | return 0; | 202 | return 0; |
203 | if ((address >> 32) != 0) | 203 | if ((address >> 32) != 0) |
204 | return 0; | 204 | return 0; |
@@ -209,7 +209,7 @@ static int is_errata93(struct pt_regs *regs, unsigned long address) | |||
209 | printk(errata93_warning); | 209 | printk(errata93_warning); |
210 | warned = 1; | 210 | warned = 1; |
211 | } | 211 | } |
212 | regs->rip = address; | 212 | regs->ip = address; |
213 | return 1; | 213 | return 1; |
214 | } | 214 | } |
215 | return 0; | 215 | return 0; |
@@ -355,7 +355,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
355 | if (notify_page_fault(regs)) | 355 | if (notify_page_fault(regs)) |
356 | return; | 356 | return; |
357 | 357 | ||
358 | if (likely(regs->eflags & X86_EFLAGS_IF)) | 358 | if (likely(regs->flags & X86_EFLAGS_IF)) |
359 | local_irq_enable(); | 359 | local_irq_enable(); |
360 | 360 | ||
361 | if (unlikely(error_code & PF_RSVD)) | 361 | if (unlikely(error_code & PF_RSVD)) |
@@ -393,7 +393,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
393 | */ | 393 | */ |
394 | if (!down_read_trylock(&mm->mmap_sem)) { | 394 | if (!down_read_trylock(&mm->mmap_sem)) { |
395 | if ((error_code & PF_USER) == 0 && | 395 | if ((error_code & PF_USER) == 0 && |
396 | !search_exception_tables(regs->rip)) | 396 | !search_exception_tables(regs->ip)) |
397 | goto bad_area_nosemaphore; | 397 | goto bad_area_nosemaphore; |
398 | down_read(&mm->mmap_sem); | 398 | down_read(&mm->mmap_sem); |
399 | } | 399 | } |
@@ -409,7 +409,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
409 | /* Allow userspace just enough access below the stack pointer | 409 | /* Allow userspace just enough access below the stack pointer |
410 | * to let the 'enter' instruction work. | 410 | * to let the 'enter' instruction work. |
411 | */ | 411 | */ |
412 | if (address + 65536 + 32 * sizeof(unsigned long) < regs->rsp) | 412 | if (address + 65536 + 32 * sizeof(unsigned long) < regs->sp) |
413 | goto bad_area; | 413 | goto bad_area; |
414 | } | 414 | } |
415 | if (expand_stack(vma, address)) | 415 | if (expand_stack(vma, address)) |
@@ -488,10 +488,10 @@ bad_area_nosemaphore: | |||
488 | if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) && | 488 | if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) && |
489 | printk_ratelimit()) { | 489 | printk_ratelimit()) { |
490 | printk( | 490 | printk( |
491 | "%s%s[%d]: segfault at %lx rip %lx rsp %lx error %lx\n", | 491 | "%s%s[%d]: segfault at %lx ip %lx sp %lx error %lx\n", |
492 | tsk->pid > 1 ? KERN_INFO : KERN_EMERG, | 492 | tsk->pid > 1 ? KERN_INFO : KERN_EMERG, |
493 | tsk->comm, tsk->pid, address, regs->rip, | 493 | tsk->comm, tsk->pid, address, regs->ip, |
494 | regs->rsp, error_code); | 494 | regs->sp, error_code); |
495 | } | 495 | } |
496 | 496 | ||
497 | tsk->thread.cr2 = address; | 497 | tsk->thread.cr2 = address; |
@@ -509,9 +509,9 @@ bad_area_nosemaphore: | |||
509 | no_context: | 509 | no_context: |
510 | 510 | ||
511 | /* Are we prepared to handle this kernel fault? */ | 511 | /* Are we prepared to handle this kernel fault? */ |
512 | fixup = search_exception_tables(regs->rip); | 512 | fixup = search_exception_tables(regs->ip); |
513 | if (fixup) { | 513 | if (fixup) { |
514 | regs->rip = fixup->fixup; | 514 | regs->ip = fixup->fixup; |
515 | return; | 515 | return; |
516 | } | 516 | } |
517 | 517 | ||
@@ -537,7 +537,7 @@ no_context: | |||
537 | else | 537 | else |
538 | printk(KERN_ALERT "Unable to handle kernel paging request"); | 538 | printk(KERN_ALERT "Unable to handle kernel paging request"); |
539 | printk(" at %016lx RIP: \n" KERN_ALERT,address); | 539 | printk(" at %016lx RIP: \n" KERN_ALERT,address); |
540 | printk_address(regs->rip); | 540 | printk_address(regs->ip); |
541 | dump_pagetable(address); | 541 | dump_pagetable(address); |
542 | tsk->thread.cr2 = address; | 542 | tsk->thread.cr2 = address; |
543 | tsk->thread.trap_no = 14; | 543 | tsk->thread.trap_no = 14; |