From: Daniel Jacobowitz <dan@debian.org>
To: ralf@linux-mips.org
Cc: linux-mips@linux-mips.org
Subject: MIPS64 syscall trace patch
Date: Thu, 4 Dec 2003 11:53:29 -0500 [thread overview]
Message-ID: <20031204165329.GA4655@nevyn.them.org> (raw)
You need this do use PTRACE_SYSCALL on a 64-bit process. Otherwise mmap()'s
last argument gets corrupted by syscall_trace(). Strace itself doesn't work
yet, but I'm making progress...
This is for 2.4. 2.6 patch will follow in a sec.
Index: arch/mips64/kernel/scall_64.S
===================================================================
RCS file: /home/cvs/linux/arch/mips64/kernel/Attic/scall_64.S,v
retrieving revision 1.20.2.18
diff -u -p -r1.20.2.18 scall_64.S
--- arch/mips64/kernel/scall_64.S 28 Oct 2003 13:39:37 -0000 1.20.2.18
+++ arch/mips64/kernel/scall_64.S 4 Dec 2003 16:51:01 -0000
@@ -108,6 +108,8 @@ trace_a_syscall:
ld a1, PT_R5(sp)
ld a2, PT_R6(sp)
ld a3, PT_R7(sp)
+ ld a4, PT_R8(sp)
+ ld a5, PT_R9(sp)
jalr t2
li t0, -EMAXERRNO - 1 # error?
Index: arch/mips64/kernel/scall_n32.S
===================================================================
RCS file: /home/cvs/linux/arch/mips64/kernel/Attic/scall_n32.S,v
retrieving revision 1.2.2.14
diff -u -p -r1.2.2.14 scall_n32.S
--- arch/mips64/kernel/scall_n32.S 9 Oct 2003 15:42:33 -0000 1.2.2.14
+++ arch/mips64/kernel/scall_n32.S 4 Dec 2003 16:51:01 -0000
@@ -111,6 +111,8 @@ trace_a_syscall:
ld a1, PT_R5(sp)
ld a2, PT_R6(sp)
ld a3, PT_R7(sp)
+ ld a4, PT_R8(sp)
+ ld a5, PT_R9(sp)
jalr t2
li t0, -EMAXERRNO - 1 # error?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
reply other threads:[~2003-12-04 16:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20031204165329.GA4655@nevyn.them.org \
--to=dan@debian.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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