diff options
author | Richard Mortimer <richm@oldelvet.org.uk> | 2006-01-10 13:30:54 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-30 22:42:30 -0800 |
commit | 94a3817e06b6bcbd20a22ea6ab05a855ce4ecaaf (patch) | |
tree | 8afcf19b2d5bd6378a5a34f4e75473991539c1da | |
parent | 03e75b58859a910bd75ab7d9e6b729391d2d83c3 (diff) | |
download | linux-stable-94a3817e06b6bcbd20a22ea6ab05a855ce4ecaaf.tar.gz linux-stable-94a3817e06b6bcbd20a22ea6ab05a855ce4ecaaf.tar.bz2 linux-stable-94a3817e06b6bcbd20a22ea6ab05a855ce4ecaaf.zip |
[PATCH] 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>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | arch/sparc64/kernel/entry.S | 7 |
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: /* Check if force_successful_syscall_return() * was invoked. */ - ldub [%curptr + TI_SYS_NOERROR], %l0 - brz,pt %l0, 1f - nop - ba,pt %xcc, 80f + ldub [%curptr + TI_SYS_NOERROR], %l2 + brnz,a,pn %l2, 80f stb %g0, [%curptr + TI_SYS_NOERROR] -1: cmp %o0, -ERESTART_RESTARTBLOCK bgeu,pn %xcc, 1f andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 |