Lines Matching refs:fsr
113 static inline bool is_write_fault(unsigned int fsr) in is_write_fault() argument
115 return (fsr & FSR_WRITE) && !(fsr & FSR_CM); in is_write_fault()
118 static inline bool is_translation_fault(unsigned int fsr) in is_translation_fault() argument
120 int fs = fsr_fs(fsr); in is_translation_fault()
132 unsigned long addr, unsigned int fsr, in die_kernel_fault() argument
138 msg, addr, fsr & FSR_LNX_PF ? "execute" : in die_kernel_fault()
139 fsr & FSR_WRITE ? "write" : "read"); in die_kernel_fault()
142 die("Oops", regs, fsr); in die_kernel_fault()
151 __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, in __do_kernel_fault() argument
167 if (is_translation_fault(fsr) && in __do_kernel_fault()
168 kfence_handle_page_fault(addr, is_write_fault(fsr), regs)) in __do_kernel_fault()
174 die_kernel_fault(msg, mm, addr, fsr, regs); in __do_kernel_fault()
182 __do_user_fault(unsigned long addr, unsigned int fsr, unsigned int sig, in __do_user_fault() argument
195 tsk->comm, sig, addr, fsr); in __do_user_fault()
208 tsk->thread.error_code = fsr; in __do_user_fault()
213 void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs) in do_bad_area() argument
223 __do_user_fault(addr, fsr, SIGSEGV, SEGV_MAPERR, regs); in do_bad_area()
225 __do_kernel_fault(mm, addr, fsr, regs); in do_bad_area()
229 static inline bool is_permission_fault(unsigned int fsr) in is_permission_fault() argument
231 int fs = fsr_fs(fsr); in is_permission_fault()
264 do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) in do_page_fault() argument
273 if (kprobe_page_fault(regs, fsr)) in do_page_fault()
291 if (is_write_fault(fsr)) { in do_page_fault()
296 if (fsr & FSR_LNX_PF) { in do_page_fault()
299 if (is_permission_fault(fsr) && !user_mode(regs)) in do_page_fault()
301 mm, addr, fsr, regs); in do_page_fault()
431 __do_user_fault(addr, fsr, sig, code, regs); in do_page_fault()
435 __do_kernel_fault(mm, addr, fsr, regs); in do_page_fault()
440 do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) in do_page_fault() argument
465 do_translation_fault(unsigned long addr, unsigned int fsr, in do_translation_fault() argument
475 return do_page_fault(addr, fsr, regs); in do_translation_fault()
527 do_bad_area(addr, fsr, regs); in do_translation_fault()
532 do_translation_fault(unsigned long addr, unsigned int fsr, in do_translation_fault() argument
545 do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) in do_sect_fault() argument
547 do_bad_area(addr, fsr, regs); in do_sect_fault()
556 do_bad(unsigned long addr, unsigned int fsr, struct pt_regs *regs) in do_bad() argument
562 int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs);
592 do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) in do_DataAbort() argument
594 const struct fsr_info *inf = fsr_info + fsr_fs(fsr); in do_DataAbort()
596 if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs)) in do_DataAbort()
601 inf->name, fsr, addr); in do_DataAbort()
605 fsr, 0); in do_DataAbort()
642 static int __init early_abort_handler(unsigned long addr, unsigned int fsr, in early_abort_handler() argument
647 "firmware/bootloader bug.\n", fsr); in early_abort_handler()