/[linux-patches]/genpatches-2.6/tags/2.6.15-2/1305_sparc64-strace.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.15-2/1305_sparc64-strace.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 259 - (show annotations) (download)
Wed Jan 11 21:46:01 2006 UTC (8 years, 8 months ago) by dsd
File size: 1316 byte(s)
2.6.15-2 release
1 From: Richard Mortimer <richm@oldelvet.org.uk>
2 Date: Mon, 9 Jan 2006 22:35:50 +0000 (-0800)
3 Subject: [SPARC64]: Fix ptrace/strace
4 X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/davem/sparc-2.6.git;a=commitdiff;h=695ca07bf1036091eff2f11d2fe5f1585c2ac8c8
5
6 [SPARC64]: Fix ptrace/strace
7
8 Don't clobber register %l0 while checking TI_SYS_NOERROR value in
9 syscall return path. This bug was introduced by:
10
11 db7d9a4eb700be766cc9f29241483dbb1e748832
12
13 Problem narrowed down by Luis F. Ortiz and Richard Mortimer.
14
15 I tried using %l2 as suggested by Luis and that works for me.
16
17 Looking at the code I wonder if it makes sense to simplify the code
18 a little bit. The following works for me but I'm not sure how to
19 exercise the "NOERROR" codepath.
20
21 Signed-off-by: David S. Miller <davem@davemloft.net>
22 ---
23
24 --- a/arch/sparc64/kernel/entry.S
25 +++ b/arch/sparc64/kernel/entry.S
26 @@ -1657,13 +1657,10 @@ ret_sys_call:
27 /* Check if force_successful_syscall_return()
28 * was invoked.
29 */
30 - ldub [%curptr + TI_SYS_NOERROR], %l0
31 - brz,pt %l0, 1f
32 - nop
33 - ba,pt %xcc, 80f
34 + ldub [%curptr + TI_SYS_NOERROR], %l2
35 + brnz,a,pn %l2, 80f
36 stb %g0, [%curptr + TI_SYS_NOERROR]
37
38 -1:
39 cmp %o0, -ERESTART_RESTARTBLOCK
40 bgeu,pn %xcc, 1f
41 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6

  ViewVC Help
Powered by ViewVC 1.1.20