···3232 If the system locks up without any debug information you can say Y3333 here to make it possible to dump an OOPS with an external NMI.34343535+config NO_SEGFAULT_TERMINATION3636+ bool "Keep segfaulting processes"3737+ help3838+ Place segfaulting user mode processes on a wait queue instead of3939+ delivering a terminating SIGSEGV to allow debugging with gdb.4040+3541endmenu
+10-3
arch/cris/mm/fault.c
···77#include <linux/mm.h>88#include <linux/interrupt.h>99#include <linux/module.h>1010+#include <linux/wait.h>1011#include <asm/uaccess.h>11121213extern int find_fixup_code(struct pt_regs *);···191190 /* User mode accesses just cause a SIGSEGV */192191193192 if (user_mode(regs)) {193193+ printk(KERN_NOTICE "%s (pid %d) segfaults for page "194194+ "address %08lx at pc %08lx\n",195195+ tsk->comm, tsk->pid,196196+ address, instruction_pointer(regs));197197+#ifdef CONFIG_NO_SEGFAULT_TERMINATION198198+ DECLARE_WAIT_QUEUE_HEAD(wq);199199+ wait_event_interruptible(wq, 0 == 1);200200+#else194201 info.si_signo = SIGSEGV;195202 info.si_errno = 0;196203 /* info.si_code has been set above */197204 info.si_addr = (void *)address;198205 force_sig_info(SIGSEGV, &info, tsk);199199- printk(KERN_NOTICE "%s (pid %d) segfaults for page "200200- "address %08lx at pc %08lx\n",201201- tsk->comm, tsk->pid, address, instruction_pointer(regs));206206+#endif202207 return;203208 }204209