Skip to content

Commit 83016b2

Browse files
kristina-martsenkowildea01
authored andcommitted
arm64: mm: print file name of faulting vma
Print out the name of the file associated with the vma that faulted. This is usually the executable or shared library name. We already print out the task name, but also printing the library name is useful for pinpointing bugs to libraries. Also print the base address and size of the vma, which together with the PC (printed by __show_regs) gives the offset into the library. Fault prints now look like: test[2361]: unhandled level 2 translation fault (11) at 0x00000012, esr 0x92000006, in libfoo.so[ffffa0145000+1000] This is already done on x86, for more details see commit 0325291 ("x86: print which shared library/executable faulted in segfault etc. messages v3"). Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent bf396c0 commit 83016b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/arm64/mm/fault.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,11 @@ static void __do_user_fault(struct task_struct *tsk, unsigned long addr,
261261

262262
if (unhandled_signal(tsk, sig) && show_unhandled_signals_ratelimited()) {
263263
inf = esr_to_fault_info(esr);
264-
pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0x%03x\n",
264+
pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0x%03x",
265265
tsk->comm, task_pid_nr(tsk), inf->name, sig,
266266
addr, esr);
267+
print_vma_addr(KERN_CONT ", in ", regs->pc);
268+
pr_cont("\n");
267269
__show_regs(regs);
268270
}
269271

0 commit comments

Comments
 (0)