From: "Gleb O. Raiko" <raiko@niisi.msk.ru>
To: "Gleb O. Raiko" <raiko@niisi.msk.ru>
Cc: linux-mips@linux-mips.org
Subject: Re: Bug in the syscall tracing code
Date: Fri, 07 Oct 2005 16:44:59 +0400 [thread overview]
Message-ID: <43466DCB.7070103@niisi.msk.ru> (raw)
In-Reply-To: <43455D2D.1010901@niisi.msk.ru>
Hello,
> 4. I know there should be yet another way.
The way is to load a saved register in the delay slot of jalr. The saved
register shall not be s0, of course, because it's saved by the first
instruction in save_static_function. So the proposed patch is
arch/mips/kernel/scall32-o32.S:
syscall_trace_entry:
SAVE_STATIC
- move s0, t2
+ move s1, t2
move a0, sp
li a1, 0
jal do_syscall_trace
lw a0, PT_R4(sp) # Restore argument registers
lw a1, PT_R5(sp)
lw a2, PT_R6(sp)
lw a3, PT_R7(sp)
- jalr s0
+ .set push
+ .set noreorder
+ jalr s1
+ lw s1, PT_R17(sp)
+ .set pop
The rest of ABIs shall be implemented in the same way.
Regards,
Gleb.
prev parent reply other threads:[~2005-10-07 12:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-06 17:21 Bug in the syscall tracing code Gleb O. Raiko
2005-10-06 20:53 ` Thiemo Seufer
2005-10-06 21:13 ` David Daney
2005-10-07 7:50 ` Gleb O. Raiko
2005-10-07 15:26 ` David Daney
2005-10-07 7:43 ` Gleb O. Raiko
2005-10-07 12:44 ` Gleb O. Raiko [this message]
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=43466DCB.7070103@niisi.msk.ru \
--to=raiko@niisi.msk.ru \
--cc=linux-mips@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