Lines Matching full:fault
6 * Derived from "arch/i386/mm/fault.c"
109 * 5. T1 : enters fault handler, takes mmap_lock, etc... in bad_access_pkey()
140 vm_fault_t fault) in do_sigbus() argument
147 if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) { in do_sigbus()
150 pr_err("MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n", in do_sigbus()
153 if (fault & VM_FAULT_HWPOISON_LARGE) in do_sigbus()
154 lsb = hstate_index_to_shift(VM_FAULT_GET_HINDEX(fault)); in do_sigbus()
155 if (fault & VM_FAULT_HWPOISON) in do_sigbus()
168 vm_fault_t fault) in mm_fault_error() argument
171 * Kernel page fault interrupted by SIGKILL. We have no reason to in mm_fault_error()
178 if (fault & VM_FAULT_OOM) { in mm_fault_error()
181 * made us unable to handle the page fault gracefully. in mm_fault_error()
187 if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON| in mm_fault_error()
189 return do_sigbus(regs, addr, fault); in mm_fault_error()
190 else if (fault & VM_FAULT_SIGSEGV) in mm_fault_error()
198 /* Is this a bad kernel fault ? */
210 // Kernel exec fault is always bad in bad_kernel_fault()
214 // Kernel fault on kernel address is bad in bad_kernel_fault()
218 // Read/write fault blocked by KUAP is bad, it can never succeed. in bad_kernel_fault()
224 // Fault on user outside of certain regions (eg. copy_tofrom_user()) is bad in bad_kernel_fault()
228 // Read/write fault in a valid region (the exception table search passed in bad_kernel_fault()
230 return WARN(true, "Bug: %s fault blocked by KUAP!", is_write ? "Write" : "Read"); in bad_kernel_fault()
233 // What's left? Kernel fault on user and allowed by KUAP in the faulting context. in bad_kernel_fault()
242 * faults just to hit a pkey fault as soon as we fill in a in access_pkey_error()
289 * fault path, handle_mm_fault() also does the same check. To avoid in access_error()
336 * fault instead of DSISR_PROTFAULT. in sanity_check_fault()
345 * sync between D/I cache via fault. But that is handled via low level in sanity_check_fault()
346 * hash fault code (hash_page_do_lazy_icache()) and we should not reach in sanity_check_fault()
355 * set_pte_at while taking the noexec/prot fault. Hence this is WARN_ON in sanity_check_fault()
358 * For radix, we can get prot fault for autonuma case, because radix in sanity_check_fault()
404 * for a data fault, SRR1 for an instruction fault.
405 * For 400-family processors the error_code parameter is ESR for a data fault,
406 * 0 for an instruction fault.
408 * fault, SRR1 & 0x08000000 for an instruction access fault.
410 * The return value is 0 if the fault was handled, or the signal
411 * number if this is a kernel fault that can't be handled here.
422 vm_fault_t fault, major = 0; in ___do_page_fault() local
440 * The kernel should never take an execute fault nor should it in ___do_page_fault()
441 * take a page fault to a kernel address or a page fault to a user in ___do_page_fault()
453 * in a region with pagefaults disabled then we must not take the fault in ___do_page_fault()
457 printk_ratelimited(KERN_ERR "Page fault in user mode" in ___do_page_fault()
470 * can result in fault, which will cause a deadlock when called with in ___do_page_fault()
498 fault = handle_mm_fault(vma, address, flags | FAULT_FLAG_VMA_LOCK, regs); in ___do_page_fault()
499 if (!(fault & (VM_FAULT_RETRY | VM_FAULT_COMPLETED))) in ___do_page_fault()
502 if (!(fault & VM_FAULT_RETRY)) { in ___do_page_fault()
507 if (fault & VM_FAULT_MAJOR) in ___do_page_fault()
510 if (fault_signal_pending(fault, regs)) in ___do_page_fault()
518 * erroneous fault occurring in a code path which already holds mmap_lock in ___do_page_fault()
519 * we will deadlock attempting to validate the fault against the in ___do_page_fault()
537 * If for any reason at all we couldn't handle the fault, in ___do_page_fault()
539 * the fault. in ___do_page_fault()
541 fault = handle_mm_fault(vma, address, flags, regs); in ___do_page_fault()
543 major |= fault & VM_FAULT_MAJOR; in ___do_page_fault()
545 if (fault_signal_pending(fault, regs)) in ___do_page_fault()
548 /* The fault is fully completed (including releasing mmap lock) */ in ___do_page_fault()
549 if (fault & VM_FAULT_COMPLETED) in ___do_page_fault()
556 if (unlikely(fault & VM_FAULT_RETRY)) { in ___do_page_fault()
564 if (unlikely(fault & VM_FAULT_ERROR)) in ___do_page_fault()
565 return mm_fault_error(regs, address, fault); in ___do_page_fault()
569 * Major/minor page fault accounting. in ___do_page_fault()
637 pr_alert("BUG: Unable to handle unknown paging fault at 0x%08lx\n", in __bad_page_fault()
654 /* Are we prepared to handle this fault? */ in bad_page_fault()