Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: Linux-1.3.95 - spelling fixes
       [not found] <ML-2.2.830355057.1541.torvalds@linux.cs.helsinki.fi>
@ 1996-04-25 22:06 ` Thomas Bogendoerfer
  1996-04-26 12:52   ` Linux-1.3.95 - strace for alpha Linus Torvalds
  1996-04-26 14:26   ` Linux-1.3.95 - spelling fixes Jauder Ho
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 1996-04-25 22:06 UTC (permalink / raw)


> For the alpha people, it has support for "strace", but no strace binary that
> knows about it yet ;-) Thomas Bogendoerfer has been working on that side, but
> I'm afraid I changed the kernel code a bit, and we'll have to synchronize

thanks Linus.

I changed strace, so that it works with the new official interface. 
I've tared together my current development tree, and put it on
ftp.franken.de under /pub/people/tsbogend/strace-alpha-0.00.tar.gz.
There are still lots of bugs in this version, especially with
execve (strace dumps core:-( ), because it gets a little bit
confused with the syscall number. I'm now trying to fix the
remaining bugs. After this is done, I will start clean up sources
and talk to the strace maintainer (if there is one; it looks
like nobody maintains strace, because you even can't compile it 
on Linux/x86) for inclusion of my patches.

Thomas.

-- 
That process _deserves_ to die ("My name is Linus Torvalds, prepare to 
die").                                [Linus Torvalds on linux-kernel]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Linux-1.3.95 - strace for alpha
  1996-04-25 22:06 ` Linux-1.3.95 - spelling fixes Thomas Bogendoerfer
@ 1996-04-26 12:52   ` Linus Torvalds
  1996-04-26 14:26   ` Linux-1.3.95 - spelling fixes Jauder Ho
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 1996-04-26 12:52 UTC (permalink / raw)


