summaryrefslogtreecommitdiffstats
path: root/tapset/x86_64/syscalls.stp
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2010-02-23 20:38:56 -0500
committerFrank Ch. Eigler <fche@elastic.org>2010-02-23 20:38:56 -0500
commitc7005ee1ba902de01a8863661a2031bfd45d3d40 (patch)
treee8a7bfa55c9afcfac71b5aafa5b54256f356c81a /tapset/x86_64/syscalls.stp
parent30263a7389d5c2712536b74656193708bbc64d49 (diff)
parent10328bcf86d49e5de83c5b22890204b5874740a9 (diff)
downloadsystemtap-steved-c7005ee1ba902de01a8863661a2031bfd45d3d40.tar.gz
systemtap-steved-c7005ee1ba902de01a8863661a2031bfd45d3d40.tar.xz
systemtap-steved-c7005ee1ba902de01a8863661a2031bfd45d3d40.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
* 'master' of ssh://sources.redhat.com/git/systemtap: PR10719 part 1: Partial constant folding Simplify null_statement construction Fixed PR 11269 by properly handling mmap syscall 'fd' argument. Removed rvalue operator check. PR 10690 (partial fix). Handle '.=' operator in procfs probes. Conflicts: tapsets.h
Diffstat (limited to 'tapset/x86_64/syscalls.stp')
-rw-r--r--tapset/x86_64/syscalls.stp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tapset/x86_64/syscalls.stp b/tapset/x86_64/syscalls.stp
index 5ad064a2..28fa2969 100644
--- a/tapset/x86_64/syscalls.stp
+++ b/tapset/x86_64/syscalls.stp
@@ -85,10 +85,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 ?
@@ -119,7 +122,8 @@ probe syscall.mmap2 = kernel.function("sys32_mmap2") ?
{
name = "mmap2"
argstr = sprintf("%p, %d, %s, %s, %d, %d", $addr, $len,
- _mprotect_prot_str($prot), _mmap_flags($flags), $fd, $pgoff)
+ _mprotect_prot_str($prot), _mmap_flags($flags),
+ __int32($fd), $pgoff)
}
probe syscall.mmap2.return = kernel.function("sys32_mmap2").return ?