From: Andreas Schwab <schwab@suse.de>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] Syscall tracing bug
Date: Thu, 26 Sep 2002 19:19:31 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590701906071@msgid-missing> (raw)
There is some problem with tracing syscall(2) in strace. It sees the
actual syscall, but the arguments are shifted, with the first arg being
the syscall number. For example:
$ cat syscall.c
#include <unistd.h>
#include <sys/syscall.h>
int
main ()
{
write (1, "Hello World\n", 12);
syscall (SYS_write, 1, "Hello World\n", 12);
return 0;
}
$ stace ./syscall
execve("./syscall", ["./syscall"], [/* 91 vars */]) = 0
uname({sys="Linux", node="sykes", ...}) = 0
brk(0) = 0x6000000000000b30
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size„982, ...}) = 0
mmap(NULL, 84982, PROT_READ, MAP_PRIVATE, 5, 0) = 0x2000000000040000
close(5) = 0
open("/lib/libc.so.6.1", O_RDONLY) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0002\0\1\0\0\0\240@\3"..., 1024) = 1024
fstat(5, {st_mode=S_IFREG|0755, st_size#50193, ...}) = 0
mmap(NULL, 2260816, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x2000000000058000
mprotect(0x2000000000260000, 130896, PROT_NONE) = 0
mmap(0x2000000000268000, 81920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x200000) = 0x2000000000268000
mmap(0x200000000027c000, 16208, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x200000000027c000
close(5) = 0
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2000000000028000
munmap(0x2000000000040000, 84982) = 0
write(1, "Hello World\n", 12Hello World
) = 12
write(1027, ptrace: umoven: Input/output error
0x1, 4611686018427389952Hello World
) = 12
exit(0) = ?
Is this a bug in strace or in the kernel (maybe <asm/rse.h>)?
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next reply other threads:[~2002-09-26 19:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-26 19:19 Andreas Schwab [this message]
2002-09-26 19:41 ` [Linux-ia64] Syscall tracing bug David Mosberger
2002-09-26 20:09 ` Andreas Schwab
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=marc-linux-ia64-105590701906071@msgid-missing \
--to=schwab@suse.de \
--cc=linux-ia64@vger.kernel.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