summaryrefslogtreecommitdiffstats
path: root/tapset/ia64/syscalls.stp
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2010-02-23 15:57:25 -0600
committerDavid Smith <dsmith@redhat.com>2010-02-23 15:57:25 -0600
commitd945a07eecee9851173365459d196bcd22c3e636 (patch)
treeacf0cf964c937f5a31216f3cfb38662252428851 /tapset/ia64/syscalls.stp
parent4d3c480990cdbbd3e0c405be03a195a040b4dc4a (diff)
downloadsystemtap-steved-d945a07eecee9851173365459d196bcd22c3e636.tar.gz
systemtap-steved-d945a07eecee9851173365459d196bcd22c3e636.tar.xz
systemtap-steved-d945a07eecee9851173365459d196bcd22c3e636.zip
Fixed PR 11269 by properly handling mmap syscall 'fd' argument.
* testsuite/systemtap.syscall/mmap.c (main): Added mprotect and mremap testing (along with testing of anonymous maps). * tapset/i386/syscalls.stp: In mmap probes, handle the fact that the kernel gets an unsigned long 'fd', but the user-side passes a signed int. * tapset/i386/nd_syscalls.stp: Ditto. * tapset/ia64/syscalls.stp: Ditto. * tapset/powerpc/nd_syscalls.stp: Ditto. * tapset/powerpc/syscalls.stp: Ditto. * tapset/x86_64/nd_syscalls.stp: Ditto. * tapset/x86_64/syscalls.stp: Ditto.
Diffstat (limited to 'tapset/ia64/syscalls.stp')
-rw-r--r--tapset/ia64/syscalls.stp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tapset/ia64/syscalls.stp b/tapset/ia64/syscalls.stp
index c57ab7e6..9601ac08 100644
--- a/tapset/ia64/syscalls.stp
+++ b/tapset/ia64/syscalls.stp
@@ -10,10 +10,13 @@ probe syscall.mmap = kernel.function("sys_mmap") ?
len = $len
prot = $prot
flags = $flags
- fd = $fd
+ # Although the kernel gets an unsigned long fd, on the
+ # user-side it is a signed int. Fix this.
+ fd = __int32($fd)
offset = $off
argstr = sprintf("%p, %d, %s, %s, %d, %d", $addr, $len,
- _mprotect_prot_str($prot), _mmap_flags($flags), $fd, $off)
+ _mprotect_prot_str($prot), _mmap_flags($flags),
+ __int32($fd), $off)
}
probe syscall.mmap.return = kernel.function("sys_mmap").return ?