Lines Matching full:fault
6 * Derived from "arch/i386/mm/fault.c"
111 * 5. T1 : enters fault handler, takes mmap_lock, etc... in bad_access_pkey()
138 vm_fault_t fault) in do_sigbus() argument
145 if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) { in do_sigbus()
148 pr_err("MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n", in do_sigbus()
151 if (fault & VM_FAULT_HWPOISON_LARGE) in do_sigbus()
152 lsb = hstate_index_to_shift(VM_FAULT_GET_HINDEX(fault)); in do_sigbus()
153 if (fault & VM_FAULT_HWPOISON) in do_sigbus()
166 vm_fault_t fault) in mm_fault_error() argument
169 * Kernel page fault interrupted by SIGKILL. We have no reason to in mm_fault_error()
176 if (fault & VM_FAULT_OOM) { in mm_fault_error()
179 * made us unable to handle the page fault gracefully. in mm_fault_error()
185 if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON| in mm_fault_error()
187 return do_sigbus(regs, addr, fault); in mm_fault_error()
188 else if (fault & VM_FAULT_SIGSEGV) in mm_fault_error()
196 /* Is this a bad kernel fault ? */
208 // Kernel exec fault is always bad in bad_kernel_fault()
212 // Kernel fault on kernel address is bad in bad_kernel_fault()
216 // Read/write fault blocked by KUAP is bad, it can never succeed. in bad_kernel_fault()
222 // Fault on user outside of certain regions (eg. copy_tofrom_user()) is bad in bad_kernel_fault()
226 // Read/write fault in a valid region (the exception table search passed in bad_kernel_fault()
228 return WARN(true, "Bug: %s fault blocked by KUAP!", is_write ? "Write" : "Read"); in bad_kernel_fault()
231 // What's left? Kernel fault on user and allowed by KUAP in the faulting context. in bad_kernel_fault()
240 * faults just to hit a pkey fault as soon as we fill in a in access_pkey_error()
274 * Check for a read fault. This could be caused by a read on an in access_error()
281 * fault path, handle_mm_fault() also does the same check. To avoid in access_error()
328 * fault instead of DSISR_PROTFAULT. in sanity_check_fault()
337 * sync between D/I cache via fault. But that is handled via low level in sanity_check_fault()
338 * hash fault code (hash_page_do_lazy_icache()) and we should not reach in sanity_check_fault()
347 * set_pte_at while taking the noexec/prot fault. Hence this is WARN_ON in sanity_check_fault()
350 * For radix, we can get prot fault for autonuma case, because radix in sanity_check_fault()
396 * for a data fault, SRR1 for an instruction fault.
397 * For 400-family processors the error_code parameter is ESR for a data fault,
398 * 0 for an instruction fault.
400 * fault, SRR1 & 0x08000000 for an instruction access fault.
402 * The return value is 0 if the fault was handled, or the signal
403 * number if this is a kernel fault that can't be handled here.
414 vm_fault_t fault, major = 0; in ___do_page_fault() local
432 * The kernel should never take an execute fault nor should it in ___do_page_fault()
433 * take a page fault to a kernel address or a page fault to a user in ___do_page_fault()
445 * in a region with pagefaults disabled then we must not take the fault in ___do_page_fault()
449 printk_ratelimited(KERN_ERR "Page fault in user mode" in ___do_page_fault()
462 * can result in fault, which will cause a deadlock when called with in ___do_page_fault()
475 * erroneous fault occurring in a code path which already holds mmap_lock in ___do_page_fault()
476 * we will deadlock attempting to validate the fault against the in ___do_page_fault()
522 * If for any reason at all we couldn't handle the fault, in ___do_page_fault()
524 * the fault. in ___do_page_fault()
526 fault = handle_mm_fault(vma, address, flags, regs); in ___do_page_fault()
528 major |= fault & VM_FAULT_MAJOR; in ___do_page_fault()
530 if (fault_signal_pending(fault, regs)) in ___do_page_fault()
533 /* The fault is fully completed (including releasing mmap lock) */ in ___do_page_fault()
534 if (fault & VM_FAULT_COMPLETED) in ___do_page_fault()
541 if (unlikely(fault & VM_FAULT_RETRY)) { in ___do_page_fault()
548 if (unlikely(fault & VM_FAULT_ERROR)) in ___do_page_fault()
549 return mm_fault_error(regs, address, fault); in ___do_page_fault()
553 * Major/minor page fault accounting. in ___do_page_fault()
621 pr_alert("BUG: Unable to handle unknown paging fault at 0x%08lx\n", in __bad_page_fault()
638 /* Are we prepared to handle this fault? */ in bad_page_fault()