Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel
In directory sc8-pr-cvs1:/tmp/cvs-serv16653
Modified Files:
signal.c
Log Message:
DA: okay kernel rt stuff looks good to me ..
Index: signal.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/signal.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- signal.c 18 Sep 2003 13:16:01 -0000 1.13
+++ signal.c 19 Sep 2003 13:37:39 -0000 1.14
@@ -110,8 +110,6 @@
{
sigset_t saveset, newset;
- printk("sys_rt_sigsuspend called but may not work\n");
-
/* XXX: Don't preclude handling different sized sigset_t's. */
if (sigsetsize != sizeof(sigset_t))
return -EINVAL;
@@ -216,7 +214,7 @@
* (we cannot just pop the sigcontext since we aligned the sp and
* stuff after pushing it)
*/
-
+
/* FIXME: check process stack */
/* TODO: the other ports use regs->orig_XX to disable syscall checks
@@ -270,14 +268,13 @@
}
-/* FIXME: _rt_ stuff is completely unchecked + probably does not work */
+/* works better now */
asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
{
- struct rt_sigframe *frame = (struct rt_sigframe *)(regs->sp);
+ struct rt_sigframe *frame = (struct rt_sigframe *)(regs->sp-8);
sigset_t set;
stack_t st;
- printk("sys_rt_sigreturn called but may not work\n");
/*
* Since we stacked the signal on a dword boundary,
* then frame should be dword aligned here. If it's
@@ -371,7 +368,7 @@
#ifdef DEBUG_SIG
- printk("setup_frame: pid %d, sig %d, regs %p, frame %p, sigaction %p\n",current->pid,sig,regs,frame,ka);
+ printk("setup_frame: pid %d, sig %d, regs %p, regs->sp %p, frame %p, sigaction %p\n",current->pid,sig,regs,regs->sp,frame,ka);
show_regs(regs);
#endif
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
@@ -531,6 +528,10 @@
// machine_halt();
frame = get_sigframe(ka, regs, sizeof(*frame));
+#ifdef DEBUG_SIG
+ printk("setup_rt_frame: pid %d, sig %d, regs %p, regs->sp %p, frame %p, sigaction %p\n",current->pid,sig,regs,regs->sp,frame,ka);
+ show_regs(regs);
+#endif
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
goto give_sigsegv;
@@ -594,7 +595,7 @@
/* chmk __NR_sigreturn; */
err |= __put_user(0xbc, (char *)(frame->retcode+12));
err |= __put_user(0x8f, (char *)(frame->retcode+13));
- err |= __put_user(__NR_sigreturn, (short *)(frame->retcode+14));
+ err |= __put_user(__NR_rt_sigreturn, (short *)(frame->retcode+14));
/* plus a halt */
err |= __put_user(0x00, (char *)(frame->retcode+16));
}
@@ -603,12 +604,14 @@
goto give_sigsegv;
/* TODO what is the current->exec_domain stuff and invmap ? */
-
+#ifdef DEBUG_SIG
+ printk("setup_rt_frame: pid %d, frame->retcode %p, sa_handler %p usp %8lX\n",current->pid,frame->retcode,ka->sa.sa_handler,__mfpr(PR_USP));
+#endif
/* Set up registers for signal handler */
regs->pc = (unsigned long) frame->retcode; /* what we enter NOW */
regs->fp = regs->sp;
- regs->sp = (unsigned int)frame; /* what we enter LATER */
+ regs->sp = (unsigned int)frame; /* what we enter LATER */
__mtpr(frame, PR_USP);
return;
|