aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/entry.S
diff options
context:
space:
mode:
authorRichard Mortimer <richm@oldelvet.org.uk>2006-01-09 17:35:50 -0500
committerDavid S. Miller <davem@davemloft.net>2006-01-09 17:35:50 -0500
commit695ca07bf1036091eff2f11d2fe5f1585c2ac8c8 (patch)
tree8d01fdce568098466d4751aaa660385f8a6cf61c /arch/sparc64/kernel/entry.S
parent90bf8116641d6c9fb6f88329634341f9a0f429c6 (diff)
[SPARC64]: Fix ptrace/strace
Don't clobber register %l0 while checking TI_SYS_NOERROR value in syscall return path. This bug was introduced by: db7d9a4eb700be766cc9f29241483dbb1e748832 Problem narrowed down by Luis F. Ortiz and Richard Mortimer. I tried using %l2 as suggested by Luis and that works for me. Looking at the code I wonder if it makes sense to simplify the code a little bit. The following works for me but I'm not sure how to exercise the "NOERROR" codepath. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/entry.S')
-rw-r--r--arch/sparc64/kernel/entry.S7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
index 11a848402fb1..710002991888 100644
--- a/arch/sparc64/kernel/entry.S
+++ b/arch/sparc64/kernel/entry.S
@@ -1657,13 +1657,10 @@ ret_sys_call:
1657 /* Check if force_successful_syscall_return() 1657 /* Check if force_successful_syscall_return()
1658 * was invoked. 1658 * was invoked.
1659 */ 1659 */
1660 ldub [%curptr + TI_SYS_NOERROR], %l0 1660 ldub [%curptr + TI_SYS_NOERROR], %l2
1661 brz,pt %l0, 1f 1661 brnz,a,pn %l2, 80f
1662 nop
1663 ba,pt %xcc, 80f
1664 stb %g0, [%curptr + TI_SYS_NOERROR] 1662 stb %g0, [%curptr + TI_SYS_NOERROR]
1665 1663
16661:
1667 cmp %o0, -ERESTART_RESTARTBLOCK 1664 cmp %o0, -ERESTART_RESTARTBLOCK
1668 bgeu,pn %xcc, 1f 1665 bgeu,pn %xcc, 1f
1669 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 1666 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6