On Fri, 26 Apr 1996, Thomas Bogendoerfer wrote:
> 
> > For the alpha people, it has support for "strace", but no strace binary that
> > knows about it yet ;-) Thomas Bogendoerfer has been working on that side, but
> > I'm afraid I changed the kernel code a bit, and we'll have to synchronize
> 
> I changed strace, so that it works with the new official interface. 
> I've tared together my current development tree, and put it on
> ftp.franken.de under /pub/people/tsbogend/strace-alpha-0.00.tar.gz.
> There are still lots of bugs in this version, especially with
> execve (strace dumps core:-( ), because it gets a little bit
> confused with the syscall number. I'm now trying to fix the
> remaining bugs. After this is done, I will start clean up sources
> and talk to the strace maintainer (if there is one; it looks
> like nobody maintains strace, because you even can't compile it 
> on Linux/x86) for inclusion of my patches.

I suspect that the 95 kernel still has a bug in strace handling: traced 
system calls that return errors can (and will) corrupt the $9 and $10 
registers that should be safe across system calls. This can result in 
strange behaviour of traced processes (SIGSEGV's etc, if the corrupted 
register was being used to have a pointer in it, for example).

This smallish patch should fix it (totally untested as usual, but it 
looks ok)

		Linus
-----
diff -u --recursive --new-file v1.3.95/linux/arch/alpha/kernel/entry.S linux/arch/alpha/kernel/entry.S
--- v1.3.95/linux/arch/alpha/kernel/entry.S	Wed Apr 24 17:00:33 1996
+++ linux/arch/alpha/kernel/entry.S	Fri Apr 26 12:12:34 1996
@@ -541,7 +541,7 @@
 	jsr     $26,($27),syscall_trace
 	bsr	$1,undo_switch_stack
 
-	/* get the system call number and the argments back.. */
+	/* get the system call number and the arguments back.. */
 	ldq     $0,0($30)
 	ldq     $16,SP_OFF+24($30)
 	ldq     $17,SP_OFF+32($30)
@@ -574,9 +574,9 @@
 
 	.align  3
 strace_error:
-	ldq	$9,0($30)	/* old syscall nr (zero if success) */
-	beq	$9,strace_success
-	ldq	$10,72($30)	/* .. and this a3 */
+	ldq	$19,0($30)	/* old syscall nr (zero if success) */
+	beq	$19,strace_success
+	ldq	$20,72($30)	/* .. and this a3 */
 
 	subq	$31,$0,$0	/* with error in v0 */
 	addq	$31,1,$1	/* set a3 for errno return */
@@ -584,13 +584,15 @@
 	stq	$1,72($30)	/* a3 for return */
 
 	bsr	$1,do_switch_stack
+	bis	$19,$19,$9	/* save old syscall number */
+	bis	$20,$20,$10	/* save old a3 */
 	lda     $27,syscall_trace
 	jsr     $26,($27),syscall_trace
+	bis	$9,$9,$19
+	bis	$10,$10,$20	
 	bsr	$1,undo_switch_stack
 
 	bis	$31,$31,$26	/* tell "ret_from_sys_call" that we can restart */
-	bis	$9,$9,$19	/*  .. old syscall nr */
-	bis	$10,$10,$20	/*  .. old a3 */
 	br	$31,ret_from_sys_call
 
 	.align 3
-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Linux-1.3.95 - spelling fixes
  1996-04-25 22:06 ` Linux-1.3.95 - spelling fixes Thomas Bogendoerfer
  1996-04-26 12:52   ` Linux-1.3.95 - strace for alpha Linus Torvalds
@ 1996-04-26 14:26   ` Jauder Ho
  1 sibling, 0 replies; 3+ messages in thread
From: Jauder Ho @ 1996-04-26 14:26 UTC (permalink / raw)


this is from the man page:

HISTORY
       strace was written by Paul  Kranenburg,  Branko  Lankester
       and Rick Sladkey.  The original strace was written by Paul
       Kranenburg for SunOS and was inspired by its  trace  util
       ity.   The SunOS version of strace was ported to Linux and
       enhanced by Branko Lankester, who  also  wrote  the  Linux
       kernel  support.   Even though Paul released strace 2.5 in
       1992, Branko's work was based on Paul's strace 1.5 release
       from  1991.   In  1993, Rick Sladkey merged strace 2.5 for
       SunOS and the second release of strace  for  Linux,  added
       the  best  features  of  truss  from SVR4, and produced an
       strace that worked on both platforms.  In 1994 Rick ported
       strace to SVR4 and Solaris and wrote the automatic config
       uration support.

On Fri, 26 Apr 1996, Thomas Bogendoerfer wrote:

> > For the alpha people, it has support for "strace", but no strace binary that
> > knows about it yet ;-) Thomas Bogendoerfer has been working on that side, but
> > I'm afraid I changed the kernel code a bit, and we'll have to synchronize
> 
> thanks Linus.
> 
> I changed strace, so that it works with the new official interface. 
> I've tared together my current development tree, and put it on
> ftp.franken.de under /pub/people/tsbogend/strace-alpha-0.00.tar.gz.
> There are still lots of bugs in this version, especially with
> execve (strace dumps core:-( ), because it gets a little bit
> confused with the syscall number. I'm now trying to fix the
> remaining bugs. After this is done, I will start clean up sources
> and talk to the strace maintainer (if there is one; it looks
> like nobody maintains strace, because you even can't compile it 
> on Linux/x86) for inclusion of my patches.
> 
> Thomas.
> 
> -- 
> That process _deserves_ to die ("My name is Linus Torvalds, prepare to 
> die").                                [Linus Torvalds on linux-kernel]
> 
> 

                           .sig under construction

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-04-26 14:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <ML-2.2.830355057.1541.torvalds@linux.cs.helsinki.fi>
1996-04-25 22:06 ` Linux-1.3.95 - spelling fixes Thomas Bogendoerfer
1996-04-26 12:52   ` Linux-1.3.95 - strace for alpha Linus Torvalds
1996-04-26 14:26   ` Linux-1.3.95 - spelling fixes Jauder Ho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox