Lines Matching refs:address

149 static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)  in vmalloc_sync_one()  argument
151 unsigned index = pgd_index(address); in vmalloc_sync_one()
168 p4d = p4d_offset(pgd, address); in vmalloc_sync_one()
169 p4d_k = p4d_offset(pgd_k, address); in vmalloc_sync_one()
173 pud = pud_offset(p4d, address); in vmalloc_sync_one()
174 pud_k = pud_offset(p4d_k, address); in vmalloc_sync_one()
178 pmd = pmd_offset(pud, address); in vmalloc_sync_one()
179 pmd_k = pmd_offset(pud_k, address); in vmalloc_sync_one()
194 unsigned long address; in vmalloc_sync_all() local
199 for (address = VMALLOC_START & PMD_MASK; in vmalloc_sync_all()
200 address >= TASK_SIZE_MAX && address < FIXADDR_TOP; in vmalloc_sync_all()
201 address += PMD_SIZE) { in vmalloc_sync_all()
212 vmalloc_sync_one(page_address(page), address); in vmalloc_sync_all()
224 static noinline int vmalloc_fault(unsigned long address) in vmalloc_fault() argument
231 if (!(address >= VMALLOC_START && address < VMALLOC_END)) in vmalloc_fault()
242 pmd_k = vmalloc_sync_one(__va(pgd_paddr), address); in vmalloc_fault()
249 pte_k = pte_offset_kernel(pmd_k, address); in vmalloc_fault()
261 check_v8086_mode(struct pt_regs *regs, unsigned long address, in check_v8086_mode() argument
270 bit = (address - 0xA0000) >> PAGE_SHIFT; in check_v8086_mode()
281 static void dump_pagetable(unsigned long address) in dump_pagetable() argument
284 pgd_t *pgd = &base[pgd_index(address)]; in dump_pagetable()
298 p4d = p4d_offset(pgd, address); in dump_pagetable()
299 pud = pud_offset(p4d, address); in dump_pagetable()
300 pmd = pmd_offset(pud, address); in dump_pagetable()
313 pte = pte_offset_kernel(pmd, address); in dump_pagetable()
331 static noinline int vmalloc_fault(unsigned long address) in vmalloc_fault() argument
340 if (!(address >= VMALLOC_START && address < VMALLOC_END)) in vmalloc_fault()
348 pgd = (pgd_t *)__va(read_cr3_pa()) + pgd_index(address); in vmalloc_fault()
349 pgd_k = pgd_offset_k(address); in vmalloc_fault()
363 p4d = p4d_offset(pgd, address); in vmalloc_fault()
364 p4d_k = p4d_offset(pgd_k, address); in vmalloc_fault()
377 pud = pud_offset(p4d, address); in vmalloc_fault()
384 pmd = pmd_offset(pud, address); in vmalloc_fault()
391 pte = pte_offset_kernel(pmd, address); in vmalloc_fault()
412 check_v8086_mode(struct pt_regs *regs, unsigned long address, in check_v8086_mode() argument
424 static void dump_pagetable(unsigned long address) in dump_pagetable() argument
427 pgd_t *pgd = base + pgd_index(address); in dump_pagetable()
441 p4d = p4d_offset(pgd, address); in dump_pagetable()
449 pud = pud_offset(p4d, address); in dump_pagetable()
457 pmd = pmd_offset(pud, address); in dump_pagetable()
465 pte = pte_offset_kernel(pmd, address); in dump_pagetable()
493 static int is_errata93(struct pt_regs *regs, unsigned long address) in is_errata93() argument
500 if (address != regs->ip) in is_errata93()
503 if ((address >> 32) != 0) in is_errata93()
506 address |= 0xffffffffUL << 32; in is_errata93()
507 if ((address >= (u64)_stext && address <= (u64)_etext) || in is_errata93()
508 (address >= MODULES_VADDR && address <= MODULES_END)) { in is_errata93()
510 regs->ip = address; in is_errata93()
525 static int is_errata100(struct pt_regs *regs, unsigned long address) in is_errata100() argument
528 if ((regs->cs == __USER32_CS || (regs->cs & (1<<2))) && (address >> 32)) in is_errata100()
534 static int is_f00f_bug(struct pt_regs *regs, unsigned long address) in is_f00f_bug() argument
543 nr = (address - idt_descr.address) >> 3; in is_f00f_bug()
570 if (probe_kernel_read(&desc, (void *)(gdt->address + offset), in show_ldttss()
586 show_fault_oops(struct pt_regs *regs, unsigned long error_code, unsigned long address) in show_fault_oops() argument
597 pgd += pgd_index(address); in show_fault_oops()
599 pte = lookup_address_in_pgd(pgd, address, &level); in show_fault_oops()
611 if (address < PAGE_SIZE && !user_mode(regs)) in show_fault_oops()
613 (void *)address); in show_fault_oops()
616 (void *)address); in show_fault_oops()
650 idt.address, idt.size, gdt.address, gdt.size); in show_fault_oops()
659 dump_pagetable(address); in show_fault_oops()
664 unsigned long address) in pgtable_bad() argument
675 tsk->comm, address); in pgtable_bad()
676 dump_pagetable(address); in pgtable_bad()
684 static void set_signal_archinfo(unsigned long address, in set_signal_archinfo() argument
698 if (address >= TASK_SIZE_MAX) in set_signal_archinfo()
703 tsk->thread.cr2 = address; in set_signal_archinfo()
708 unsigned long address, int signal, int si_code) in no_context() argument
724 if (fixup_exception(regs, X86_TRAP_PF, error_code, address)) { in no_context()
740 set_signal_archinfo(address, error_code); in no_context()
743 force_sig_fault(signal, si_code, (void __user *)address); in no_context()
758 if (is_vmalloc_addr((void *)address) && in no_context()
759 (((unsigned long)tsk->stack - 1 - address < PAGE_SIZE) || in no_context()
760 address - ((unsigned long)tsk->stack + THREAD_SIZE) < PAGE_SIZE)) { in no_context()
777 "S" (regs), "d" (address), in no_context()
794 if (is_prefetch(regs, error_code, address)) in no_context()
797 if (is_errata93(regs, address)) in no_context()
805 efi_recover_from_page_fault(address); in no_context()
814 show_fault_oops(regs, error_code, address); in no_context()
824 printk(KERN_DEFAULT "CR2: %016lx\n", address); in no_context()
835 unsigned long address, struct task_struct *tsk) in show_signal_msg() argument
846 loglvl, tsk->comm, task_pid_nr(tsk), address, in show_signal_msg()
867 unsigned long address, u32 pkey, int si_code) in __bad_area_nosemaphore() argument
882 if (is_prefetch(regs, error_code, address)) in __bad_area_nosemaphore()
885 if (is_errata100(regs, address)) in __bad_area_nosemaphore()
893 if (address >= TASK_SIZE_MAX) in __bad_area_nosemaphore()
897 show_signal_msg(regs, error_code, address, tsk); in __bad_area_nosemaphore()
899 set_signal_archinfo(address, error_code); in __bad_area_nosemaphore()
902 force_sig_pkuerr((void __user *)address, pkey); in __bad_area_nosemaphore()
904 force_sig_fault(SIGSEGV, si_code, (void __user *)address); in __bad_area_nosemaphore()
909 if (is_f00f_bug(regs, address)) in __bad_area_nosemaphore()
912 no_context(regs, error_code, address, SIGSEGV, si_code); in __bad_area_nosemaphore()
917 unsigned long address) in bad_area_nosemaphore() argument
919 __bad_area_nosemaphore(regs, error_code, address, 0, SEGV_MAPERR); in bad_area_nosemaphore()
924 unsigned long address, u32 pkey, int si_code) in __bad_area() argument
933 __bad_area_nosemaphore(regs, error_code, address, pkey, si_code); in __bad_area()
937 bad_area(struct pt_regs *regs, unsigned long error_code, unsigned long address) in bad_area() argument
939 __bad_area(regs, error_code, address, 0, SEGV_MAPERR); in bad_area()
961 unsigned long address, struct vm_area_struct *vma) in bad_area_access_error() argument
991 __bad_area(regs, error_code, address, pkey, SEGV_PKUERR); in bad_area_access_error()
993 __bad_area(regs, error_code, address, 0, SEGV_ACCERR); in bad_area_access_error()
998 do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address, in do_sigbus() argument
1003 no_context(regs, error_code, address, SIGBUS, BUS_ADRERR); in do_sigbus()
1008 if (is_prefetch(regs, error_code, address)) in do_sigbus()
1011 set_signal_archinfo(address, error_code); in do_sigbus()
1020 tsk->comm, tsk->pid, address); in do_sigbus()
1025 force_sig_mceerr(BUS_MCEERR_AR, (void __user *)address, lsb); in do_sigbus()
1029 force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address); in do_sigbus()
1034 unsigned long address, vm_fault_t fault) in mm_fault_error() argument
1037 no_context(regs, error_code, address, 0, 0); in mm_fault_error()
1044 no_context(regs, error_code, address, in mm_fault_error()
1058 do_sigbus(regs, error_code, address, fault); in mm_fault_error()
1060 bad_area_nosemaphore(regs, error_code, address); in mm_fault_error()
1099 spurious_kernel_fault(unsigned long error_code, unsigned long address) in spurious_kernel_fault() argument
1121 pgd = init_mm.pgd + pgd_index(address); in spurious_kernel_fault()
1125 p4d = p4d_offset(pgd, address); in spurious_kernel_fault()
1132 pud = pud_offset(p4d, address); in spurious_kernel_fault()
1139 pmd = pmd_offset(pud, address); in spurious_kernel_fault()
1146 pte = pte_offset_kernel(pmd, address); in spurious_kernel_fault()
1208 static int fault_in_kernel_space(unsigned long address) in fault_in_kernel_space() argument
1215 if (IS_ENABLED(CONFIG_X86_64) && is_vsyscall_vaddr(address)) in fault_in_kernel_space()
1218 return address >= TASK_SIZE_MAX; in fault_in_kernel_space()
1228 unsigned long address) in do_kern_addr_fault() argument
1256 if (vmalloc_fault(address) >= 0) in do_kern_addr_fault()
1261 if (spurious_kernel_fault(hw_error_code, address)) in do_kern_addr_fault()
1276 bad_area_nosemaphore(regs, hw_error_code, address); in do_kern_addr_fault()
1284 unsigned long address) in do_user_addr_fault() argument
1304 pgtable_bad(regs, hw_error_code, address); in do_user_addr_fault()
1317 bad_area_nosemaphore(regs, hw_error_code, address); in do_user_addr_fault()
1326 bad_area_nosemaphore(regs, hw_error_code, address); in do_user_addr_fault()
1345 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); in do_user_addr_fault()
1364 if (is_vsyscall_vaddr(address)) { in do_user_addr_fault()
1365 if (emulate_vsyscall(hw_error_code, regs, address)) in do_user_addr_fault()
1388 bad_area_nosemaphore(regs, hw_error_code, address); in do_user_addr_fault()
1402 vma = find_vma(mm, address); in do_user_addr_fault()
1404 bad_area(regs, hw_error_code, address); in do_user_addr_fault()
1407 if (likely(vma->vm_start <= address)) in do_user_addr_fault()
1410 bad_area(regs, hw_error_code, address); in do_user_addr_fault()
1413 if (unlikely(expand_stack(vma, address))) { in do_user_addr_fault()
1414 bad_area(regs, hw_error_code, address); in do_user_addr_fault()
1424 bad_area_access_error(regs, hw_error_code, address, vma); in do_user_addr_fault()
1441 fault = handle_mm_fault(vma, address, flags); in do_user_addr_fault()
1463 no_context(regs, hw_error_code, address, SIGBUS, BUS_ADRERR); in do_user_addr_fault()
1469 mm_fault_error(regs, hw_error_code, address, fault); in do_user_addr_fault()
1479 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address); in do_user_addr_fault()
1482 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address); in do_user_addr_fault()
1485 check_v8086_mode(regs, address, tsk); in do_user_addr_fault()
1495 unsigned long address) in __do_page_fault() argument
1499 if (unlikely(kmmio_fault(regs, address))) in __do_page_fault()
1503 if (unlikely(fault_in_kernel_space(address))) in __do_page_fault()
1504 do_kern_addr_fault(regs, hw_error_code, address); in __do_page_fault()
1506 do_user_addr_fault(regs, hw_error_code, address); in __do_page_fault()
1512 unsigned long address) in trace_page_fault_entries() argument
1518 trace_page_fault_user(address, regs, error_code); in trace_page_fault_entries()
1520 trace_page_fault_kernel(address, regs, error_code); in trace_page_fault_entries()
1524 do_page_fault(struct pt_regs *regs, unsigned long error_code, unsigned long address) in do_page_fault() argument
1529 trace_page_fault_entries(regs, error_code, address); in do_page_fault()
1530 __do_page_fault(regs, error_code, address); in do_page_fault()