--- /dev/null
+From stable-bounces@linux.kernel.org Sun Apr 17 17:12:13 2005
+Date: Sun, 17 Apr 2005 17:06:41 -0700
+From: "David S. Miller" <davem@davemloft.net>
+To: stable@kernel.org
+Subject: [PATCH] sparc: Fix PTRACE_CONT bogosity
+
+SunOS aparently had this weird PTRACE_CONT semantic which
+we copied. If the addr argument is something other than
+1, it sets the process program counter to whatever that
+value is.
+
+This is different from every other Linux architecture, which
+don't do anything with the addr and data args.
+
+This difference in particular breaks the Linux native GDB support
+for fork and vfork tracing on sparc and sparc64.
+
+There is no interest in running SunOS binaries using this weird
+PTRACE_CONT behavior, so just delete it so we behave like other
+platforms do.
+
+From: "David S. Miller" <davem@davemloft.net>
+Signed-off-by: Chris Wright <chrisw@osdl.org>
+---
+
+===== arch/sparc/kernel/ptrace.c 1.22 vs edited =====
+--- 1.22/arch/sparc/kernel/ptrace.c 2005-03-13 15:29:55 -08:00
++++ edited/arch/sparc/kernel/ptrace.c 2005-04-13 22:37:33 -07:00
+@@ -530,18 +530,6 @@
+ pt_error_return(regs, EIO);
+ goto out_tsk;
+ }
+- if (addr != 1) {
+- if (addr & 3) {
+- pt_error_return(regs, EINVAL);
+- goto out_tsk;
+- }
+-#ifdef DEBUG_PTRACE
+- printk ("Original: %08lx %08lx\n", child->thread.kregs->pc, child->thread.kregs->npc);
+- printk ("Continuing with %08lx %08lx\n", addr, addr+4);
+-#endif
+- child->thread.kregs->pc = addr;
+- child->thread.kregs->npc = addr + 4;
+- }
+
+ if (request == PTRACE_SYSCALL)
+ set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+===== arch/sparc64/kernel/ptrace.c 1.24 vs edited =====
+--- 1.24/arch/sparc64/kernel/ptrace.c 2005-02-10 19:06:44 -08:00
++++ edited/arch/sparc64/kernel/ptrace.c 2005-04-16 20:52:21 -07:00
+@@ -514,25 +563,6 @@
+ pt_error_return(regs, EIO);
+ goto out_tsk;
+ }
+- if (addr != 1) {
+- unsigned long pc_mask = ~0UL;
+-
+- if ((child->thread_info->flags & _TIF_32BIT) != 0)
+- pc_mask = 0xffffffff;
+-
+- if (addr & 3) {
+- pt_error_return(regs, EINVAL);
+- goto out_tsk;
+- }
+-#ifdef DEBUG_PTRACE
+- printk ("Original: %016lx %016lx\n",
+- child->thread_info->kregs->tpc,
+- child->thread_info->kregs->tnpc);
+- printk ("Continuing with %016lx %016lx\n", addr, addr+4);
+-#endif
+- child->thread_info->kregs->tpc = (addr & pc_mask);
+- child->thread_info->kregs->tnpc = ((addr + 4) & pc_mask);
+- }
+
+ if (request == PTRACE_SYSCALL) {
+ set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+
+
--- /dev/null
+From stable-bounces@linux.kernel.org Sun Apr 17 17:10:52 2005
+Date: Sun, 17 Apr 2005 17:05:19 -0700
+From: "David S. Miller" <davem@davemloft.net>
+To: stable@kernel.org
+Subject: [PATCH] sparc64: Fix copy_sigingo_to_user32()
+
+From: jurij@wooyd.org
+
+Because this routine was not filling in the siginfo
+values for si_band and si_fd, this broke applications
+trying to actually get at this data.
+
+This makes the sparc64 code in line with PowerPC64's
+implementation, which already gets it right.
+
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Chris Wright <chrisw@osdl.org>
+---
+
+===== arch/sparc64/kernel/signal32.c 1.52 vs edited =====
+--- 1.52/arch/sparc64/kernel/signal32.c 2005-03-13 15:29:47 -08:00
++++ edited/arch/sparc64/kernel/signal32.c 2005-04-17 14:37:13 -07:00
+@@ -192,9 +192,12 @@
+ err |= __put_user(from->si_uid, &to->si_uid);
+ break;
+ case __SI_FAULT >> 16:
+- case __SI_POLL >> 16:
+ err |= __put_user(from->si_trapno, &to->si_trapno);
+ err |= __put_user((unsigned long)from->si_addr, &to->si_addr);
++ break;
++ case __SI_POLL >> 16:
++ err |= __put_user(from->si_band, &to->si_band);
++ err |= __put_user(from->si_fd, &to->si_fd);
+ break;
+ case __SI_RT >> 16: /* This is not generated by the kernel as of now. */
+ case __SI_MESGQ >> 16:
+
--- /dev/null
+From stable-bounces@linux.kernel.org Sun Apr 17 17:11:32 2005
+Date: Sun, 17 Apr 2005 17:05:59 -0700
+From: "David S. Miller" <davem@davemloft.net>
+To: stable@kernel.org
+Subject: [PATCH]: sparc64: use message queue compat syscalls
+
+A couple message queue system call entries for compat tasks
+were not using the necessary compat_sys_*() functions, causing
+some glibc test cases to fail.
+
+From: "David S. Miller" <davem@davemloft.net>
+Signed-off-by: Chris Wright <chrisw@osdl.org>
+---
+
+===== arch/sparc64/kernel/systbls.S 1.69 vs edited =====
+--- 1.69/arch/sparc64/kernel/systbls.S 2005-01-14 11:56:05 -08:00
++++ edited/arch/sparc64/kernel/systbls.S 2005-04-11 15:09:49 -07:00
+@@ -75,7 +75,7 @@
+ /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun
+ .word sys_timer_delete, sys32_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy
+ /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink
+- .word sys_mq_timedsend, sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid
++ .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid
+ /*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl
+
+ #endif /* CONFIG_COMPAT */
+