/[linux-patches]/genpatches-2.6/trunk/2.6.14/1187_7_sparc64-ptrace.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1187_7_sparc64-ptrace.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (show annotations) (download) (as text)
Tue Jan 31 21:50:53 2006 UTC (14 years, 9 months ago) by johnm
File MIME type: text/x-diff
File size: 1517 byte(s)
Large update - thanks goes to Kerin Millar for the legwork.
1 From stable-bounces@linux.kernel.org Tue Jan 10 13:35:08 2006
2 Date: Tue, 10 Jan 2006 13:30:54 -0800 (PST)
3 Message-Id: <20060110.133054.07150578.davem@davemloft.net>
4 To: stable@kernel.org
5 From: "David S. Miller" <davem@davemloft.net>
6 Subject: [SPARC64]: Fix ptrace/strace
7
8 From: Richard Mortimer <richm@oldelvet.org.uk>
9
10 Don't clobber register %l0 while checking TI_SYS_NOERROR value in
11 syscall return path. This bug was introduced by:
12
13 db7d9a4eb700be766cc9f29241483dbb1e748832
14
15 Problem narrowed down by Luis F. Ortiz and Richard Mortimer.
16
17 I tried using %l2 as suggested by Luis and that works for me.
18
19 Looking at the code I wonder if it makes sense to simplify the code
20 a little bit. The following works for me but I'm not sure how to
21 exercise the "NOERROR" codepath.
22
23 Signed-off-by: David S. Miller <davem@davemloft.net>
24 Signed-off-by: Chris Wright <chrisw@sous-sol.org>
25 ---
26 arch/sparc64/kernel/entry.S | 7 ++-----
27 1 file changed, 2 insertions(+), 5 deletions(-)
28
29 --- linux-2.6.14.6.orig/arch/sparc64/kernel/entry.S
30 +++ linux-2.6.14.6/arch/sparc64/kernel/entry.S
31 @@ -1657,13 +1657,10 @@ ret_sys_call:
32 /* Check if force_successful_syscall_return()
33 * was invoked.
34 */
35 - ldub [%curptr + TI_SYS_NOERROR], %l0
36 - brz,pt %l0, 1f
37 - nop
38 - ba,pt %xcc, 80f
39 + ldub [%curptr + TI_SYS_NOERROR], %l2
40 + brnz,a,pn %l2, 80f
41 stb %g0, [%curptr + TI_SYS_NOERROR]
42
43 -1:
44 cmp %o0, -ERESTART_RESTARTBLOCK
45 bgeu,pn %xcc, 1f
46 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6

  ViewVC Help
Powered by ViewVC 1.1.20