提交 5e8d3210 编写于 作者: B Barry Song 提交者: Mike Frysinger

Blackfin: fill out the signal si_addr when sending a SIGBUS/SIGSEGV

Some userspace applications use this member in diagnosing crashes.  It
also makes some LTP tests pass (i.e. the Blackfin arch behaves more like
everyone else).
Signed-off-by: NBarry Song <barry.song@analog.com>
Signed-off-by: NMike Frysinger <vapier@gentoo.org>
上级 0531c467
...@@ -260,9 +260,7 @@ asmlinkage notrace void trap_c(struct pt_regs *fp) ...@@ -260,9 +260,7 @@ asmlinkage notrace void trap_c(struct pt_regs *fp)
#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON #ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
int j; int j;
#endif #endif
#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
unsigned int cpu = raw_smp_processor_id(); unsigned int cpu = raw_smp_processor_id();
#endif
const char *strerror = NULL; const char *strerror = NULL;
int sig = 0; int sig = 0;
siginfo_t info; siginfo_t info;
...@@ -651,7 +649,17 @@ asmlinkage notrace void trap_c(struct pt_regs *fp) ...@@ -651,7 +649,17 @@ asmlinkage notrace void trap_c(struct pt_regs *fp)
{ {
info.si_signo = sig; info.si_signo = sig;
info.si_errno = 0; info.si_errno = 0;
info.si_addr = (void __user *)fp->pc; switch (trapnr) {
case VEC_CPLB_VL:
case VEC_MISALI_D:
case VEC_CPLB_M:
case VEC_CPLB_MHIT:
info.si_addr = (void __user *)cpu_pda[cpu].dcplb_fault_addr;
break;
default:
info.si_addr = (void __user *)fp->pc;
break;
}
force_sig_info(sig, &info, current); force_sig_info(sig, &info, current);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册