fault.c (1c2af4968ea533e875d7cf8d095c084f18164f5d) | fault.c (426e34cc4f6094cefe4f3175764cdf583128e7cd) |
---|---|
1/* 2 * Copyright (C) 1995 Linus Torvalds 3 * Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs. 4 * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar 5 */ 6#include <linux/magic.h> /* STACK_END_MAGIC */ 7#include <linux/sched.h> /* test_thread_flag(), ... */ 8#include <linux/kdebug.h> /* oops_begin/end, ... */ --- 570 unchanged lines hidden (view full) --- 579show_fault_oops(struct pt_regs *regs, unsigned long error_code, 580 unsigned long address) 581{ 582 if (!oops_may_print()) 583 return; 584 585 if (error_code & PF_INSTR) { 586 unsigned int level; | 1/* 2 * Copyright (C) 1995 Linus Torvalds 3 * Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs. 4 * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar 5 */ 6#include <linux/magic.h> /* STACK_END_MAGIC */ 7#include <linux/sched.h> /* test_thread_flag(), ... */ 8#include <linux/kdebug.h> /* oops_begin/end, ... */ --- 570 unchanged lines hidden (view full) --- 579show_fault_oops(struct pt_regs *regs, unsigned long error_code, 580 unsigned long address) 581{ 582 if (!oops_may_print()) 583 return; 584 585 if (error_code & PF_INSTR) { 586 unsigned int level; |
587 pgd_t *pgd; 588 pte_t *pte; |
|
587 | 589 |
588 pte_t *pte = lookup_address(address, &level); | 590 pgd = __va(read_cr3() & PHYSICAL_PAGE_MASK); 591 pgd += pgd_index(address); |
589 | 592 |
593 pte = lookup_address_in_pgd(pgd, address, &level); 594 |
|
590 if (pte && pte_present(*pte) && !pte_exec(*pte)) 591 printk(nx_warning, from_kuid(&init_user_ns, current_uid())); 592 } 593 594 printk(KERN_ALERT "BUG: unable to handle kernel "); 595 if (address < PAGE_SIZE) 596 printk(KERN_CONT "NULL pointer dereference"); 597 else --- 682 unchanged lines hidden --- | 595 if (pte && pte_present(*pte) && !pte_exec(*pte)) 596 printk(nx_warning, from_kuid(&init_user_ns, current_uid())); 597 } 598 599 printk(KERN_ALERT "BUG: unable to handle kernel "); 600 if (address < PAGE_SIZE) 601 printk(KERN_CONT "NULL pointer dereference"); 602 else --- 682 unchanged lines hidden --- |