Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel
In directory sc8-pr-cvs1:/tmp/cvs-serv20312
Modified Files:
interrupt.c process.c signal.c
Log Message:
DA: step two still not working but at least the signal handler gets called
Index: interrupt.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/interrupt.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- interrupt.c 23 Feb 2003 23:54:55 -0000 1.26
+++ interrupt.c 18 Sep 2003 13:16:01 -0000 1.27
@@ -224,7 +224,7 @@
printk("\nStack dump\n");
- hex_dump((void *)(regs->sp), 256);
+ hex_dump((void *)(regs->sp)-256, 512);
show_regs(regs);
show_cpu_regs();
@@ -259,7 +259,7 @@
if (user_mode(regs)) {
unsigned int usp = __mfpr(PR_USP);
- hex_dump((void *)usp, 256);
+ hex_dump((void *)usp-128, 256);
force_sig(SIGILL,current);
return;
}
Index: process.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/process.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- process.c 9 Mar 2003 23:07:29 -0000 1.19
+++ process.c 18 Sep 2003 13:16:01 -0000 1.20
@@ -203,13 +203,13 @@
if (!newsp) {
newsp = regs->sp;
}
-#ifdef VAX_PROCESS_DEBUG
+#if 1 /*def VAX_PROCESS_DEBUG*/
printk("sys_clone: calling do_fork(0x%08lx, 0x%08lx, 0x%p)\n",
clone_flags, newsp, regs);
#endif
retval = do_fork(clone_flags, newsp, regs, 0);
-#ifdef VAX_PROCESS_DEBUG
+#if 1 /*def VAX_PROCESS_DEBUG*/
printk("sys_clone: do_fork() returned %d\n", retval);
#endif
return retval;
Index: signal.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/signal.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- signal.c 16 Sep 2003 12:34:15 -0000 1.12
+++ signal.c 18 Sep 2003 13:16:01 -0000 1.13
@@ -188,7 +188,9 @@
/* FIXME: this dont work ... */
struct rt_sigframe {
- int sig;
+ int sig;
+ struct siginfo *pinfo;
+ void *puc;
struct siginfo info;
struct ucontext uc;
unsigned char retcode[20]; /* trampoline code */
@@ -532,6 +534,10 @@
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
goto give_sigsegv;
+ err |= __put_user(sig, (unsigned int *)&frame->sig);
+ err |= __put_user(&frame->info, &frame->pinfo);
+ err |= __put_user(&frame->uc, &frame->puc);
+
err |= copy_siginfo_to_user(&frame->info, info);
if (err)
goto give_sigsegv;
@@ -549,9 +555,6 @@
/* Set up to return from userspace. If provided, use a stub
already in userspace. */
- /* Set up to return from userspace. If provided, use a stub
- already in userspace. */
-
/* We do this differently to other ports. Each function has a two byte RSM.
* (due to the calling convention). Each sighandler will expect to be
* CALLS'd and will RET from that. So we cant just muck about with PC's on the
@@ -559,9 +562,9 @@
* The easiest way to skip around all this is to calls the signal
* handler, and then either calls the restorer, or chmk to sys_sigreturn */
- /* CALLS $1, */
+ /* CALLS $3, */
err |= __put_user(0xfb, (char *)(frame->retcode+0));
- err |= __put_user(0x01, (char *)(frame->retcode+1));
+ err |= __put_user(0x03, (char *)(frame->retcode+1));
/* (absolute address)*/
err |= __put_user(0x9f, (char *)(frame->retcode+2));
/* sighandler */
@@ -603,7 +606,7 @@
/* Set up registers for signal handler */
- regs->pc = (unsigned long) ka->sa.sa_handler; /* what we enter NOW */
+ regs->pc = (unsigned long) frame->retcode; /* what we enter NOW */
regs->fp = regs->sp;
regs->sp = (unsigned int)frame; /* what we enter LATER */
__mtpr(frame, PR_USP);
@@ -652,7 +655,7 @@
/* Set up the stack frame */
#ifdef DEBUG_SIG
- printk("handle_signal: setup_frame(sig=%d,ka=%p,oldset=%d,regs=%p)\n",sig,ka,oldset,regs);
+ printk("handle_signal: setup_frame(sig=%d,flags=%d,ka=%p,oldset=%d,regs=%p)\n",sig,ka->sa.sa_flags,ka,oldset,regs);
#endif
if (ka->sa.sa_flags & SA_SIGINFO)
setup_rt_frame(sig, ka, info, oldset, regs);
|