patch-2.3.35 linux/arch/sparc64/kernel/signal32.c
Next file: linux/arch/sparc64/kernel/smp.c
Previous file: linux/arch/sparc64/kernel/signal.c
Back to the patch index
Back to the overall index
- Lines: 72
- Date:
Mon Dec 20 22:05:52 1999
- Orig file:
v2.3.34/linux/arch/sparc64/kernel/signal32.c
- Orig date:
Sun Nov 7 16:37:34 1999
diff -u --recursive --new-file v2.3.34/linux/arch/sparc64/kernel/signal32.c linux/arch/sparc64/kernel/signal32.c
@@ -1,4 +1,4 @@
-/* $Id: signal32.c,v 1.50 1999/07/30 09:35:25 davem Exp $
+/* $Id: signal32.c,v 1.56 1999/12/20 01:16:16 davem Exp $
* arch/sparc64/kernel/signal32.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
@@ -663,7 +663,8 @@
goto sigsegv;
if(pte_present(*ptep)) {
- unsigned long page = pte_page(*ptep);
+ unsigned long page = (unsigned long)
+ __va(pte_pagenr(*ptep) << PAGE_SHIFT);
__asm__ __volatile__("
membar #StoreStore
@@ -1033,6 +1034,26 @@
err |= __put_user(0, &sf->fpu_save);
}
+ /* Update the siginfo structure. Is this good? */
+ if (info->si_code == 0) {
+ info->si_signo = signr;
+ info->si_errno = 0;
+
+ switch (signr) {
+ case SIGSEGV:
+ case SIGILL:
+ case SIGFPE:
+ case SIGBUS:
+ case SIGEMT:
+ info->si_code = current->thread.sig_desc;
+ info->si_addr = (void *)current->thread.sig_address;
+ info->si_trapno = 0;
+ break;
+ default:
+ break;
+ }
+ }
+
err = __put_user (info->si_signo, &sf->info.si_signo);
err |= __put_user (info->si_errno, &sf->info.si_errno);
err |= __put_user (info->si_code, &sf->info.si_code);
@@ -1084,7 +1105,7 @@
case 1: seta.sig[1] = (oldset->sig[0] >> 32);
seta.sig[0] = oldset->sig[0];
}
- err |= __copy_to_user(&sf->mask, &seta, sizeof(sigset_t));
+ err |= __copy_to_user(&sf->mask, &seta, sizeof(sigset_t32));
err |= copy_in_user((u32 *)sf,
(u32 *)(regs->u_regs[UREG_FP]),
@@ -1122,7 +1143,8 @@
goto sigsegv;
if(pte_present(*ptep)) {
- unsigned long page = pte_page(*ptep);
+ unsigned long page = (unsigned long)
+ __va(pte_pagenr(*ptep) << PAGE_SHIFT);
__asm__ __volatile__("
membar #StoreStore
@@ -1326,7 +1348,8 @@
continue;
case SIGQUIT: case SIGILL: case SIGTRAP:
- case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS:
+ case SIGABRT: case SIGFPE: case SIGSEGV:
+ case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ:
if (do_coredump(signr, regs))
exit_code |= 0x80;
#ifdef DEBUG_SIGNALS
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)