public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>,
	"Theodore Ts'o" <tytso@mit.edu>,
	Randy Dunlap <rdunlap@xenotime.net>,
	Dave Jones <davej@redhat.com>,
	Chuck Wolber <chuckw@quantumlinux.com>,
	torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk,
	davem@davemloft.net, richm@oldelvet.org.uk
Subject: [patch 3/6] [SPARC64]: Fix ptrace/strace
Date: Fri, 27 Jan 2006 18:18:22 -0800	[thread overview]
Message-ID: <20060128021822.GD10362@kroah.com> (raw)
In-Reply-To: <20060128021749.GA10362@kroah.com>

[-- Attachment #1: sparc64-fix-ptrace.patch --]
[-- Type: text/plain, Size: 1392 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Richard Mortimer <richm@oldelvet.org.uk>

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>
---
 arch/sparc64/kernel/entry.S |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

--- linux-2.6.14.6.orig/arch/sparc64/kernel/entry.S
+++ linux-2.6.14.6/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

--

  parent reply	other threads:[~2006-01-28  2:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060128015840.722214000@press.kroah.org>
2006-01-28  2:17 ` [patch 0/6] 2.6.14.7 -stable review Greg KH
2006-01-28  2:18   ` [patch 1/6] setting irq affinity is broken in ia32 with MSI enabled Greg KH
2006-01-28  2:18   ` [patch 2/6] [EBTABLES] Don't match tcp/udp source/destination port for IP fragments Greg KH
2006-01-28  2:18   ` Greg KH [this message]
2006-01-28  2:18   ` [patch 4/6] [SPARC64]: Fix sys_fstat64() entry in 64-bit syscall table Greg KH
2006-01-28  2:18   ` [patch 5/6] [NETFILTER]: Fix crash in ip_nat_pptp (CVE-2006-0036) Greg KH
2006-01-28  2:18   ` [patch 6/6] [NETFILTER]: Fix another crash in ip_nat_pptp (CVE-2006-0037) Greg KH
2006-02-08 12:35     ` Holger Eitzenberger
2006-02-10  4:47       ` [stable] " Greg KH
2006-02-10  4:57         ` Andrew Morton
2006-02-10  5:08           ` Greg KH
2006-02-10  8:07             ` Harald Welte
2006-01-29  4:30   ` [patch 0/6] 2.6.14.7 -stable review Chuck Wolber
2006-01-29  4:43     ` Justin M. Forbes
2006-01-29  4:52       ` Chuck Wolber
2006-01-29  4:57         ` Randy.Dunlap
2006-01-29  5:34           ` Greg KH
2006-01-29  6:09             ` Willy Tarreau
2006-01-29  7:36               ` Chuck Wolber
2006-01-29  7:11             ` Chuck Wolber
2006-01-29  7:58       ` Chuck Wolber
2006-01-29  4:45     ` Randy.Dunlap
2006-01-29  5:02       ` Chuck Wolber
2006-01-29  6:17         ` Willy Tarreau
2006-01-29  7:43           ` Chuck Wolber
2006-01-31 15:05         ` Krzysztof Halasa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060128021822.GD10362@kroah.com \
    --to=gregkh@suse.de \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=chuckw@quantumlinux.com \
    --cc=davej@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jmforbes@linuxtx.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=richm@oldelvet.org.uk \
    --cc=stable@kernel.org \
    --cc=torvalds@osdl.org \
    --cc=tytso@mit.edu \
    --cc=zwane@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox