]> sourceware.org Git - systemtap.git/commitdiff
Update the syscall tapset for the 4.11 kernel (s390x, powerpc, aarch64).
authorDavid Smith <dsmith@redhat.com>
Thu, 1 Jun 2017 20:29:50 +0000 (15:29 -0500)
committerDavid Smith <dsmith@redhat.com>
Thu, 1 Jun 2017 20:29:50 +0000 (15:29 -0500)
* tapset/linux/s390/aux_syscalls.stp (_arch_ptrace_argstr): Add
  PTRACE_SINGLEBLOCK support.
* tapset/linux/sysc_pwrite.stp: Fix compat 64-bit offset logic. Use
  @__compat_ulong() on the appropriate values. Probe the
  "compat_sys_s390_SYSCALL" function for s390 compat support.
* tapset/linux/s390/sysc_compat_fadvise64.stp: Ditto.
* tapset/linux/s390/sysc_compat_ftruncate64.stp: Ditto.
* tapset/linux/s390/sysc_compat_readahead.stp: Ditto.
* tapset/linux/sysc_io_cancel.stp: Use @__compat_ulong() on the
  appropriate values.
* tapset/linux/sysc_io_destroy.stp: Ditto.
* tapset/linux/sysc_io_getevents.stp: Ditto.
* tapset/linux/sysc_io_submit.stp: Ditto.
* tapset/linux/sysc_ioctl.stp: Ditto.
* tapset/linux/sysc_kexec_load.stp: Ditto.
* tapset/linux/sysc_pread.stp: Ditto.
* tapset/linux/sysc_ptrace.stp: Ditto.
* tapset/linux/sysc_fstatat.stp: Probe the "compat_sys_s390_SYSCALL"
  function for s390 compat support.
* tapset/linux/sysc_getegid.stp: Ditto.
* tapset/linux/sysc_geteuid.stp: Ditto.
* tapset/linux/sysc_getgid.stp: Ditto.
* tapset/linux/sysc_getgroups.stp: Ditto.
* tapset/linux/sysc_getuid.stp: Ditto.
* tapset/linux/sysc_lstat.stp: Ditto.
* tapset/linux/sysc_read.stp: Ditto.
* tapset/linux/sysc_setgroups.stp: Ditto.
* tapset/linux/sysc_stat.stp: Ditto.
* tapset/linux/sysc_write.stp: Ditto.
* tapset/linux/s390/sysc_getresgid16.stp: Ditto.
* tapset/linux/s390/sysc_getresuid16.stp: Ditto.
* tapset/linux/s390/sysc_compat_truncate64.stp: Ditto.
* tapset/linux/sysc_clock_nanosleep.stp: Use @__pointer() on pointer
  values.
* tapset/linux/sysc_copy_file_range.stp: Ditto.
* tapset/linux/sysc_execve.stp: Ditto.
* tapset/linux/sysc_fcntl.stp: Ditto.
* tapset/linux/sysc_fstatfs64.stp: Ditto.
* tapset/linux/sysc_futex.stp: Ditto.
* tapset/linux/sysc_futimesat.stp: Ditto.
* tapset/linux/sysc_mount.stp: Ditto.
* tapset/linux/sysc_mq_getsetattr.stp: Ditto.
* tapset/linux/sysc_mq_notify.stp: Ditto.
* tapset/linux/sysc_mq_open.stp: Ditto.
* tapset/linux/sysc_mq_timedreceive.stp: Ditto.
* tapset/linux/sysc_mq_timedsend.stp: Ditto.
* tapset/linux/sysc_nanosleep.stp: Ditto.
* tapset/linux/sysc_ppoll.stp: Ditto.
* tapset/linux/sysc_process_vm_readv.stp: Ditto.
* tapset/linux/sysc_process_vm_writev.stp: Ditto.
* tapset/linux/sysc_pselect6.stp: Ditto.
* tapset/linux/sysc_pselect7.stp: Ditto.
* tapset/linux/sysc_sched_getaffinity.stp: Ditto.
* tapset/linux/sysc_sched_setaffinity.stp: Ditto.
* tapset/linux/sysc_select.stp: Ditto.
* tapset/linux/sysc_settimeofday.stp: Ditto.
* tapset/linux/sysc_statfs.stp: Ditto.
* tapset/linux/sysc_statfs64.stp: Ditto.
* tapset/linux/sysc_timer_create.stp: Ditto.
* tapset/linux/sysc_timer_settime.stp: Ditto.
* tapset/linux/sysc_times.stp: Ditto.
* tapset/linux/sysc_utime.stp: Ditto.
* tapset/linux/sysc_utimensat.stp: Ditto.
* tapset/linux/sysc_utimes.stp: Ditto.
* tapset/linux/sysc_accept.stp: Make sure the 'call' socketcall() argument
  is treated as an 32-bit int.
* tapset/linux/sysc_accept4.stp: Ditto.
* tapset/linux/sysc_bind.stp: Ditto.
* tapset/linux/sysc_connect.stp: Ditto.
* tapset/linux/sysc_getpeername.stp: Ditto.
* tapset/linux/sysc_getsockname.stp: Ditto.
* tapset/linux/sysc_getsockopt.stp: Ditto.
* tapset/linux/sysc_listen.stp: Ditto.
* tapset/linux/sysc_recv.stp: Ditto.
* tapset/linux/sysc_recvfrom.stp: Ditto.
* tapset/linux/sysc_recvmsg.stp: Ditto.
* tapset/linux/sysc_send.stp: Ditto.
* tapset/linux/sysc_sendmmsg.stp: Ditto.
* tapset/linux/sysc_sendmsg.stp: Ditto.
* tapset/linux/sysc_sendto.stp: Ditto.
* tapset/linux/sysc_setsockopt.stp: Ditto.
* tapset/linux/sysc_shutdown.stp: Ditto.
* tapset/linux/sysc_socket.stp: Ditto.
* tapset/linux/sysc_socketpair.stp: Ditto.
* tapset/linux/sysc_execveat.stp: Fix calling the nd_syscall 'int_arg()'
  function on '$flags' in dw_syscall.compat_execveat. Use @__pointer() on
  pointer values.
* tapset/linux/aux_syscalls.stp: Initialize structure to make gcc happy.
* tapset/linux/arm64/syscall_num.stp: Add "statx" syscall.
* tapset/linux/s390/syscall_num.stp: Ditto.
* tapset/linux/powerpc/syscall_num.stp: Add "copy_file_range" and
  "statx" syscalls.
* testsuite/systemtap.syscall/aio.c: Updated with syscall wrappers.
* testsuite/systemtap.syscall/ioperm.c: Ditto.
* testsuite/systemtap.syscall/clock.c: Add a return value to the regexp.
* testsuite/systemtap.syscall/copy_file_range.c: Corrected types from
  'off_t' to 'loff_t'.
* testsuite/systemtap.syscall/fadvise64.c: Add a "return 0" from main() so
  that systemtap doesn't complain about the target exiting with a non-zero
  exit code.
* testsuite/systemtap.syscall/getgroups.c: Ditto.
* testsuite/systemtap.syscall/memfd_create.c: Add s390 31-bit regex support.
* testsuite/systemtap.syscall/readdir.c: Ditto.
* testsuite/systemtap.syscall/sched_attr.c: Ditto.
* testsuite/systemtap.syscall/stat.c: Ditto.
* testsuite/systemtap.syscall/uselib.c: Ditto.
* testsuite/systemtap.syscall/seccomp.c: Add s390 31-bit support and allow
  for the syscall to be unimplemented.
* testsuite/systemtap.syscall/ptrace.c: For s390, undefine PTRACE_GETREGS
  if we've got PTRACE_SINGLEBLOCK (since they have the same value).
* testsuite/systemtap.syscall/userfaultfd.c: Handle userfaultfd() being
  unimplemented.
* testsuite/systemtap.syscall/tapset/syscall.stp: Updated.

98 files changed:
tapset/linux/arm64/syscall_num.stp
tapset/linux/aux_syscalls.stp
tapset/linux/powerpc/syscall_num.stp
tapset/linux/s390/aux_syscalls.stp
tapset/linux/s390/sysc_compat_fadvise64.stp
tapset/linux/s390/sysc_compat_ftruncate64.stp
tapset/linux/s390/sysc_compat_readahead.stp
tapset/linux/s390/sysc_compat_truncate64.stp
tapset/linux/s390/sysc_getresgid16.stp
tapset/linux/s390/sysc_getresuid16.stp
tapset/linux/s390/syscall_num.stp
tapset/linux/sysc_accept.stp
tapset/linux/sysc_accept4.stp
tapset/linux/sysc_bind.stp
tapset/linux/sysc_clock_nanosleep.stp
tapset/linux/sysc_connect.stp
tapset/linux/sysc_copy_file_range.stp
tapset/linux/sysc_execve.stp
tapset/linux/sysc_execveat.stp
tapset/linux/sysc_fcntl.stp
tapset/linux/sysc_fstat.stp
tapset/linux/sysc_fstatat.stp
tapset/linux/sysc_fstatfs64.stp
tapset/linux/sysc_futex.stp
tapset/linux/sysc_futimesat.stp
tapset/linux/sysc_getegid.stp
tapset/linux/sysc_geteuid.stp
tapset/linux/sysc_getgid.stp
tapset/linux/sysc_getgroups.stp
tapset/linux/sysc_getpeername.stp
tapset/linux/sysc_getsockname.stp
tapset/linux/sysc_getsockopt.stp
tapset/linux/sysc_getuid.stp
tapset/linux/sysc_io_cancel.stp
tapset/linux/sysc_io_destroy.stp
tapset/linux/sysc_io_getevents.stp
tapset/linux/sysc_io_submit.stp
tapset/linux/sysc_ioctl.stp
tapset/linux/sysc_kexec_load.stp
tapset/linux/sysc_listen.stp
tapset/linux/sysc_lstat.stp
tapset/linux/sysc_mount.stp
tapset/linux/sysc_mq_getsetattr.stp
tapset/linux/sysc_mq_notify.stp
tapset/linux/sysc_mq_open.stp
tapset/linux/sysc_mq_timedreceive.stp
tapset/linux/sysc_mq_timedsend.stp
tapset/linux/sysc_nanosleep.stp
tapset/linux/sysc_ppoll.stp
tapset/linux/sysc_pread.stp
tapset/linux/sysc_process_vm_readv.stp
tapset/linux/sysc_process_vm_writev.stp
tapset/linux/sysc_pselect6.stp
tapset/linux/sysc_pselect7.stp
tapset/linux/sysc_ptrace.stp
tapset/linux/sysc_pwrite.stp
tapset/linux/sysc_read.stp
tapset/linux/sysc_recv.stp
tapset/linux/sysc_recvfrom.stp
tapset/linux/sysc_recvmsg.stp
tapset/linux/sysc_sched_getaffinity.stp
tapset/linux/sysc_sched_setaffinity.stp
tapset/linux/sysc_select.stp
tapset/linux/sysc_send.stp
tapset/linux/sysc_sendmmsg.stp
tapset/linux/sysc_sendmsg.stp
tapset/linux/sysc_sendto.stp
tapset/linux/sysc_setgroups.stp
tapset/linux/sysc_setsockopt.stp
tapset/linux/sysc_settimeofday.stp
tapset/linux/sysc_shutdown.stp
tapset/linux/sysc_socket.stp
tapset/linux/sysc_socketpair.stp
tapset/linux/sysc_stat.stp
tapset/linux/sysc_statfs.stp
tapset/linux/sysc_statfs64.stp
tapset/linux/sysc_timer_create.stp
tapset/linux/sysc_timer_settime.stp
tapset/linux/sysc_times.stp
tapset/linux/sysc_utime.stp
tapset/linux/sysc_utimensat.stp
tapset/linux/sysc_utimes.stp
tapset/linux/sysc_write.stp
testsuite/systemtap.syscall/aio.c
testsuite/systemtap.syscall/clock.c
testsuite/systemtap.syscall/copy_file_range.c
testsuite/systemtap.syscall/fadvise64.c
testsuite/systemtap.syscall/getgroups.c
testsuite/systemtap.syscall/ioperm.c
testsuite/systemtap.syscall/memfd_create.c
testsuite/systemtap.syscall/ptrace.c
testsuite/systemtap.syscall/readdir.c
testsuite/systemtap.syscall/sched_attr.c
testsuite/systemtap.syscall/seccomp.c
testsuite/systemtap.syscall/stat.c
testsuite/systemtap.syscall/tapset/syscall.stp
testsuite/systemtap.syscall/uselib.c
testsuite/systemtap.syscall/userfaultfd.c

index f9ddc0048643a5ad36d25d4b5859dedaa3543be9..32267648ed2031a45a755ece6d33dba81d04ebbb 100644 (file)
@@ -1,7 +1,7 @@
 # This is arch specific syscall table generated by scripts/dump-syscalls.sh
 
-global __syscall_64_num2name[331]
-global __syscall_64_name2num[331]
+global __syscall_64_num2name[332]
+global __syscall_64_name2num[332]
 
 probe init {
 __syscall_64_num2name[0]="io_setup"
@@ -554,6 +554,8 @@ __syscall_64_num2name[289]="pkey_alloc"
 __syscall_64_name2num["pkey_alloc"]=289
 __syscall_64_num2name[290]="pkey_free"
 __syscall_64_name2num["pkey_free"]=290
+__syscall_64_num2name[291]="statx"
+__syscall_64_name2num["statx"]=291
 __syscall_64_num2name[1024]="open"
 __syscall_64_name2num["open"]=1024
 __syscall_64_num2name[1025]="link"
index b470ab601d38664ad1b35c40488214eb06642e64..3404152f340de6d6b0190d4ca4a00eabe9b62b3b 100644 (file)
@@ -3618,7 +3618,7 @@ function irqflags_str:string(f:long)
 @__private30 function _stp_struct_iovec_u:string(iov_uaddr:long)
 %{ /* pure */
        char *iov_uaddr = (void *)(intptr_t)STAP_ARG_iov_uaddr;
-       struct iovec iov;
+       struct iovec iov = { 0 };
        if (iov_uaddr == NULL)
                strlcpy(STAP_RETVALUE, "NULL", MAXSTRINGLEN);
        else {
@@ -3638,7 +3638,7 @@ function irqflags_str:string(f:long)
 %{ /* pure */
 #ifdef CONFIG_COMPAT
        char *iov_uaddr = (void *)(intptr_t)STAP_ARG_iov_uaddr;
-       struct compat_iovec iov;
+       struct compat_iovec iov = { 0 };
        if (iov_uaddr == NULL)
                strlcpy(STAP_RETVALUE, "NULL", MAXSTRINGLEN);
        else {
index dc670e913a956b58f61bb3331b509c27b55d7dda..04efe4c6590711b90c7d103bf055e058a5d4e119 100644 (file)
@@ -2,8 +2,8 @@
 
 global __syscall_32_num2name[382]
 global __syscall_32_name2num[382]
-global __syscall_64_num2name[373]
-global __syscall_64_name2num[373]
+global __syscall_64_num2name[374]
+global __syscall_64_name2num[374]
 
 probe init {
 __syscall_32_num2name[0]="restart_syscall"
@@ -734,8 +734,8 @@ __syscall_32_num2name[363]="switch_endian"
 __syscall_32_name2num["switch_endian"]=363
 __syscall_32_num2name[364]="userfaultfd"
 __syscall_32_name2num["userfaultfd"]=364
-__syscall_32_num2name[365]="membarrier"
-__syscall_32_name2num["membarrier"]=365
+__syscall_32_num2name[365]="copy_file_range"
+__syscall_32_name2num["copy_file_range"]=365
 __syscall_32_num2name[366]="semop"
 __syscall_32_name2num["semop"]=366
 __syscall_32_num2name[367]="semget"
@@ -1516,4 +1516,6 @@ __syscall_64_num2name[381]="pwritev2"
 __syscall_64_name2num["pwritev2"]=381
 __syscall_64_num2name[382]="kexec_file_load"
 __syscall_64_name2num["kexec_file_load"]=382
+__syscall_64_num2name[383]="statx"
+__syscall_64_name2num["statx"]=383
 } /* probe init */
index 9df8cf5c6ade4c204b6e4c49bd4779b8a80dfe4e..a793fbebbb7b9ea29864aa1eaeccb93fd6aea37b 100644 (file)
@@ -56,8 +56,15 @@ function _stp_compat_ptrace_area_u:string(compat_ptrace_area_uaddr:long)
 // Get _stp_val_array and _stp_lookup_* definitions.
 #include "linux/syscalls-common.h"
 
+// PTRACE_SINGLEBLOCK was added in kernel 3.15. However, its value
+// overlaps with PTRACE_GETREGS (which userspace has defined. So,
+// we'll give PTRACE_SINGLEBLOCK a bogus value on earlier kernels.
 #ifndef PTRACE_SINGLEBLOCK
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
 #define PTRACE_SINGLEBLOCK           12
+#else
+#define PTRACE_SINGLEBLOCK           0xABCDEF12
+#endif
 #endif
 #ifndef PTRACE_GET_LAST_BREAK
 #define PTRACE_GET_LAST_BREAK        0x5006
@@ -135,6 +142,11 @@ function _arch_ptrace_argstr(request, pid, addr, data)
                return sprintf("%s, %d, %#x, %#x",
                               __arch_ptrace_request_str(request),
                               pid, addr, data)
+
+       if (request == @const("PTRACE_SINGLEBLOCK"))
+               return sprintf("%s, %d, %#x, %s",
+                              __arch_ptrace_request_str(request), pid,
+                              addr, _signal_name (data))
 }
 
 function _ptrace_return_arch_prctl_addr:long(request:long, addr:long, data:long)
index 135f310b585f5a4ac38600c3631e1418e0c5751b..a6c495a3005df8e4a1dc7d2b8ecd43552d34c1ff 100644 (file)
@@ -35,7 +35,8 @@ probe syscall.compat_fadvise64.return = dw_syscall.compat_fadvise64.return !,
 
 # dw_compat_fadvise64 _____________________________________________________
 
-probe dw_syscall.compat_fadvise64 = kernel.function("sys32_fadvise64").call ?
+probe dw_syscall.compat_fadvise64 = kernel.function("sys32_fadvise64").call ?,
+       kernel.function("compat_sys_s390_fadvise64").call ?
 {
        @_SYSCALL_COMPAT_FADVISE64_NAME
        fd = __int32($fd)
@@ -43,7 +44,7 @@ probe dw_syscall.compat_fadvise64 = kernel.function("sys32_fadvise64").call ?
                offset = $offset
        }
        else {
-               offset = (($high << 32) | $low)
+               offset = (($high << 32) | __uint32($low))
        }
        len = __int32($len)
        advice = __int32($advise)
@@ -51,7 +52,8 @@ probe dw_syscall.compat_fadvise64 = kernel.function("sys32_fadvise64").call ?
        @_SYSCALL_COMPAT_FADVISE64_ARGSTR
 }
 probe dw_syscall.compat_fadvise64.return =
-       kernel.function("sys32_fadvise64").return ?
+       kernel.function("sys32_fadvise64").return ?,
+       kernel.function("compat_sys_s390_fadvise64").return ?
 {
        @_SYSCALL_COMPAT_FADVISE64_NAME
        retstr = return_str(1, $return)
@@ -59,7 +61,8 @@ probe dw_syscall.compat_fadvise64.return =
 
 # nd_compat_fadvise64 _____________________________________________________
 
-probe nd_syscall.compat_fadvise64 = kprobe.function("sys32_fadvise64") ?
+probe nd_syscall.compat_fadvise64 = kprobe.function("sys32_fadvise64") ?,
+       kprobe.function("compat_sys_s390_fadvise64") ?
 {
        asmlinkage()
        @_SYSCALL_COMPAT_FADVISE64_NAME
@@ -79,7 +82,8 @@ probe nd_syscall.compat_fadvise64 = kprobe.function("sys32_fadvise64") ?
        @_SYSCALL_COMPAT_FADVISE64_ARGSTR
 }
 probe nd_syscall.compat_fadvise64.return =
-       kprobe.function("sys32_fadvise64").return ?
+       kprobe.function("sys32_fadvise64").return ?,
+       kprobe.function("compat_sys_s390_fadvise64").return ?
 {
        @_SYSCALL_COMPAT_FADVISE64_NAME
        retstr = returnstr(1)
@@ -103,18 +107,21 @@ probe syscall.compat_fadvise64_64.return = dw_syscall.compat_fadvise64_64.return
 
 # dw_compat_fadvise64_64 _____________________________________________________
 
-probe dw_syscall.compat_fadvise64_64 = kernel.function("sys32_fadvise64_64").call ?
+probe dw_syscall.compat_fadvise64_64 =
+       kernel.function("sys32_fadvise64_64").call ?,
+       kernel.function("compat_sys_s390_fadvise64_64").call ?
 {
        @_SYSCALL_COMPAT_FADVISE64_NAME
-       fd = user_int(&$args->fd)
-       offset = user_int64(&$args->offset)
-       len = user_int64(&$args->len)
-       advice = user_int(&$args->advice)
+       fd = user_int(&@cast(@__pointer($args), "fadvise64_64_args")->fd)
+       offset = user_int64(&@cast(@__pointer($args), "fadvise64_64_args")->offset)
+       len = user_int64(&@cast(@__pointer($args), "fadvise64_64_args")->len)
+       advice = user_int(&@cast(@__pointer($args), "fadvise64_64_args")->advice)
        advice_str = _fadvice_advice_str(advice)
        @_SYSCALL_COMPAT_FADVISE64_ARGSTR
 }
 probe dw_syscall.compat_fadvise64_64.return =
-       kernel.function("sys32_fadvise64_64").return ?
+       kernel.function("sys32_fadvise64_64").return ?,
+       kernel.function("compat_sys_s390_fadvise64_64").return ?
 {
        @_SYSCALL_COMPAT_FADVISE64_NAME
        retstr = return_str(1, $return)
@@ -122,7 +129,8 @@ probe dw_syscall.compat_fadvise64_64.return =
 
 # nd_compat_fadvise64_64 _____________________________________________________
 
-probe nd_syscall.compat_fadvise64_64 = kprobe.function("sys32_fadvise64_64") ?
+probe nd_syscall.compat_fadvise64_64 = kprobe.function("sys32_fadvise64_64") ?,
+       kprobe.function("compat_sys_s390_fadvise64_64") ?
 {
        @_SYSCALL_COMPAT_FADVISE64_NAME
        __args = &@cast(pointer_arg(1), "unsigned int", "kernel<linux/types.h>")
@@ -134,7 +142,8 @@ probe nd_syscall.compat_fadvise64_64 = kprobe.function("sys32_fadvise64_64") ?
        @_SYSCALL_COMPAT_FADVISE64_ARGSTR
 }
 probe nd_syscall.compat_fadvise64_64.return =
-       kprobe.function("sys32_fadvise64_64").return ?
+       kprobe.function("sys32_fadvise64_64").return ?,
+       kprobe.function("compat_sys_s390_fadvise64_64").return ?
 {
        @_SYSCALL_COMPAT_FADVISE64_NAME
        retstr = returnstr(1)
index 770137a74da8f76526db9531b0e5173341273ee2..8a69886e7ceb77a5c33f1151adf84ed4c9e3031c 100644 (file)
@@ -21,15 +21,18 @@ probe syscall.compat_ftruncate64.return = dw_syscall.compat_ftruncate64.return !
 
 # dw_compat_ftruncate64 _____________________________________________________
 
-probe dw_syscall.compat_ftruncate64 = kernel.function("sys32_ftruncate64").call ?
+probe dw_syscall.compat_ftruncate64 =
+       kernel.function("sys32_ftruncate64").call ?,
+       kernel.function("compat_sys_s390_ftruncate64").call ?
 {
         @_SYSCALL_COMPAT_FTRUNCATE64_NAME
         fd = __int32($fd)
-        length = (($high << 32) | $low)
+        length = (($high << 32) | __uint32($low))
         @_SYSCALL_COMPAT_FTRUNCATE64_ARGSTR
 }
 probe dw_syscall.compat_ftruncate64.return =
-       kernel.function("sys32_ftruncate64").return ?
+       kernel.function("sys32_ftruncate64").return ?,
+       kernel.function("compat_sys_s390_ftruncate64").return ?
 {
        @_SYSCALL_COMPAT_FTRUNCATE64_NAME
        retstr = return_str(1, $return)
@@ -37,7 +40,8 @@ probe dw_syscall.compat_ftruncate64.return =
 
 # nd_compat_ftruncate64 _____________________________________________________
 
-probe nd_syscall.compat_ftruncate64 = kprobe.function("sys32_ftruncate64") ?
+probe nd_syscall.compat_ftruncate64 = kprobe.function("sys32_ftruncate64") ?,
+       kprobe.function("compat_sys_s390_ftruncate64") ?
 {
        asmlinkage()
         @_SYSCALL_COMPAT_FTRUNCATE64_NAME
@@ -46,7 +50,8 @@ probe nd_syscall.compat_ftruncate64 = kprobe.function("sys32_ftruncate64") ?
         @_SYSCALL_COMPAT_FTRUNCATE64_ARGSTR
 }
 probe nd_syscall.compat_ftruncate64.return =
-       kprobe.function("sys32_ftruncate64").return ?
+       kprobe.function("sys32_ftruncate64").return ?,
+       kprobe.function("compat_sys_s390_ftruncate64").return ?
 {
        @_SYSCALL_COMPAT_FTRUNCATE64_NAME
        retstr = returnstr(1)
index ca37e980e62f8ffa0a1c62f3346730512bf74a85..1aa0ce151db019584bab6c3d47d83e8b2defef22 100644 (file)
@@ -2,6 +2,8 @@
 #
 # asmlinkage ssize_t
 # compat_ssize_t sys32_readahead(int fd, u32 offhi, u32 offlo, s32 count)
+# COMPAT_SYSCALL_DEFINE4(s390_readahead, int, fd, u32, high, u32, low,
+#                       s32, count)
 #
 
 @define _SYSCALL_COMPAT_READAHEAD_NAME
@@ -21,15 +23,19 @@ probe syscall.compat_readahead.return = dw_syscall.compat_readahead.return !,
 
 # dw_compat_readahead _____________________________________________________
 
-probe dw_syscall.compat_readahead = kernel.function("sys32_readahead") ?
+probe dw_syscall.compat_readahead = kernel.function("sys32_readahead").call ?,
+       kernel.function("compat_sys_s390_readahead").call ?
 {
        @_SYSCALL_COMPAT_READAHEAD_NAME
        fd = __int32($fd)
-       offset = (($offhi << 32) | $offlo)
+       offset = ((@choose_defined($offhi, $high) << 32)
+                 | __uint32(@choose_defined($offlo, $low)))
        count = __uint32($count)
        @_SYSCALL_COMPAT_READAHEAD_ARGSTR
 }
-probe dw_syscall.compat_readahead.return = kernel.function("sys32_readahead").return ?
+probe dw_syscall.compat_readahead.return =
+       kernel.function("sys32_readahead").return ?,
+       kernel.function("compat_sys_s390_readahead").return ?
 {
        @_SYSCALL_COMPAT_READAHEAD_NAME
        retstr = return_str(1, $return)
@@ -37,7 +43,8 @@ probe dw_syscall.compat_readahead.return = kernel.function("sys32_readahead").re
 
 # nd_compat_readahead _____________________________________________________
 
-probe nd_syscall.compat_readahead = kprobe.function("sys32_readahead") ?
+probe nd_syscall.compat_readahead = kprobe.function("sys32_readahead") ?,
+       kprobe.function("compat_sys_s390_readahead") ?
 {
        @_SYSCALL_COMPAT_READAHEAD_NAME
        asmlinkage()
@@ -46,7 +53,9 @@ probe nd_syscall.compat_readahead = kprobe.function("sys32_readahead") ?
        count = ulong_arg(4)
        @_SYSCALL_COMPAT_READAHEAD_ARGSTR
 }
-probe nd_syscall.compat_readahead.return = kprobe.function("sys32_readahead").return ?
+probe nd_syscall.compat_readahead.return =
+       kprobe.function("sys32_readahead").return ?,
+       kprobe.function("compat_sys_s390_readahead").return ?
 {
        @_SYSCALL_COMPAT_READAHEAD_NAME
        retstr = returnstr(1)
index eb159f49c1c3aabc208b831095efd88460679b95..47c839d08e71958ec9a4bb7088828694d864b953 100644 (file)
@@ -21,16 +21,18 @@ probe syscall.compat_truncate64.return = dw_syscall.compat_truncate64.return !,
 
 # dw_compat_truncate64 _____________________________________________________
 
-probe dw_syscall.compat_truncate64 = kernel.function("sys32_truncate64").call ?
+probe dw_syscall.compat_truncate64 = kernel.function("sys32_truncate64").call ?,
+       kernel.function("compat_sys_s390_truncate64").call ?
 {
         @_SYSCALL_COMPAT_TRUNCATE64_NAME
-       path_uaddr = $path
+       path_uaddr = @__pointer($path)
        path = user_string_quoted(path_uaddr)
-        length = (($high << 32) | $low)
+        length = (($high << 32) | __uint32($low))
        @_SYSCALL_COMPAT_TRUNCATE64_ARGSTR
 }
 probe dw_syscall.compat_truncate64.return =
-       kernel.function("sys32_truncate64").return ?
+       kernel.function("sys32_truncate64").return ?,
+       kernel.function("compat_sys_s390_truncate64").return ?
 {
        @_SYSCALL_COMPAT_TRUNCATE64_NAME
        retstr = return_str(1, $return)
@@ -38,7 +40,8 @@ probe dw_syscall.compat_truncate64.return =
 
 # nd_compat_truncate64 _____________________________________________________
 
-probe nd_syscall.compat_truncate64 = kprobe.function("sys32_truncate64") ?
+probe nd_syscall.compat_truncate64 = kprobe.function("sys32_truncate64") ?,
+       kprobe.function("compat_sys_s390_truncate64") ?
 {
        asmlinkage()
         @_SYSCALL_COMPAT_TRUNCATE64_NAME
@@ -48,7 +51,8 @@ probe nd_syscall.compat_truncate64 = kprobe.function("sys32_truncate64") ?
        @_SYSCALL_COMPAT_TRUNCATE64_ARGSTR
 }
 probe nd_syscall.compat_truncate64.return =
-       kprobe.function("sys32_truncate64").return ?
+       kprobe.function("sys32_truncate64").return ?,
+       kprobe.function("compat_sys_s390_truncate64").return ?
 {
        @_SYSCALL_COMPAT_TRUNCATE64_NAME
        retstr = returnstr(1)
index ce73c3333514f9bf7699a213b09c21b7ef047204..da3615d48d0dea01208791449caff9f572c45cf8 100644 (file)
@@ -21,7 +21,8 @@ probe syscall.getresgid16.return = dw_syscall.getresgid16.return !,
 
 # dw_getresgid16 _____________________________________________________
 
-probe dw_syscall.getresgid16 = kernel.function("sys32_getresgid16") ?
+probe dw_syscall.getresgid16 = kernel.function("sys32_getresgid16").call ?,
+       kernel.function("compat_sys_s390_getresgid16").call ?
 {
        @_SYSCALL_GETRESGID16_NAME
        rgid_uaddr = @choose_defined($rgidp, $rgid)
@@ -29,7 +30,9 @@ probe dw_syscall.getresgid16 = kernel.function("sys32_getresgid16") ?
        sgid_uaddr = @choose_defined($sgidp, $sgid)
        @_SYSCALL_GETRESGID16_ARGSTR
 }
-probe dw_syscall.getresgid16.return = kernel.function("sys32_getresgid16").return ?
+probe dw_syscall.getresgid16.return =
+       kernel.function("sys32_getresgid16").return ?,
+       kernel.function("compat_sys_s390_getresgid16").return ?
 {
        @_SYSCALL_GETRESGID16_NAME
        retstr = return_str(1, $return)
@@ -37,7 +40,8 @@ probe dw_syscall.getresgid16.return = kernel.function("sys32_getresgid16").retur
 
 # nd_getresgid16 _____________________________________________________
 
-probe nd_syscall.getresgid16 = kprobe.function("sys32_getresgid16") ?
+probe nd_syscall.getresgid16 = kprobe.function("sys32_getresgid16") ?,
+       kprobe.function("compat_sys_s390_getresgid16") ?
 {
        @_SYSCALL_GETRESGID16_NAME
        asmlinkage()
@@ -46,7 +50,9 @@ probe nd_syscall.getresgid16 = kprobe.function("sys32_getresgid16") ?
        sgid_uaddr = pointer_arg(3)
        @_SYSCALL_GETRESGID16_ARGSTR
 }
-probe nd_syscall.getresgid16.return = kprobe.function("sys32_getresgid16").return ?
+probe nd_syscall.getresgid16.return =
+       kprobe.function("sys32_getresgid16").return ?,
+       kprobe.function("compat_sys_s390_getresgid16").return ?
 {
        @_SYSCALL_GETRESGID16_NAME
        retstr = returnstr(1)
index 267492aef3dedb7246095b5e6f423ae297a5ea80..706919e79a13503ef3b4a289238718d2d775d867 100644 (file)
@@ -18,7 +18,8 @@ probe syscall.getresuid16.return = dw_syscall.getresuid16.return !,
 
 # dw_getresuid16 _____________________________________________________
 
-probe dw_syscall.getresuid16 = kernel.function("sys32_getresuid16") ?
+probe dw_syscall.getresuid16 = kernel.function("sys32_getresuid16").call ?,
+       kernel.function("compat_sys_s390_getresuid16").call ?
 {
        @_SYSCALL_GETRESUID16_NAME
        ruid_uaddr = @choose_defined($ruidp, $ruid)
@@ -26,7 +27,9 @@ probe dw_syscall.getresuid16 = kernel.function("sys32_getresuid16") ?
        suid_uaddr = @choose_defined($suidp, $suid)
        @_SYSCALL_GETRESUID16_ARGSTR
 }
-probe dw_syscall.getresuid16.return = kernel.function("sys32_getresuid16").return ?
+probe dw_syscall.getresuid16.return =
+       kernel.function("sys32_getresuid16").return ?,
+       kernel.function("compat_sys_s390_getresuid16").return ?
 {
        @_SYSCALL_GETRESUID16_NAME
        retstr = return_str(1, $return)
@@ -34,7 +37,8 @@ probe dw_syscall.getresuid16.return = kernel.function("sys32_getresuid16").retur
 
 # nd_getresuid16 _____________________________________________________
 
-probe nd_syscall.getresuid16 = kprobe.function("sys32_getresuid16") ?
+probe nd_syscall.getresuid16 = kprobe.function("sys32_getresuid16") ?,
+       kprobe.function("compat_sys_s390_getresuid16") ?
 {
        @_SYSCALL_GETRESUID16_NAME
        asmlinkage()
@@ -43,7 +47,9 @@ probe nd_syscall.getresuid16 = kprobe.function("sys32_getresuid16") ?
        suid_uaddr = pointer_arg(3)
        @_SYSCALL_GETRESUID16_ARGSTR
 }
-probe nd_syscall.getresuid16.return = kprobe.function("sys32_getresuid16").return ?
+probe nd_syscall.getresuid16.return =
+       kprobe.function("sys32_getresuid16").return ?,
+       kprobe.function("compat_sys_s390_getresuid16").return ?
 {
        @_SYSCALL_GETRESUID16_NAME
        retstr = returnstr(1)
index 63070d75dead22c4a3eb3f17737ab40aa488707d..237200471de218928a3bf3e8f37bd0ebfeba7c5b 100644 (file)
@@ -1,9 +1,9 @@
 # This is arch specific syscall table generated by scripts/dump-syscalls.sh
 
-global __syscall_32_num2name[357]
-global __syscall_32_name2num[357]
-global __syscall_64_num2name[324]
-global __syscall_64_name2num[324]
+global __syscall_32_num2name[358]
+global __syscall_32_name2num[358]
+global __syscall_64_num2name[325]
+global __syscall_64_name2num[325]
 
 probe init {
 __syscall_32_num2name[0]="setup"
@@ -720,6 +720,8 @@ __syscall_32_num2name[376]="preadv2"
 __syscall_32_name2num["preadv2"]=376
 __syscall_32_num2name[377]="pwritev2"
 __syscall_32_name2num["pwritev2"]=377
+__syscall_32_num2name[379]="statx"
+__syscall_32_name2num["statx"]=379
 __syscall_64_num2name[0]="setup"
 __syscall_64_name2num["setup"]=0
 __syscall_64_num2name[1]="exit"
@@ -1368,4 +1370,6 @@ __syscall_64_num2name[376]="preadv2"
 __syscall_64_name2num["preadv2"]=376
 __syscall_64_num2name[377]="pwritev2"
 __syscall_64_name2num["pwritev2"]=377
+__syscall_64_num2name[379]="statx"
+__syscall_64_name2num["statx"]=379
 } /* probe init */
index da195a0db2c62433f4be62062c3333512f587a53..e114095cd1bd9516085cde53277d53cfd47d757c 100644 (file)
@@ -42,7 +42,7 @@ probe __syscall.accept = kernel.function("sys_accept").call
 }
 probe __syscall.socketcall.accept = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_ACCEPT")) next;
+       if (__int32($call) != @const("SYS_ACCEPT")) next;
        sockfd = __int32(user_ulong(&@cast($args, "ulong")[0]))
        addr_uaddr = user_ulong(&@cast($args, "ulong")[1])
        addrlen_uaddr = user_ulong(&@cast($args, "ulong")[2])
@@ -50,7 +50,7 @@ probe __syscall.socketcall.accept = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.accept =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_ACCEPT")) next;
+       if (__int32($call) != @const("SYS_ACCEPT")) next;
        sockfd = user_int(&@cast($args, "unsigned int")[0])
        addr_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
        addrlen_uaddr = user_uint32(&@cast($args, "unsigned int")[2])
@@ -69,7 +69,7 @@ probe __syscall.socketcall.accept.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_ACCEPT")) next;
+       if (__int32(@entry($call)) != @const("SYS_ACCEPT")) next;
 }
 
 # nd_accept _____________________________________________________
index b68671e30ed2df457f70ca1d18c09fafa3b15d08..58b31618bf70445f22eb34b9086576a73a3962b3 100644 (file)
@@ -39,7 +39,7 @@ probe __syscall.accept4 = kernel.function("sys_accept4").call
 }
 probe __syscall.socketcall.accept4 = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_ACCEPT4")) next;
+       if (__int32($call) != @const("SYS_ACCEPT4")) next;
        sockfd = __int32(user_ulong(&@cast($args, "ulong")[0]))
        addr_uaddr = user_ulong(&@cast($args, "ulong")[1])
        addrlen_uaddr = user_ulong(&@cast($args, "ulong")[2])
@@ -48,7 +48,7 @@ probe __syscall.socketcall.accept4 = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.accept4 =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_ACCEPT4")) next;
+       if (__int32($call) != @const("SYS_ACCEPT4")) next;
        sockfd = user_int(&@cast($args, "unsigned int")[0])
        addr_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
        addrlen_uaddr = user_uint32(&@cast($args, "unsigned int")[2])
@@ -68,7 +68,7 @@ probe __syscall.socketcall.accept4.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_ACCEPT4")) next;
+       if (__int32(@entry($call)) != @const("SYS_ACCEPT4")) next;
 }
 
 # nd_accept4 _____________________________________________________
index d9d9a294fb2f6330d6629cc912f85e4f604edc5a..3592af7281232225f8963aa72168565f06e9e0c9 100644 (file)
@@ -33,7 +33,7 @@ probe __syscall.bind = kernel.function("sys_bind").call ?
 }
 probe __syscall.socketcall.bind = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_BIND")) next;
+       if (__int32($call) != @const("SYS_BIND")) next;
        sockfd = __int32(user_ulong(&@cast($args, "ulong")[0]))
        my_addr_uaddr = user_ulong(&@cast($args, "ulong")[1])
        addrlen = __int32(user_ulong(&@cast($args, "ulong")[2]))
@@ -41,7 +41,7 @@ probe __syscall.socketcall.bind = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.bind =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_BIND")) next;
+       if (__int32($call) != @const("SYS_BIND")) next;
        sockfd = user_int(&@cast($args, "unsigned int")[0])
        my_addr_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
        addrlen = user_int(&@cast($args, "unsigned int")[2])
@@ -60,7 +60,7 @@ probe __syscall.socketcall.bind.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_BIND")) next;
+       if (__int32(@entry($call)) != @const("SYS_BIND")) next;
 }
 
 # nd_bind _____________________________________________________
index 76d691799ecd55b3ecc10d11a20614f23f437293..1b1ff0b62649186bf89e1462937b6f5daf7c9caa 100644 (file)
@@ -98,7 +98,7 @@ probe dw_syscall.compat_clock_nanosleep =
        flag_str = _stp_clock_nanosleep_flags_str(__int32($flags))
 %)
        flags_str = _stp_clock_nanosleep_flags_str(__int32($flags))
-       req_uaddr = $rqtp
+       req_uaddr = @__pointer($rqtp)
        req_str = _struct_compat_timespec_u(req_uaddr, 1)
        rem_uaddr = $rmtp
        @_SYSCALL_CLOCK_NANOSLEEP_ARGSTR
index 698bd873456a4c6c2348ff4a8a93b64546da1684..7df11373a98af6095d138e188899e8708fa662d8 100644 (file)
@@ -33,7 +33,7 @@ probe __syscall.connect = kernel.function("sys_connect").call ?
 }
 probe __syscall.socketcall.connect = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_CONNECT")) next;
+       if (__int32($call) != @const("SYS_CONNECT")) next;
        sockfd = __int32(user_ulong(&@cast($args, "ulong")[0]))
        serv_addr_uaddr = user_ulong(&@cast($args, "ulong")[1])
        addrlen = __uint32(user_ulong(&@cast($args, "ulong")[2]))
@@ -41,7 +41,7 @@ probe __syscall.socketcall.connect = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.connect =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_CONNECT")) next;
+       if (__int32($call) != @const("SYS_CONNECT")) next;
        sockfd = user_int(&@cast($args, "unsigned int")[0])
        serv_addr_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
        addrlen = user_uint32(&@cast($args, "unsigned int")[2])
@@ -60,7 +60,7 @@ probe __syscall.socketcall.connect.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_CONNECT")) next;
+       if (__int32(@entry($call)) != @const("SYS_CONNECT")) next;
 }
 
 # nd_connect _____________________________________________________
index 0d5c707ad87dcf0c42613df6c27d70bf2bf7dfaf..6100506283ed4bb3530e63a1c83bfa339792127e 100644 (file)
@@ -10,7 +10,7 @@
 
 @define _SYSCALL_COPY_FILE_RANGE_ARGSTR
 %(
-       argstr = sprintf("%d, %p, %d, %p, %d, 0x%x", fd_in, off_in, fd_out,
+       argstr = sprintf("%d, %p, %d, %p, %u, 0x%x", fd_in, off_in, fd_out,
                         off_out, len, flags)
 %)
 
@@ -23,9 +23,9 @@ probe dw_syscall.copy_file_range = kernel.function("sys_copy_file_range").call ?
 {
        @_SYSCALL_COPY_FILE_RANGE_NAME
        fd_in = __int32($fd_in)
-       off_in = $off_in
+       off_in = @__pointer($off_in)
        fd_out = __int32($fd_out)
-       off_out = $off_out
+       off_out = @__pointer($off_out)
        len = __ulong($len)
        flags = __uint32($flags)
        @_SYSCALL_COPY_FILE_RANGE_ARGSTR
index 06ffe32ad864249636fc348b2355f2e263e3d30e..3a305b51f9e74ade48ab53c05f6576646bd67cc1 100644 (file)
@@ -58,11 +58,11 @@ probe dw_syscall.execve.return = kernel.function("sys_execve").return
 probe dw_syscall.compat_execve = kernel.function("compat_sys_execve").call ?
 {
        @_SYSCALL_EXECVE_NAME
-       filename = user_string_quoted($filename)
+       filename = user_string_quoted(@__pointer($filename))
        # kernel 3.0 changed the pointer's name to __argv
-       __argv = @choose_defined($__argv, $argv)
+       __argv = @__pointer(@choose_defined($__argv, $argv))
        args = __get_compat_argv(__argv, 0)
-       __envp = @choose_defined($__envp, $envp)
+       __envp = @__pointer(@choose_defined($__envp, $envp))
        env_str = __count_compat_envp(__envp)
        @_SYSCALL_EXECVE_ARGSTR
 }
index fc04c451a9f454679421d0f719f74a6f1c297aed..952701434c124a6b405b8fb4a56503fe942bcab8 100644 (file)
@@ -68,11 +68,11 @@ probe dw_syscall.compat_execveat = kernel.function("compat_sys_execveat").call ?
         fd_str = dirfd_str
 %)
         filename = user_string_quoted(@__pointer($filename))
-        flags = int_arg($flags)
-        flags_str = _at_flag_str(__int32($flags))
-        __argv = @choose_defined($__argv, $argv)
+        flags = __int32($flags)
+       flags_str = _at_flag_str(__int32($flags))
+        __argv = @__pointer(@choose_defined($__argv, $argv))
         args = __get_compat_argv(__argv, 0)
-       __envp = @choose_defined($__envp, $envp)
+       __envp = @__pointer(@choose_defined($__envp, $envp))
        env_str = __count_compat_envp(__envp)
         @_SYSCALL_EXECVEAT_ARGSTR
 }
index 3672eea3d37983c702971843ad73e8e4c0142d31..5d489fd4d21eaa267cb772ef8247b92be962c73e 100644 (file)
@@ -28,7 +28,7 @@ probe dw_syscall.fcntl = __dw_syscall.fcntl,
        fd = __int32($fd)
        cmd = __int32($cmd)
        cmd_str = _fcntl_cmd_str(cmd)
-       arg = $arg
+       arg = @__pointer($arg)
        @_SYSCALL_FCNTL_ARGSTR
 }
 probe __dw_syscall.fcntl = kernel.function("sys_fcntl64").call ?,
index 6b5694b39085e07805f5c9100dade36ba9a4ff62..f9a2ba760110a7eff6491dc2089909a082963d04 100644 (file)
@@ -28,6 +28,10 @@ probe dw_syscall.fstat = kernel.function("sys_fstat").call ?,
                       kernel.function("sys32_fstat64").call ?,
                       kernel.function("sys_newfstat").call ?,
                       kernel.function("sys_oabi_fstat64").call ?,
+                      kernel.function("sys_oabi_fstat64").call ?,
+%( arch == "s390" %?
+                      kernel.function("compat_sys_s390_fstat64").call ?,
+%)
                       kernel.function("compat_sys_newfstat").call ?
 {
        @_SYSCALL_FSTAT_NAME
@@ -36,11 +40,14 @@ probe dw_syscall.fstat = kernel.function("sys_fstat").call ?,
        @_SYSCALL_FSTAT_ARGSTR
 }
 probe dw_syscall.fstat.return = kernel.function("sys_fstat").return ?,
-                             kernel.function("sys_fstat64").return ?,
-                             kernel.function("sys32_fstat64").return ?,
-                             kernel.function("sys_newfstat").return ?,
-                             kernel.function("sys_oabi_fstat64").return ?,
-                             kernel.function("compat_sys_newfstat").return ?
+       kernel.function("sys_fstat64").return ?,
+       kernel.function("sys32_fstat64").return ?,
+       kernel.function("sys_newfstat").return ?,
+       kernel.function("sys_oabi_fstat64").return ?,
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_fstat64").return ?,
+%)
+       kernel.function("compat_sys_newfstat").return ?
 {
        @_SYSCALL_FSTAT_NAME
        retstr = return_str(1, $return)
@@ -53,6 +60,9 @@ probe nd_syscall.fstat = kprobe.function("sys_fstat") ?,
                          kprobe.function("sys32_fstat64") ?,
                          kprobe.function("sys_newfstat") ?,
                          kprobe.function("sys_oabi_fstat64") ?,
+%( arch == "s390" %?
+                         kprobe.function("compat_sys_s390_fstat64") ?,
+%)
                          kprobe.function("compat_sys_newfstat") ?
 {
        @_SYSCALL_FSTAT_NAME
@@ -62,11 +72,14 @@ probe nd_syscall.fstat = kprobe.function("sys_fstat") ?,
        @_SYSCALL_FSTAT_ARGSTR
 }
 probe nd_syscall.fstat.return = kprobe.function("sys_fstat").return ?,
-                                kprobe.function("sys_fstat64").return ?,
-                                kprobe.function("sys32_fstat64").return ?,
-                                kprobe.function("sys_newfstat").return ?,
-                                kprobe.function("sys_oabi_fstat64").return ?,
-                                kprobe.function("compat_sys_newfstat").return ?
+       kprobe.function("sys_fstat64").return ?,
+       kprobe.function("sys32_fstat64").return ?,
+       kprobe.function("sys_newfstat").return ?,
+       kprobe.function("sys_oabi_fstat64").return ?,
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_fstat64").return ?,
+%)
+       kprobe.function("compat_sys_newfstat").return ?
 {
        @_SYSCALL_FSTAT_NAME
        retstr = returnstr(1)
index 3a8ac621777d29ba68de2972a60e0e052a41e2cd..a9ce88121aaa30c31573c585929310107cac50fa 100644 (file)
@@ -23,6 +23,9 @@ probe dw_syscall.fstatat = kernel.function("sys_fstatat64").call ?,
                         kernel.function("sys_newfstatat").call ?,
                         kernel.function("compat_sys_newfstatat").call ?,
                         kernel.function("sys32_fstatat64").call ?,
+%( arch == "s390" %?
+                        kernel.function("compat_sys_s390_fstatat64").call ?,
+%)
                         kernel.function("sys32_fstatat").call ?
 {
        @_SYSCALL_FSTATAT_NAME
@@ -35,10 +38,13 @@ probe dw_syscall.fstatat = kernel.function("sys_fstatat64").call ?,
        @_SYSCALL_FSTATAT_ARGSTR
 }
 probe dw_syscall.fstatat.return = kernel.function("sys_fstatat64").return ?,
-                               kernel.function("sys_newfstatat").return ?,
-                               kernel.function("compat_sys_newfstatat").return ?,
-                               kernel.function("sys32_fstatat64").return ?,
-                              kernel.function("sys32_fstatat").return ?
+       kernel.function("sys_newfstatat").return ?,
+       kernel.function("compat_sys_newfstatat").return ?,
+       kernel.function("sys32_fstatat64").return ?,
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_fstatat64").return ?,
+%)
+       kernel.function("sys32_fstatat").return ?
 {
        @_SYSCALL_FSTATAT_NAME
        retstr = return_str(1, $return)
@@ -50,6 +56,9 @@ probe nd_syscall.fstatat = kprobe.function("sys_fstatat64") ?,
                            kprobe.function("sys_newfstatat") ?,
                            kprobe.function("compat_sys_newfstatat") ?,
                            kprobe.function("sys32_fstatat64") ?,
+%( arch == "s390" %?
+                           kprobe.function("compat_sys_s390_fstatat64") ?,
+%)
                           kprobe.function("sys32_fstatat") ?
 {
        @_SYSCALL_FSTATAT_NAME
@@ -63,10 +72,13 @@ probe nd_syscall.fstatat = kprobe.function("sys_fstatat64") ?,
        @_SYSCALL_FSTATAT_ARGSTR
 }
 probe nd_syscall.fstatat.return = kprobe.function("sys_fstatat64").return ?,
-                                  kprobe.function("sys_newfstatat").return ?,
-                                  kprobe.function("compat_sys_newfstatat").return ?,
-                                  kprobe.function("sys32_fstatat64").return ?,
-                                 kprobe.function("sys32_fstatat").return ?
+       kprobe.function("sys_newfstatat").return ?,
+       kprobe.function("compat_sys_newfstatat").return ?,
+       kprobe.function("sys32_fstatat64").return ?,
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_fstatat64").return ?,
+%)
+       kprobe.function("sys32_fstatat").return ?
 {
        @_SYSCALL_FSTATAT_NAME
        retstr = returnstr(1)
index 005176d662a8bb61c9c1456257675a2efdec770a..a3fdcabc5ee5f7e09259b47c1652e7aa05e618da 100644 (file)
@@ -24,7 +24,7 @@ probe dw_syscall.fstatfs64 = kernel.function("sys_fstatfs64").call ?,
        @_SYSCALL_FSTATFS64_NAME
        fd = __int32($fd)
        sz = __ulong($sz)
-       buf_uaddr = $buf
+       buf_uaddr = @__pointer($buf)
        @_SYSCALL_FSTATFS64_ARGSTR
 }
 probe dw_syscall.fstatfs64.return = kernel.function("sys_fstatfs64").return ?,
index c6ae0c6944654ae984e464b67ffdc58714274d2c..738bea8754d99a279ef69f70aeadef45f8c5c5a2 100644 (file)
@@ -48,7 +48,7 @@ probe dw_syscall.compat_futex = kernel.function("compat_sys_futex").call ?
        futex_uaddr = @__pointer($uaddr)
        op = __int32($op)
        val = __int32($val)
-       utime_uaddr = $utime
+       utime_uaddr = @__pointer($utime)
        uaddr2_uaddr = $uaddr2
        val3 = __int32($val3)
        @__futex_argstr(futex_uaddr, op, val, utime_uaddr, uaddr2_uaddr, val3)
index 64a606ba677a7a6bffc4a2c0025791798508c6ce..89532621e1a49c4a9b7b7a24de41dc2502641e54 100644 (file)
@@ -45,9 +45,9 @@ probe dw_syscall.compat_futimesat = kernel.function("compat_sys_futimesat").call
        @_SYSCALL_FUTIMESAT_NAME
        dirfd = __int32($dfd)
        dirfd_str = _dfd_str(__int32($dfd))
-       filename_uaddr = $filename
+       filename_uaddr = @__pointer($filename)
        filename = user_string_quoted($filename)
-       tvp_uaddr = $t
+       tvp_uaddr = @__pointer($t)
        tvp_str = _struct_compat_timeval_u(tvp_uaddr, 2)
        @_SYSCALL_FUTIMESAT_ARGSTR
 }
index ee161cefc1e3a9a552e7df7a02e70ca35532ebc8..9ef2950e5fa37f7783c188cdb1e6c57109f034ba 100644 (file)
@@ -22,14 +22,20 @@ probe syscall.getegid.return = dw_syscall.getegid.return !,
 
 probe dw_syscall.getegid = kernel.function("sys_getegid16").call ?,
                         kernel.function("sys32_getegid16").call ?,
+%( arch == "s390" %?
+                        kernel.function("compat_sys_s390_getegid16").call ?,
+%)
                         kernel.function("sys_getegid").call
 {
        @_SYSCALL_GETEGID_NAME
        @_SYSCALL_GETEGID_ARGSTR
 }
 probe dw_syscall.getegid.return = kernel.function("sys_getegid16").return ?,
-                               kernel.function("sys32_getegid16").return ?,
-                               kernel.function("sys_getegid").return
+       kernel.function("sys32_getegid16").return ?,
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_getegid16").return ?,
+%)
+       kernel.function("sys_getegid").return
 {
        @_SYSCALL_GETEGID_NAME
        retstr = return_str(1, $return)
@@ -39,14 +45,20 @@ probe dw_syscall.getegid.return = kernel.function("sys_getegid16").return ?,
 
 probe nd_syscall.getegid = kprobe.function("sys_getegid16") ?,
                            kprobe.function("sys32_getegid16") ?,
+%( arch == "s390" %?
+                           kprobe.function("compat_sys_s390_getegid16") ?,
+%)
                            kprobe.function("sys_getegid")
 {
        @_SYSCALL_GETEGID_NAME
        @_SYSCALL_GETEGID_ARGSTR
 }
 probe nd_syscall.getegid.return = kprobe.function("sys_getegid16").return ?,
-                                  kprobe.function("sys32_getegid16").return ?,
-                                  kprobe.function("sys_getegid").return
+       kprobe.function("sys32_getegid16").return ?,
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_getegid16").return ?,
+%)
+       kprobe.function("sys_getegid").return
 {
        @_SYSCALL_GETEGID_NAME
        retstr = returnstr(1)
index cc9d80abd18080d7c39b09a9953d66781ed9c9aa..3f7073d87aade13bf5ce95163e8372f852c85440 100644 (file)
@@ -20,14 +20,20 @@ probe syscall.geteuid.return = dw_syscall.geteuid.return !, nd_syscall.geteuid.r
 
 probe dw_syscall.geteuid = kernel.function("sys_geteuid16").call ?,
                         kernel.function("sys32_geteuid16").call ?,
+%( arch == "s390" %?
+                        kernel.function("compat_sys_s390_geteuid16").call ?,
+%)
                         kernel.function("sys_geteuid").call
 {
        @_SYSCALL_GETEUID_NAME
        @_SYSCALL_GETEUID_ARGSTR
 }
 probe dw_syscall.geteuid.return = kernel.function("sys_geteuid16").return ?,
-                               kernel.function("sys32_geteuid16").return ?,
-                               kernel.function("sys_geteuid").return
+       kernel.function("sys32_geteuid16").return ?,
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_geteuid16").return ?,
+%)
+       kernel.function("sys_geteuid").return
 {
        @_SYSCALL_GETEUID_NAME
        retstr = return_str(1, $return)
@@ -37,14 +43,20 @@ probe dw_syscall.geteuid.return = kernel.function("sys_geteuid16").return ?,
 
 probe nd_syscall.geteuid = kprobe.function("sys_geteuid16") ?,
                            kprobe.function("sys32_geteuid16") ?,
+%( arch == "s390" %?
+                           kprobe.function("compat_sys_s390_geteuid16") ?,
+%)
                            kprobe.function("sys_geteuid")
 {
        @_SYSCALL_GETEUID_NAME
        @_SYSCALL_GETEUID_ARGSTR
 }
 probe nd_syscall.geteuid.return = kprobe.function("sys_geteuid16").return ?,
-                                  kprobe.function("sys32_geteuid16").return ?,
-                                  kprobe.function("sys_geteuid").return
+       kprobe.function("sys32_geteuid16").return ?,
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_geteuid16").return ?,
+%)
+       kprobe.function("sys_geteuid").return
 {
        @_SYSCALL_GETEUID_NAME
        retstr = returnstr(1)
index c6b10e7c82f8d738aaecd6e618b40a20c72cefa7..3711dab7425b32f4446b0803bef8c803ca3c631b 100644 (file)
@@ -20,14 +20,20 @@ probe syscall.getgid.return = dw_syscall.getgid.return !, nd_syscall.getgid.retu
 
 probe dw_syscall.getgid = kernel.function("sys_getgid16").call ?,
                        kernel.function("sys32_getgid16").call ?,
+%( arch == "s390" %?
+                       kernel.function("compat_sys_s390_getgid16").call ?,
+%)
                        kernel.function("sys_getgid").call
 {
        @_SYSCALL_GETGID_NAME
        @_SYSCALL_GETGID_ARGSTR
 }
 probe dw_syscall.getgid.return = kernel.function("sys_getgid16").return ?,
-                              kernel.function("sys32_getgid16").return ?,
-                              kernel.function("sys_getgid").return
+       kernel.function("sys32_getgid16").return ?,
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_getgid16").return ?,
+%)
+       kernel.function("sys_getgid").return
 {
        @_SYSCALL_GETGID_NAME
        retstr = return_str(1, $return)
@@ -37,14 +43,20 @@ probe dw_syscall.getgid.return = kernel.function("sys_getgid16").return ?,
 
 probe nd_syscall.getgid = kprobe.function("sys_getgid16") ?,
                           kprobe.function("sys32_getgid16") ?,
+%( arch == "s390" %?
+                          kprobe.function("compat_sys_s390_getgid16") ?,
+%)
                           kprobe.function("sys_getgid")
 {
        @_SYSCALL_GETGID_NAME
        @_SYSCALL_GETGID_ARGSTR
 }
 probe nd_syscall.getgid.return = kprobe.function("sys_getgid16").return ?,
-                                 kprobe.function("sys32_getgid16").return ?,
-                                 kprobe.function("sys_getgid").return
+       kprobe.function("sys32_getgid16").return ?,
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_getgid16").return ?,
+%)
+       kprobe.function("sys_getgid").return
 {
        @_SYSCALL_GETGID_NAME
        retstr = returnstr(1)
index f74ff23cc25a8f95555177f967a3376cd409e388..07a30a182e1ae9445be112117e1e53e4b1b4b6d3 100644 (file)
@@ -20,17 +20,24 @@ probe syscall.getgroups.return = dw_syscall.getgroups.return !, nd_syscall.getgr
 # dw_getgroups _____________________________________________________
 
 probe dw_syscall.getgroups = kernel.function("sys_getgroups16").call ?,
-                          kernel.function("sys32_getgroups16").call ?,
-                          kernel.function("sys_getgroups").call ?
+       kernel.function("sys32_getgroups16").call ?,
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_getgroups16").call ?,
+%)
+       kernel.function("sys_getgroups").call ?
 {
        @_SYSCALL_GETGROUPS_NAME
        size = __int32($gidsetsize)
        list_uaddr = $grouplist
        @_SYSCALL_GETGROUPS_ARGSTR
 }
-probe dw_syscall.getgroups.return = kernel.function("sys_getgroups16").return ?,
-                                 kernel.function("sys32_getgroups16").return ?,
-                                 kernel.function("sys_getgroups").return ?
+probe dw_syscall.getgroups.return =
+       kernel.function("sys_getgroups16").return ?,
+       kernel.function("sys32_getgroups16").return ?,
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_getgroups16").return ?,
+%)
+       kernel.function("sys_getgroups").return ?
 {
        @_SYSCALL_GETGROUPS_NAME
        retstr = return_str(1, $return)
@@ -39,8 +46,11 @@ probe dw_syscall.getgroups.return = kernel.function("sys_getgroups16").return ?,
 # nd_getgroups _____________________________________________________
 
 probe nd_syscall.getgroups = kprobe.function("sys_getgroups16") ?,
-                             kprobe.function("sys32_getgroups16") ?,
-                             kprobe.function("sys_getgroups") ?
+       kprobe.function("sys32_getgroups16") ?,
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_getgroups16") ?,
+%)
+       kprobe.function("sys_getgroups") ?
 {
        @_SYSCALL_GETGROUPS_NAME
        asmlinkage()
@@ -48,9 +58,13 @@ probe nd_syscall.getgroups = kprobe.function("sys_getgroups16") ?,
        list_uaddr = pointer_arg(2)
        @_SYSCALL_GETGROUPS_ARGSTR
 }
-probe nd_syscall.getgroups.return = kprobe.function("sys_getgroups16").return ?,
-                                    kprobe.function("sys32_getgroups16").return ?,
-                                    kprobe.function("sys_getgroups").return ?
+probe nd_syscall.getgroups.return =
+       kprobe.function("sys_getgroups16").return ?,
+       kprobe.function("sys32_getgroups16").return ?,
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_getgroups16").return ?,
+%)
+       kprobe.function("sys_getgroups").return ?
 {
        @_SYSCALL_GETGROUPS_NAME
        retstr = returnstr(1)
index ff745316d954466f07a46faad27612283f6628c0..e292edbb890e3d42c0b4a04eb4076efaf1a72987 100644 (file)
@@ -34,7 +34,7 @@ probe __syscall.getpeername = kernel.function("sys_getpeername").call ?
 }
 probe __syscall.socketcall.getpeername = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_GETPEERNAME")) next;
+       if (__int32($call) != @const("SYS_GETPEERNAME")) next;
        s = __int32(user_ulong(&@cast($args, "ulong")[0]))
        name_uaddr = user_ulong(&@cast($args, "ulong")[1])
        namelen_uaddr = user_ulong(&@cast($args, "ulong")[2])
@@ -42,7 +42,7 @@ probe __syscall.socketcall.getpeername = kernel.function("sys_socketcall").call
 probe __syscall.compat_socketcall.getpeername =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_GETPEERNAME")) next;
+       if (__int32($call) != @const("SYS_GETPEERNAME")) next;
        s = user_int(&@cast($args, "unsigned int")[0])
        name_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
        namelen_uaddr = user_uint32(&@cast($args, "unsigned int")[2])
@@ -61,7 +61,7 @@ probe __syscall.socketcall.getpeername.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_GETPEERNAME")) next;
+       if (__int32(@entry($call)) != @const("SYS_GETPEERNAME")) next;
 }
 
 # nd_getpeername _____________________________________________________
index 08d4b7bbf0910dec318091adbd96a4ee8ec6bf9f..ca406fb868e1f1ae653b93ca3eb1cfbaca432a79 100644 (file)
@@ -35,7 +35,7 @@ probe __syscall.getsockname = kernel.function("sys_getsockname").call ?
 }
 probe __syscall.socketcall.getsockname = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_GETSOCKNAME")) next;
+       if (__int32($call) != @const("SYS_GETSOCKNAME")) next;
        s = __int32(user_ulong(&@cast($args, "ulong")[0]))
        name_uaddr = user_ulong(&@cast($args, "ulong")[1])
        namelen_uaddr = user_ulong(&@cast($args, "ulong")[2])
@@ -43,7 +43,7 @@ probe __syscall.socketcall.getsockname = kernel.function("sys_socketcall").call
 probe __syscall.compat_socketcall.getsockname =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_GETSOCKNAME")) next;
+       if (__int32($call) != @const("SYS_GETSOCKNAME")) next;
        s = user_int(&@cast($args, "unsigned int")[0])
        name_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
        namelen_uaddr = user_uint32(&@cast($args, "unsigned int")[2])
@@ -62,7 +62,7 @@ probe __syscall.socketcall.getsockname.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_GETSOCKNAME")) next;
+       if (__int32(@entry($call)) != @const("SYS_GETSOCKNAME")) next;
 }
 
 # nd_getsockname _____________________________________________________
index 9d6fd0486cb9dfa13371cee5bf42f8a7e12fb0da..304b38d9d3dc6e36ebc6f8ecf15bb929eab235c8 100644 (file)
@@ -43,7 +43,7 @@ probe __syscall.getsockopt = kernel.function("sys_getsockopt").call ?
 }
 probe __syscall.socketcall.getsockopt = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_GETSOCKOPT")) next;
+       if (__int32($call) != @const("SYS_GETSOCKOPT")) next;
        fd = __int32(user_ulong(&@cast($args, "ulong")[0]))
        level = __int32(user_ulong(&@cast($args, "ulong")[1]))
        optname = __int32(user_ulong(&@cast($args, "ulong")[2]))
@@ -53,7 +53,7 @@ probe __syscall.socketcall.getsockopt = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.getsockopt =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_GETSOCKOPT")) next;
+       if (__int32($call) != @const("SYS_GETSOCKOPT")) next;
        fd = user_int(&@cast($args, "unsigned int")[0])
        level = user_int(&@cast($args, "unsigned int")[1])
        optname = user_int(&@cast($args, "unsigned int")[2])
@@ -74,7 +74,7 @@ probe __syscall.socketcall.getsockopt.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_GETSOCKOPT")) next;
+       if (__int32(@entry($call)) != @const("SYS_GETSOCKOPT")) next;
 }
 
 # nd_getsockopt _____________________________________________________
index e69b63c2dfbfa6001b2efc682edc9c92f261798c..8c53361421c8bb57525c3c9e0e1f12486ba0636d 100644 (file)
@@ -21,14 +21,20 @@ probe syscall.getuid.return = dw_syscall.getuid.return !, nd_syscall.getuid.retu
 
 probe dw_syscall.getuid = kernel.function("sys_getuid16").call ?,
                        kernel.function("sys32_getuid16").call ?,
+%( arch == "s390" %?
+                       kernel.function("compat_sys_s390_getuid16").call ?,
+%)
                        kernel.function("sys_getuid").call
 {
        @_SYSCALL_GETUID_NAME
        @_SYSCALL_GETUID_ARGSTR
 }
 probe dw_syscall.getuid.return = kernel.function("sys_getuid16").return ?,
-                              kernel.function("sys32_getuid16").return ?,
-                              kernel.function("sys_getuid").return
+       kernel.function("sys32_getuid16").return ?,
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_getuid16").return ?,
+%)
+       kernel.function("sys_getuid").return
 {
        @_SYSCALL_GETUID_NAME
        retstr = return_str(1, $return)
@@ -38,14 +44,20 @@ probe dw_syscall.getuid.return = kernel.function("sys_getuid16").return ?,
 
 probe nd_syscall.getuid = kprobe.function("sys_getuid16") ?,
                           kprobe.function("sys32_getuid16") ?,
+%( arch == "s390" %?
+                          kprobe.function("compat_sys_s390_getuid16") ?,
+%)
                           kprobe.function("sys_getuid")
 {
        @_SYSCALL_GETUID_NAME
        @_SYSCALL_GETUID_ARGSTR
 }
 probe nd_syscall.getuid.return = kprobe.function("sys_getuid16").return ?,
-                                 kprobe.function("sys32_getuid16").return ?,
-                                 kprobe.function("sys_getuid").return
+       kprobe.function("sys32_getuid16").return ?,
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_getuid16").return ?,
+%)
+       kprobe.function("sys_getuid").return
 {
        @_SYSCALL_GETUID_NAME
        retstr = returnstr(1)
index f6a5e6626b0dc38631b15387d71e7a2d6ed23146..3e6cc38acb30a3e7e950bf473cdaa31187c2d6b5 100644 (file)
@@ -23,7 +23,7 @@ probe syscall.io_cancel.return = dw_syscall.io_cancel.return !, nd_syscall.io_ca
 probe dw_syscall.io_cancel = kernel.function("sys_io_cancel").call
 {
        @_SYSCALL_IO_CANCEL_NAME
-       ctx_id = __ulong($ctx_id)
+       ctx_id = @__compat_ulong($ctx_id)
        iocb_uaddr = $iocb
        result_uaddr = $result
        @_SYSCALL_IO_CANCEL_ARGSTR
index 3a1b0f13e27ea17f5b615bd9ad0f93646bd4c43f..0cc02f3dde3c040e91bd60f35557b03422e56a24 100644 (file)
@@ -20,7 +20,7 @@ probe syscall.io_destroy.return = dw_syscall.io_destroy.return !,
 probe dw_syscall.io_destroy = kernel.function("sys_io_destroy").call
 {
        @_SYSCALL_IO_DESTROY_NAME
-       ctx = __ulong($ctx)
+       ctx = @__compat_ulong($ctx)
        @_SYSCALL_IO_DESTROY_ARGSTR
 }
 probe dw_syscall.io_destroy.return = kernel.function("sys_io_destroy").return
index c937b17e65fcd58610830f6fb6b4462cfab7c1cd..30a789d9f382ff6aca53c549e8ab705dae88ebae 100644 (file)
@@ -32,7 +32,7 @@ probe dw_syscall.io_getevents = __syscall.io_getevents ?,
        kernel.function("compat_sys_io_getevents").call ?
 {
        @_SYSCALL_IO_GETEVENTS_NAME
-        ctx_id = __ulong($ctx_id)
+        ctx_id = @__compat_ulong($ctx_id)
        events_uaddr = $events
        timeout_uaddr = $timeout
        nr = @__compat_long($nr)
index ca0f1dc9dbaee72a04c2d4ce2496627364ac23d8..cd134afaa68880f3a1ef96a72c7c6894951c01ca 100644 (file)
@@ -22,7 +22,7 @@ probe dw_syscall.io_submit = __syscall.io_submit,
        kernel.function("compat_sys_io_submit").call ?
 {
        @_SYSCALL_IO_SUBMIT_NAME
-       ctx_id = __ulong($ctx_id)
+       ctx_id = @__compat_ulong($ctx_id)
        nr = @__compat_long($nr)
        iocbpp_uaddr = @choose_defined($iocbpp, $iocb)
        @_SYSCALL_IO_SUBMIT_ARGSTR
index 3e154ceb68064201dba20b6210bc3a7fba6b4565..68de8e94de3738610e90d65b0387da44a09c3c63 100644 (file)
@@ -24,7 +24,7 @@ probe dw_syscall.ioctl = __syscall.ioctl ?,
        @_SYSCALL_IOCTL_NAME
        fd = __int32($fd)
        request = __int32($cmd)
-       argp = @choose_defined($arg, $arg32)
+       argp = @__compat_ulong(@choose_defined($arg, $arg32))
        @_SYSCALL_IOCTL_ARGSTR
 }
 probe __syscall.ioctl = kernel.function("sys_ioctl").call
index 1cceacd555282960212af6f1f1a7051eda2707f7..7b496e10685481acb69d49dfd3dc8e562a61f8ee 100644 (file)
@@ -29,10 +29,10 @@ probe dw_syscall.kexec_load = __syscall.kexec_load.call ?,
                            kernel.function("compat_sys_kexec_load").call ?
 {
        @_SYSCALL_KEXEC_LOAD_NAME
-       entry = __ulong($entry)
+       entry = @__compat_ulong($entry)
        nr_segments = __ulong($nr_segments)
-       segments_uaddr = $segments
-       flags = __ulong($flags)
+       segments_uaddr = @__pointer($segments)
+       flags = @__compat_ulong($flags)
        flags_str = _kexec_flags_str(flags)
        @_SYSCALL_KEXEC_LOAD_ARGSTR
 }
index a17db394434022a1cb864d0a5b3019c85115eb1c..85a07af67338bc3f7c1913af51146c609699d8c5 100644 (file)
@@ -31,14 +31,14 @@ probe __syscall.listen = kernel.function("sys_listen").call ?
 }
 probe __syscall.socketcall.listen = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_LISTEN")) next;
+       if (__int32($call) != @const("SYS_LISTEN")) next;
        sockfd = __int32(user_ulong(&@cast($args, "ulong")[0]))
        backlog = __int32(user_ulong(&@cast($args, "ulong")[1]))
 }
 probe __syscall.compat_socketcall.listen =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_LISTEN")) next;
+       if (__int32($call) != @const("SYS_LISTEN")) next;
        sockfd = user_int(&@cast($args, "unsigned int")[0])
        backlog = user_int(&@cast($args, "unsigned int")[1])
 }
@@ -56,7 +56,7 @@ probe __syscall.socketcall.listen.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_LISTEN")) next;
+       if (__int32(@entry($call)) != @const("SYS_LISTEN")) next;
 }
 
 # nd_listen _____________________________________________________
index ff2b97d77b2016c6fc279bd0430049aa60815466..c041ee79fb305ab66e8cad03341c9ecfa03cb2cd 100644 (file)
@@ -6,6 +6,7 @@
 # long sys_lstat64(char __user * filename, struct stat64 __user * statbuf)
 # long sys_oabi_lstat64(char __user * filename,
 #                      struct oldabi_stat64 __user * statbuf)
+# COMPAT_SYSCALL_DEFINE2(s390_lstat64, const char __user *, filename, struct stat64_emu31 __user *, statbuf)
 #
 
 @define _SYSCALL_LSTAT_NAME
@@ -29,19 +30,25 @@ probe dw_syscall.lstat = kernel.function("sys_lstat").call ?,
                       kernel.function("compat_sys_newlstat").call ?,
                       kernel.function("sys32_lstat64").call ?,
                       kernel.function("sys_lstat64").call ?,
+%( arch == "s390" %?
+                      kernel.function("compat_sys_s390_lstat64").call ?,
+%)
                       kernel.function("sys_oabi_lstat64").call ?
 {
        @_SYSCALL_LSTAT_NAME
-       path = user_string_quoted($filename)
-       buf_uaddr = $statbuf
+       path = user_string_quoted(@__pointer($filename))
+       buf_uaddr = @__pointer($statbuf)
        @_SYSCALL_LSTAT_ARGSTR
 }
 probe dw_syscall.lstat.return = kernel.function("sys_lstat").return ?,
-                             kernel.function("sys_newlstat").return ?,
-                             kernel.function("compat_sys_newlstat").return ?,
-                             kernel.function("sys32_lstat64").return ?,
-                             kernel.function("sys_lstat64").return ?,
-                             kernel.function("sys_oabi_lstat64").return ?
+       kernel.function("sys_newlstat").return ?,
+       kernel.function("compat_sys_newlstat").return ?,
+       kernel.function("sys32_lstat64").return ?,
+       kernel.function("sys_lstat64").return ?,
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_lstat64").return ?,
+%)
+       kernel.function("sys_oabi_lstat64").return ?
 {
        @_SYSCALL_LSTAT_NAME
        retstr = return_str(1, $return)
@@ -54,6 +61,9 @@ probe nd_syscall.lstat = kprobe.function("sys_lstat") ?,
                          kprobe.function("compat_sys_newlstat") ?,
                          kprobe.function("sys32_lstat64") ?,
                          kprobe.function("sys_lstat64") ?,
+%( arch == "s390" %?
+                         kprobe.function("compat_sys_s390_lstat64") ?,
+%)
                          kprobe.function("sys_oabi_lstat64") ?
 {
        @_SYSCALL_LSTAT_NAME
@@ -63,11 +73,14 @@ probe nd_syscall.lstat = kprobe.function("sys_lstat") ?,
        @_SYSCALL_LSTAT_ARGSTR
 }
 probe nd_syscall.lstat.return = kprobe.function("sys_lstat").return ?,
-                                kprobe.function("sys_newlstat").return ?,
-                                kprobe.function("compat_sys_newlstat").return ?,
-                                kprobe.function("sys32_lstat64").return ?,
-                                kprobe.function("sys_lstat64").return ?,
-                                kprobe.function("sys_oabi_lstat64").return ?
+       kprobe.function("sys_newlstat").return ?,
+       kprobe.function("compat_sys_newlstat").return ?,
+       kprobe.function("sys32_lstat64").return ?,
+       kprobe.function("sys_lstat64").return ?,
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_lstat64").return ?,
+%)
+       kprobe.function("sys_oabi_lstat64").return ?
 {
        @_SYSCALL_LSTAT_NAME
        retstr = returnstr(1)
index 06672b54560aa35dfe67e108ed090b0963c3a1e8..96bb36d6f6cea231a84022c8a6c7625800afb6b1 100644 (file)
@@ -30,12 +30,12 @@ probe dw_syscall.mount = kernel.function("compat_sys_mount").call ?,
                       kernel.function("sys_mount").call
 {
        @_SYSCALL_MOUNT_NAME
-       source = user_string_quoted($dev_name)
-       target = user_string_quoted($dir_name)
-       filesystemtype = user_string_quoted($type)
-       mountflags = $flags
-       mountflags_str = _mountflags_str($flags)
-       data = user_string_n_quoted($data, syscall_string_trunc)
+       source = user_string_quoted(@__pointer($dev_name))
+       target = user_string_quoted(@__pointer($dir_name))
+       filesystemtype = user_string_quoted(@__pointer($type))
+       mountflags = @__compat_ulong($flags)
+       mountflags_str = _mountflags_str(mountflags)
+       data = user_string_n_quoted(@__pointer($data), syscall_string_trunc)
        @_SYSCALL_MOUNT_ARGSTR
 }
 probe dw_syscall.mount.return = kernel.function("compat_sys_mount").return ?,
index 87463170025f9f35b4ad55be0043bd9121ac40da..233eaf8bf4d749d4600556a9c5d59483472afa9d 100644 (file)
@@ -28,8 +28,8 @@ probe dw_syscall.mq_getsetattr =
 {
        @_SYSCALL_MQ_GETSETATTR_NAME
        mqdes = __int32($mqdes)
-       u_mqstat_uaddr = $u_mqstat
-       u_omqstat_uaddr = $u_omqstat
+       u_mqstat_uaddr = @__pointer($u_mqstat)
+       u_omqstat_uaddr = @__pointer($u_omqstat)
        @_SYSCALL_MQ_GETSETATTR_ARGSTR
 }
 probe __syscall.mq_getsetattr = kernel.function("sys_mq_getsetattr").call
index c3a91e9533fad2e5bf69ba1169338e582fd961c7..ca568486b51155f14aebd326aa4332ea55b3c3fa 100644 (file)
@@ -25,7 +25,7 @@ probe dw_syscall.mq_notify =
 {
        @_SYSCALL_MQ_NOTIFY_NAME
        mqdes = __int32($mqdes)
-       notification_uaddr = $u_notification
+       notification_uaddr = @__pointer($u_notification)
        @_SYSCALL_MQ_NOTIFY_ARGSTR
 }
 probe __syscall.mq_notify = kernel.function("sys_mq_notify").call
index 0a395c7e2e98aca99da6f3e238ffc93d624c36df..601213fef80707215a7a9ff72bc9d4e44f606edf 100644 (file)
@@ -32,9 +32,9 @@ probe dw_syscall.mq_open = __syscall.mq_open,
                         kernel.function("compat_sys_mq_open").call ?
 {
        @_SYSCALL_MQ_OPEN_NAME
-       name_uaddr = $u_name
-       filename = user_string_quoted($u_name)
-       u_attr_uaddr = $u_attr
+       name_uaddr = @__pointer($u_name)
+       filename = user_string_quoted(name_uaddr)
+       u_attr_uaddr = @__pointer($u_attr)
        oflag = __int32($oflag)
        oflag_str = _sys_open_flag_str(oflag)
        mode = (@__compat_task ? __ushort($mode) : __uint32($mode))
index 080a7e2b40bb92816d2ed2db02f3c268f606ce19..e8b8b3b619f1820f5b09ec6cf413a4f614e34b50 100644 (file)
@@ -33,9 +33,9 @@ probe dw_syscall.mq_timedreceive =
 {
        @_SYSCALL_MQ_TIMEDRECEIVE_NAME
        mqdes = __int32($mqdes)
-       msg_ptr_uaddr = $u_msg_ptr
-       msg_prio_uaddr = $u_msg_prio
-       abs_timeout_uaddr = $u_abs_timeout
+       msg_ptr_uaddr = @__pointer($u_msg_ptr)
+       msg_prio_uaddr = @__pointer($u_msg_prio)
+       abs_timeout_uaddr = @__pointer($u_abs_timeout)
 %( CONFIG_64BIT == "y" %?
        msg_len = @__compat_ulong($msg_len)
 %:
index 0d1a6a07ce88e4afc057d44fb158ee3d31a0ec06..9526b4857f6a139fae9d038de912ab8544fd0784 100644 (file)
@@ -34,9 +34,9 @@ probe dw_syscall.mq_timedsend =
 {
        @_SYSCALL_MQ_TIMEDSEND_NAME
        mqdes = __int32($mqdes)
-       msg_ptr_uaddr = $u_msg_ptr
+       msg_ptr_uaddr = @__pointer($u_msg_ptr)
        msg_prio = __uint32($msg_prio)
-       abs_timeout_uaddr = $u_abs_timeout
+       abs_timeout_uaddr = @__pointer($u_abs_timeout)
 %( CONFIG_64BIT == "y" %?
        msg_len = @__compat_ulong($msg_len)
 %:
index 7c730466eadb39d698b88cc8eeade77e9fa4f023..02842d01b6ec89f0b5a9e66c33bca1ab4c9ada1a 100644 (file)
@@ -43,9 +43,9 @@ probe dw_syscall.nanosleep.return = kernel.function("sys_nanosleep").return
 probe dw_syscall.compat_nanosleep = kernel.function("compat_sys_nanosleep").call ?
 {
        @_SYSCALL_NANOSLEEP_NAME
-       req_uaddr = $rqtp
+       req_uaddr = @__pointer($rqtp)
        req_str = _struct_compat_timespec_u(req_uaddr, 1)
-       rem_uaddr = $rmtp
+       rem_uaddr = @__pointer($rmtp)
        @_SYSCALL_NANOSLEEP_ARGSTR
 }
 probe dw_syscall.compat_nanosleep.return = kernel.function("compat_sys_nanosleep").return ?
index 02dd32bf9bfa755e712d04db8704bd3bd4dc1ccd..af756978c7f37708fbd853e9761e95013b9c5652 100644 (file)
@@ -75,11 +75,11 @@ probe syscall.compat_ppoll.return = dw_syscall.compat_ppoll.return !,
 probe dw_syscall.compat_ppoll = kernel.function("compat_sys_ppoll").call ?
 {
        @_SYSCALL_PPOLL_NAME
-       fds_uaddr = $ufds
+       fds_uaddr = @__pointer($ufds)
        nfds = __uint32($nfds)
-       tsp = $tsp
+       tsp = @__pointer($tsp)
        tsp_str = _struct_compat_timespec_u(tsp, 1)
-       sigmask = $sigmask
+       sigmask = @__pointer($sigmask)
        sigsetsize = $sigsetsize
        @_SYSCALL_PPOLL_ARGSTR
 }
index 4bff8c554906bf6e079ad653a61b703267aad166..d7c7a072b8b2fdd2ad570e976335191464da7039 100644 (file)
@@ -4,6 +4,8 @@
 #               char __user *buf,
 #               size_t count,
 #               loff_t pos)
+# COMPAT_SYSCALL_DEFINE5(s390_pread64, unsigned int, fd, char __user *, ubuf,
+#                       compat_size_t, count, u32, high, u32, low)
 #
 
 @define _SYSCALL_PREAD_NAME
@@ -24,15 +26,14 @@ probe syscall.pread.return = dw_syscall.pread.return !,
 
 probe dw_syscall.pread =
 %( arch == "s390" %?
-       __syscall.pread, __syscall.compat_pread ?
-%:
-       __syscall.pread
+       __syscall.compat_pread ?,
 %)
+       __syscall.pread
 {
        @_SYSCALL_PREAD_NAME
        fd = __int32($fd)
-       buf_uaddr = @choose_defined($buf, $ubuf)
-       count = __ulong($count)
+       buf_uaddr = @__pointer(@choose_defined($buf, $ubuf))
+       count = @__compat_ulong($count)
        @_SYSCALL_PREAD_ARGSTR
 }
 probe __syscall.pread = kernel.function("sys_pread64").call
@@ -43,17 +44,19 @@ probe __syscall.pread = kernel.function("sys_pread64").call
        offset = $pos
 }
 %( arch == "s390" %?
-probe __syscall.compat_pread = kernel.function("sys32_pread64").call ?
+probe __syscall.compat_pread = kernel.function("sys32_pread64").call ?,
+       kernel.function("compat_sys_s390_pread64").call ?
 {
-       offset = ($poshi << 32) + $poslo
+       offset = ((@choose_defined($poshi, $high) << 32)
+                 + __uint32(@choose_defined($poslo, $low)))
 }
 %)
 probe dw_syscall.pread.return =
 %( arch == "s390" %?
-       __syscall.pread.return, kernel.function("sys32_pread64").return ?
-%:
-       __syscall.pread.return
+       kernel.function("sys32_pread64").return ?,
+       kernel.function("compat_sys_s390_pread64").return ?,
 %)
+       __syscall.pread.return
 {
        @_SYSCALL_PREAD_NAME
        retstr = return_str(1, $return)
@@ -69,10 +72,9 @@ probe __syscall.pread.return = kernel.function("sys_pread64").return
 
 probe nd_syscall.pread =
 %( arch == "s390" %?
-       __nd_syscall.pread, __nd_syscall.compat_pread ?
-%:
-       __nd_syscall.pread
+       __nd_syscall.compat_pread ?,
 %)
+       __nd_syscall.pread
 {
        @_SYSCALL_PREAD_NAME
        asmlinkage()
@@ -90,7 +92,8 @@ probe __nd_syscall.pread = kprobe.function("sys_pread64")
        offset = longlong_arg(4)
 }
 %( arch == "s390" %?
-probe __nd_syscall.compat_pread = kprobe.function("sys32_pread64").call ?
+probe __nd_syscall.compat_pread = kprobe.function("sys32_pread64") ?,
+       kprobe.function("compat_sys_s390_pread64") ?
 {
        asmlinkage()
        offset = (u32_arg(4) << 32) + u32_arg(5)
@@ -98,10 +101,10 @@ probe __nd_syscall.compat_pread = kprobe.function("sys32_pread64").call ?
 %)
 probe nd_syscall.pread.return =
 %( arch == "s390" %?
-       __nd_syscall.pread.return, kprobe.function("sys32_pread64").return ?
-%:
-       __nd_syscall.pread.return
+       kprobe.function("sys32_pread64").return ?,
+       kprobe.function("compat_sys_s390_pread64").return ?,
 %)
+       __nd_syscall.pread.return
 {
        @_SYSCALL_PREAD_NAME
        retstr = returnstr(1)
index dfa5438674a6eb42cf8280907e3f3d9581a0fb87..63e0a3d1a3cf10e0f5ddfe61fb3d2d64e1be5c18 100644 (file)
@@ -35,9 +35,9 @@ probe dw_syscall.process_vm_readv = kernel.function("sys_process_vm_readv").call
 {
        @_SYSCALL_PROCESS_VM_READV_NAME
        pid = __int32($pid)
-       local_iov_uaddr = $lvec
+       local_iov_uaddr = @__pointer($lvec)
        liovcnt = @__compat_ulong($liovcnt)
-       remote_iov_uaddr = $rvec
+       remote_iov_uaddr = @__pointer($rvec)
        riovcnt = @__compat_ulong($riovcnt)
        flags = @__compat_ulong($flags)
        @_SYSCALL_PROCESS_VM_READV_ARGSTR
index 05a019af1a8aa072c546adb68fb7b9d5ca03b4c2..3b3414643531e4489ba302448155f29722bc17f5 100644 (file)
@@ -36,9 +36,9 @@ probe dw_syscall.process_vm_writev =
 {
        @_SYSCALL_PROCESS_VM_WRITEV_NAME
        pid = __int32($pid)
-       local_iov_uaddr = $lvec
+       local_iov_uaddr = @__pointer($lvec)
        liovcnt = @__compat_ulong($liovcnt)
-       remote_iov_uaddr = $rvec
+       remote_iov_uaddr = @__pointer($rvec)
        riovcnt = @__compat_ulong($riovcnt)
        flags = @__compat_ulong($flags)
        @_SYSCALL_PROCESS_VM_WRITEV_ARGSTR
index da0cd3f1d92045570281daae30746b15768e65b5..8b77eeb75dc5fd6b766d99eaf6e378141cdfac0a 100644 (file)
@@ -75,12 +75,12 @@ probe dw_syscall.compat_pselect6 = kernel.function("compat_sys_pselect6").call ?
 {
        @_SYSCALL_PSELECT6_NAME
        nfds = __int32($n)
-       readfds = $inp
-       writefds = $outp
-       exceptfds = $exp
-       timeout = $tsp
+       readfds = @__pointer($inp)
+       writefds = @__pointer($outp)
+       exceptfds = @__pointer($exp)
+       timeout = @__pointer($tsp)
        timeout_str = _struct_compat_timespec_u(timeout, 1)
-       sigmask = $sig
+       sigmask = @__pointer($sig)
        @_SYSCALL_PSELECT6_ARGSTR
 }
 probe dw_syscall.compat_pselect6.return = kernel.function("compat_sys_pselect6").return ?
index 385d3498052dbb0da403a2c9509e27ed33d713fc..35f7291b2977edcfa33d9c59a2c7386272e54f7d 100644 (file)
@@ -80,10 +80,10 @@ probe dw_syscall.compat_pselect7 = kernel.function("compat_sys_pselect7").call ?
        @__compat_syscall_gate(@const("__NR_compat_pselect7"))
        @_SYSCALL_PSELECT7_NAME
        nfds = __int32($n)
-       readfds = $inp
-       writefds = $outp
-       exceptfds = $exp
-       timeout = $tsp
+       readfds = @__pointer($inp)
+       writefds = @__pointer($outp)
+       exceptfds = @__pointer($exp)
+       timeout = @__pointer($tsp)
        timeout_str = _struct_compat_timespec_u(timeout, 1)
        sigmask = $sig
        sigsetsize = $sigsetsize
index bd9c24eb0f6ff092289a41b29d0d29f4c0e5a17b..4d8967ea0cafc1bc8a76295028b71a60218b42fd 100644 (file)
@@ -26,7 +26,7 @@ probe dw_syscall.ptrace = kernel.function("sys_ptrace").call ?,
                kernel.function("compat_sys_ptrace").call ?
 {
        @_SYSCALL_PTRACE_NAME
-       request = $request
+       request = @__compat_ulong($request)
        pid = __int32($pid)
        addr = @__compat_ulong($addr)
        data = @__compat_ulong(@choose_defined($data, $cdata))
index 889087a1f0f661897c5e36360fbab5b7eba74c21..4fcf3892ae9a12f74d244b711c94450d883609ee 100644 (file)
@@ -30,7 +30,7 @@ probe dw_syscall.pwrite = kernel.function("sys_pwrite64").call
        @_SYSCALL_PWRITE_NAME
        fd = __int32($fd)
        buf_uaddr = $buf
-       count = __ulong($count)
+       count = @__compat_ulong($count)
        buf_str = user_buffer_quoted(buf_uaddr, count, syscall_string_trunc)
        offset = $pos
        @_SYSCALL_PWRITE_ARGSTR
@@ -71,6 +71,9 @@ probe nd_syscall.pwrite.return = kprobe.function("sys_pwrite64").return ?
 
 # long sys32_pwrite64(unsigned int fd, const char __user *ubuf,
 #                              size_t count, u32 poshi, u32 poslo)
+# COMPAT_SYSCALL_DEFINE5(s390_pwrite64, unsigned int, fd,
+#                       const char __user *, ubuf,
+#                       compat_size_t, count, u32, high, u32, low)
 
 probe syscall.pwrite32 = dw_syscall.pwrite32 !, nd_syscall.pwrite32 ? {}
 probe syscall.pwrite32.return = dw_syscall.pwrite32.return !,
@@ -78,17 +81,26 @@ probe syscall.pwrite32.return = dw_syscall.pwrite32.return !,
 
 # dw_pwrite32 _____________________________________________________
 
-probe dw_syscall.pwrite32 = kernel.function("sys32_pwrite64").call ?
+probe dw_syscall.pwrite32 =
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_pwrite64").call ?,
+%)
+       kernel.function("sys32_pwrite64").call ?
 {
        @_SYSCALL_PWRITE_NAME
        fd = __int32($fd)
-       count = $count
-       offset = ($poshi << 32) + $poslo
-       buf_uaddr = @choose_defined($buf, $ubuf)
+       count = @__compat_ulong($count)
+       offset = ((@choose_defined($poshi, $high) << 32)
+                 + __uint32(@choose_defined($poslo, $low)))
+       buf_uaddr = @__pointer(@choose_defined($buf, $ubuf))
        buf_str = user_buffer_quoted(buf_uaddr, count, syscall_string_trunc)
        @_SYSCALL_PWRITE_ARGSTR
 }
-probe dw_syscall.pwrite32.return = kernel.function("sys32_pwrite64").return ?
+probe dw_syscall.pwrite32.return =
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_pwrite64").return ?,
+%)
+       kernel.function("sys32_pwrite64").return ?
 {
        @_SYSCALL_PWRITE_NAME
        retstr = return_str(1, $return)
@@ -96,7 +108,11 @@ probe dw_syscall.pwrite32.return = kernel.function("sys32_pwrite64").return ?
 
 # nd_pwrite32 _____________________________________________________
 
-probe nd_syscall.pwrite32 = kprobe.function("sys32_pwrite64") ?
+probe nd_syscall.pwrite32 =
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_pwrite64") ?,
+%)
+       kprobe.function("sys32_pwrite64") ?
 {
        @_SYSCALL_PWRITE_NAME
        asmlinkage()
@@ -107,7 +123,11 @@ probe nd_syscall.pwrite32 = kprobe.function("sys32_pwrite64") ?
        offset = (u32_arg(4) << 32) + u32_arg(5)
        @_SYSCALL_PWRITE_ARGSTR
 }
-probe nd_syscall.pwrite32.return = kprobe.function("sys32_pwrite64").return ?
+probe nd_syscall.pwrite32.return =
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_pwrite64").return ?,
+%)
+       kprobe.function("sys32_pwrite64").return ?
 {
        @_SYSCALL_PWRITE_NAME
        retstr = returnstr(1)
index ab65b80dc54dab15e210634b47df3c14a5d0890a..8215e07740c30711b4c4d5a0aaf0894ec604abea 100644 (file)
@@ -19,15 +19,16 @@ probe syscall.read.return = dw_syscall.read.return !,
 
 probe dw_syscall.read =
 %( arch == "s390" %?
-       __syscall.read, kernel.function("sys32_read").call ?
+       __syscall.read, kernel.function("sys32_read").call ?,
+       kernel.function("compat_sys_s390_read").call ?
 %:
        __syscall.read
 %)
 {
        @_SYSCALL_READ_NAME
        fd = __int32($fd)
-       buf_uaddr = $buf
-       count = __ulong($count)
+       buf_uaddr = @__pointer($buf)
+       count = @__compat_ulong($count)
        @_SYSCALL_READ_ARGSTR
 }
 probe __syscall.read = kernel.function("sys_read").call
@@ -38,7 +39,8 @@ probe __syscall.read = kernel.function("sys_read").call
 }
 probe dw_syscall.read.return =
 %( arch == "s390" %?
-       __syscall.read.return, kernel.function("sys32_read").return ?
+       __syscall.read.return, kernel.function("sys32_read").return ?,
+       kernel.function("compat_sys_s390_read").return ?
 %:
        __syscall.read.return
 %)
@@ -57,7 +59,8 @@ probe __syscall.read.return = kernel.function("sys_read").return
 
 probe nd_syscall.read =
 %( arch == "s390" %?
-       __nd_syscall.read, kprobe.function("sys32_read").call ?
+       __nd_syscall.read, kprobe.function("sys32_read") ?,
+       kprobe.function("compat_sys_s390_read") ?
 %:
        __nd_syscall.read
 %)
@@ -77,7 +80,8 @@ probe __nd_syscall.read = kprobe.function("sys_read")
 }
 probe nd_syscall.read.return =
 %( arch == "s390" %?
-       __nd_syscall.read.return, kprobe.function("sys32_read").return ?
+       __nd_syscall.read.return, kprobe.function("sys32_read").return ?,
+       kprobe.function("compat_sys_s390_read").return ?
 %:
        __nd_syscall.read.return
 %)
index 0d11cbaeb70f4634d578e5b07fc7ff41f4a685e5..a016c0eb5fdfeb37d4e583f3c1cc0348709ccfe9 100644 (file)
@@ -32,7 +32,7 @@ probe dw_syscall.recv = __syscall.socketcall.recv ?,
 }
 probe __syscall.socketcall.recv = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_RECV")) next;
+       if (__int32($call) != @const("SYS_RECV")) next;
        s = __int32(user_ulong(&@cast($args, "ulong")[0]))
        buf_uaddr = user_ulong(&@cast($args, "ulong")[1])
        len = user_ulong(&@cast($args, "ulong")[2])
@@ -41,7 +41,7 @@ probe __syscall.socketcall.recv = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.recv =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_RECV")) next;
+       if (__int32($call) != @const("SYS_RECV")) next;
        s = user_int(&@cast($args, "unsigned int")[0])
        buf_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
        len = user_uint32(&@cast($args, "unsigned int")[2])
@@ -65,7 +65,7 @@ probe __syscall.socketcall.recv.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_RECV")) next;
+       if (__int32(@entry($call)) != @const("SYS_RECV")) next;
 }
 probe __syscall.recv.return = kernel.function("sys_recv").return ?
 {
index a6ac0daab85c7b6269cac302c7ce3f9bbb2a5fef..bf8c9723a8737619e97d800bc6b08a1f308e428e 100644 (file)
@@ -38,7 +38,7 @@ probe dw_syscall.recvfrom = __syscall.socketcall.recvfrom ?,
 }
 probe __syscall.socketcall.recvfrom = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_RECVFROM")) next
+       if (__int32($call) != @const("SYS_RECVFROM")) next
        s = __int32(user_ulong(&@cast($args, "ulong")[0]))
        buf_uaddr = user_ulong(&@cast($args, "ulong")[1])
        len = user_ulong(&@cast($args, "ulong")[2])
@@ -49,7 +49,7 @@ probe __syscall.socketcall.recvfrom = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.recvfrom =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_RECVFROM")) next
+       if (__int32($call) != @const("SYS_RECVFROM")) next
        s = user_int(&@cast($args, "unsigned int")[0])
        buf_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
        len = user_uint32(&@cast($args, "unsigned int")[2])
@@ -76,7 +76,7 @@ probe dw_syscall.recvfrom.return = __syscall.socketcall.return ?,
 probe __syscall.socketcall.return = kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_RECVFROM")) next
+       if (__int32(@entry($call)) != @const("SYS_RECVFROM")) next
 }
 probe __syscall.recvfrom.return = kernel.function("sys_recvfrom").return ?
 {
index 2953b920b8044b7e485ccd347fdabf4898874124..1acde81843e2be4ee8c85132a64f74d8ec07243b 100644 (file)
@@ -41,7 +41,7 @@ probe __syscall.recvmsg = kernel.function("sys_recvmsg").call ?
 }
 probe __syscall.socketcall.recvmsg = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_RECVMSG")) next;
+       if (__int32($call) != @const("SYS_RECVMSG")) next;
        s = __int32(user_ulong(&@cast($args, "ulong")[0]))
        msg_uaddr = user_ulong(&@cast($args, "ulong")[1])
        flags = __uint32(user_ulong(&@cast($args, "ulong")[2]))
@@ -60,7 +60,7 @@ probe __syscall.recvmsg.return = kernel.function("sys_recvmsg").return ?
 probe __syscall.socketcall.recvmsg.return =
        kernel.function("sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_RECVMSG")) next;
+       if (__int32(@entry($call)) != @const("SYS_RECVMSG")) next;
 }
 
 # nd_recvmsg _____________________________________________________
@@ -139,7 +139,7 @@ probe syscall.compat_sys_recvmsg.return = dw_syscall.compat_sys_recvmsg.return !
 probe dw_syscall.compat_sys_recvmsg =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_RECVMSG")) next;
+       if (__int32($call) != @const("SYS_RECVMSG")) next;
        @_SYSCALL_RECVMSG_NAME
        s = user_int(&@cast($args, "unsigned int")[0])
        msg_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
@@ -150,7 +150,7 @@ probe dw_syscall.compat_sys_recvmsg =
 probe dw_syscall.compat_sys_recvmsg.return =
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_RECVMSG")) next;
+       if (__int32(@entry($call)) != @const("SYS_RECVMSG")) next;
        @_SYSCALL_RECVMSG_NAME
        retstr = return_str(1, $return)
 }
index afbc807e8c8af8900f857e507aff0273318c5e75..5e66b3ac3fb811482dac8bf68d21c906c9cc73b6 100644 (file)
@@ -33,7 +33,7 @@ probe dw_syscall.sched_getaffinity =
        @_SYSCALL_SCHED_GETAFFINITY_NAME
        pid = __int32($pid)
        len = __uint32($len)
-       mask_uaddr = $user_mask_ptr
+       mask_uaddr = @__pointer($user_mask_ptr)
        @_SYSCALL_SCHED_GETAFFINITY_ARGSTR
 }
 probe dw_syscall.sched_getaffinity.return =
index a0adf042a548923ef7280791c273ef5b3b369d99..9adca981f382ae0ad4bc3f4f6aa8333bf55af49d 100644 (file)
@@ -28,7 +28,7 @@ probe dw_syscall.sched_setaffinity =
        @_SYSCALL_SCHED_SETAFFINITY_NAME
        pid = __int32($pid)
        len = __uint32(@choose_defined($len, 0))
-       mask_uaddr = $user_mask_ptr
+       mask_uaddr = @__pointer($user_mask_ptr)
        @_SYSCALL_SCHED_SETAFFINITY_ARGSTR
 }
 probe dw_syscall.sched_setaffinity.return =
index e5fce93a6e7f58a9f4a78a670198f1f2af8089f3..30077481e35a9e9f3ff6455d7b344e58213f313d 100644 (file)
@@ -77,10 +77,10 @@ probe dw_syscall.compat_select = kernel.function("compat_sys_select").call ?
 {
        @_SYSCALL_SELECT_NAME
        n = __int32($n)
-       readfds_uaddr = $inp
-       writefds_uaddr = $outp
-       exceptfds_uaddr = $exp
-       timeout_uaddr = $tvp
+       readfds_uaddr = @__pointer($inp)
+       writefds_uaddr = @__pointer($outp)
+       exceptfds_uaddr = @__pointer($exp)
+       timeout_uaddr = @__pointer($tvp)
        timeout_str = _struct_compat_timeval_u(timeout_uaddr, 1)
        @_SYSCALL_SELECT_ARGSTR
 }
index eb802a9513515b4c13ff336e565f12fe5b1a2bf8..36442ebb8d316e396be7110c0172ba9b6b3b6380 100644 (file)
@@ -40,7 +40,7 @@ probe __syscall.send = kernel.function("sys_send").call ?
 }
 probe __syscall.socketcall.send = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SEND")) next;
+       if (__int32($call) != @const("SYS_SEND")) next;
        s = __int32(user_ulong(&@cast($args, "ulong")[0]))
        buf_uaddr = user_ulong(&@cast($args, "ulong")[1])
        len = user_ulong(&@cast($args, "ulong")[2])
@@ -49,7 +49,7 @@ probe __syscall.socketcall.send = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.send =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SEND")) next;
+       if (__int32($call) != @const("SYS_SEND")) next;
        s = user_int(&@cast($args, "unsigned int")[0])
        buf_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
        len = user_uint32(&@cast($args, "unsigned int")[2])
@@ -69,7 +69,7 @@ probe __syscall.socketcall.send.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_SEND")) next;
+       if (__int32(@entry($call)) != @const("SYS_SEND")) next;
 }
 
 # nd_send _____________________________________________________
index 42a7c1903c919291da0e0bb91e88919ac48ccf61..c99ae7da9b5e9a8579f5c017a92fed9c7b18aae8 100644 (file)
@@ -43,7 +43,7 @@ probe __syscall.sendmmsg = kernel.function("sys_sendmmsg").call ?
 probe __syscall.compat_socketcall.sendmmsg =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SENDMMSG")) next
+       if (__int32($call) != @const("SYS_SENDMMSG")) next
        s = user_int(&@cast($args, "unsigned int")[0])
        mmsg_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
        vlen = user_uint32(&@cast($args, "unsigned int")[2])
@@ -77,7 +77,7 @@ probe __syscall.sendmmsg.return = kernel.function("sys_sendmmsg").return ?
 probe __syscall.compat_socketcall.sendmmsg.return =
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_SENDMMSG")) next
+       if (__int32(@entry($call)) != @const("SYS_SENDMMSG")) next
 }
 probe __syscall.compat_sendmmsg.return =
        kernel.function("compat_sys_sendmmsg").return ?
index ee30219f67806e171b3d70d9ed8915f09edb34d6..f9beead05e9cd976d9613c68ef7073b0fcc7eb38 100644 (file)
@@ -40,7 +40,7 @@ probe __syscall.sendmsg = kernel.function("sys_sendmsg").call ?
 }
 probe __syscall.socketcall.sendmsg = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SENDMSG")) next;
+       if (__int32($call) != @const("SYS_SENDMSG")) next;
        s = __int32(user_ulong(&@cast($args, "ulong")[0]))
        msg_uaddr = user_ulong(&@cast($args, "ulong")[1])
        flags = __uint32(user_ulong(&@cast($args, "ulong")[2]))
@@ -64,7 +64,7 @@ probe __syscall.sendmsg.return = kernel.function("sys_sendmsg").return ?
 probe __syscall.socketcall.sendmsg.return =
        kernel.function("sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_SENDMSG")) next;
+       if (__int32(@entry($call)) != @const("SYS_SENDMSG")) next;
 }
 
 # nd_sendmsg _____________________________________________________
@@ -147,7 +147,7 @@ probe syscall.compat_sys_sendmsg.return = dw_syscall.compat_sys_sendmsg.return !
 probe dw_syscall.compat_sys_sendmsg =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SENDMSG")) next;
+       if (__int32($call) != @const("SYS_SENDMSG")) next;
        @_SYSCALL_SENDMSG_NAME
        s = user_int(&@cast($args, "unsigned int")[0])
        msg_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
@@ -158,7 +158,7 @@ probe dw_syscall.compat_sys_sendmsg =
 probe dw_syscall.compat_sys_sendmsg.return =
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_SENDMSG")) next;
+       if (__int32(@entry($call)) != @const("SYS_SENDMSG")) next;
        @_SYSCALL_SENDMSG_NAME
        retstr = return_str(1, $return)
 }
index 9dc09940c71443e065dbe90ad82b4f51bbc590eb..4c52834a9e9813f04e625e264a03a68ca7e26926 100644 (file)
@@ -45,7 +45,7 @@ probe __syscall.sendto = kernel.function("sys_sendto").call ?
 }
 probe __syscall.socketcall.sendto = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SENDTO")) next;
+       if (__int32($call) != @const("SYS_SENDTO")) next;
        s = __int32(user_ulong(&@cast($args, "ulong")[0]))
        buf_uaddr = user_ulong(&@cast($args, "ulong")[1])
        len = user_ulong(&@cast($args, "ulong")[2])
@@ -56,7 +56,7 @@ probe __syscall.socketcall.sendto = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.sendto =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SENDTO")) next;
+       if (__int32($call) != @const("SYS_SENDTO")) next;
        s = user_int(&@cast($args, "unsigned int")[0])
        buf_uaddr = user_uint32(&@cast($args, "unsigned int")[1])
        len = user_uint32(&@cast($args, "unsigned int")[2])
@@ -69,7 +69,7 @@ probe dw_syscall.sendto.return = kernel.function("sys_sendto").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
        if (@defined(@entry($call))) {
-               if (@entry($call) != @const("SYS_SENDTO")) next;
+               if (__int32(@entry($call)) != @const("SYS_SENDTO")) next;
        }
        else {
                @__syscall_gate(@const("__NR_sendto"))
index 17d8041619be58ecf0a491d93ec374b7a04ba0b5..18f62a07e5dbcaa6238493f1a69e5cab80510d86 100644 (file)
@@ -23,6 +23,9 @@ probe syscall.setgroups.return = dw_syscall.setgroups.return !,
 
 probe dw_syscall.setgroups = kernel.function("sys_setgroups16").call ?,
                           kernel.function("sys32_setgroups16").call ?,
+%( arch == "s390" %?
+                          kernel.function("compat_sys_s390_setgroups16").call ?,
+%)
                           kernel.function("sys_setgroups").call ?
 {
        @_SYSCALL_SETGROUPS_NAME
@@ -31,8 +34,11 @@ probe dw_syscall.setgroups = kernel.function("sys_setgroups16").call ?,
        @_SYSCALL_SETGROUPS_ARGSTR
 }
 probe dw_syscall.setgroups.return = kernel.function("sys_setgroups16").return ?,
-                                 kernel.function("sys32_setgroups16").return ?,
-                                 kernel.function("sys_setgroups").return ?
+       kernel.function("sys32_setgroups16").return ?,
+%( arch == "s390" %?
+       kernel.function("compat_sys_s390_setgroups16").return ?,
+%)
+       kernel.function("sys_setgroups").return ?
 {
        @_SYSCALL_SETGROUPS_NAME
        retstr = return_str(1, $return)
@@ -42,6 +48,9 @@ probe dw_syscall.setgroups.return = kernel.function("sys_setgroups16").return ?,
 
 probe nd_syscall.setgroups = kprobe.function("sys_setgroups16") ?,
                              kprobe.function("sys32_setgroups16") ?,
+%( arch == "s390" %?
+                             kprobe.function("compat_sys_s390_setgroups16") ?,
+%)
                              kprobe.function("sys_setgroups") ?
 {
        @_SYSCALL_SETGROUPS_NAME
@@ -51,8 +60,11 @@ probe nd_syscall.setgroups = kprobe.function("sys_setgroups16") ?,
        @_SYSCALL_SETGROUPS_ARGSTR
 }
 probe nd_syscall.setgroups.return = kprobe.function("sys_setgroups16").return ?,
-                                    kprobe.function("sys32_setgroups16").return ?,
-                                    kprobe.function("sys_setgroups").return ?
+       kprobe.function("sys32_setgroups16").return ?,
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_setgroups16").return ?,
+%)
+       kprobe.function("sys_setgroups").return ?
 {
        @_SYSCALL_SETGROUPS_NAME
        retstr = returnstr(1)
index 609f1ebd7008bbd3b3d5efa6f8226806c3e73681..d0d3546a59692f6208a06066c8f6dbe9b3b17c8a 100644 (file)
@@ -44,7 +44,7 @@ probe __syscall.setsockopt = kernel.function("sys_setsockopt").call ?
 }
 probe __syscall.socketcall.setsockopt = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SETSOCKOPT")) next;
+       if (__int32($call) != @const("SYS_SETSOCKOPT")) next;
        fd = __int32(user_ulong(&@cast($args, "ulong")[0]))
        level = __int32(user_ulong(&@cast($args, "ulong")[1]))
        optname = __int32(user_ulong(&@cast($args, "ulong")[2]))
@@ -54,7 +54,7 @@ probe __syscall.socketcall.setsockopt = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.setsockopt =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SETSOCKOPT")) next;
+       if (__int32($call) != @const("SYS_SETSOCKOPT")) next;
        fd = user_int(&@cast($args, "unsigned int")[0])
        level = user_int(&@cast($args, "unsigned int")[1])
        optname = user_int(&@cast($args, "unsigned int")[2])
@@ -76,7 +76,7 @@ probe __syscall.socketcall.setsockopt.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_SETSOCKOPT")) next;
+       if (__int32(@entry($call)) != @const("SYS_SETSOCKOPT")) next;
 }
 
 # nd_setsockopt _____________________________________________________
index 6daa9b7696f820f0a1676af98216f6ab4717fb9f..ff02266543ec830067f6f2b06cd957bcd588bedc 100644 (file)
@@ -70,9 +70,9 @@ probe dw_syscall.settimeofday32 = kernel.function("sys32_settimeofday").call ?,
                                kernel.function("compat_sys_settimeofday").call ?
 {
        @_SYSCALL_SETTIMEOFDAY_NAME
-       tv_uaddr = $tv
+       tv_uaddr = @__pointer($tv)
        tv_str = _struct_compat_timeval_u(tv_uaddr, 1)
-       tz_uaddr = $tz
+       tz_uaddr = @__pointer($tz)
        tz_str = _struct_timezone_u(tz_uaddr)
        @_SYSCALL_SETTIMEOFDAY_ARGSTR
 }
index 699a510da180b3d6c8d6938b0d139acaf168e8e5..dd95e3bdc8596296736760af0298ca6ba9eda027 100644 (file)
@@ -34,14 +34,14 @@ probe __syscall.shutdown = kernel.function("sys_shutdown").call ?
 }
 probe __syscall.socketcall.shutdown = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SHUTDOWN")) next;
+       if (__int32($call) != @const("SYS_SHUTDOWN")) next;
        s = __int32(user_ulong(&@cast($args, "ulong")[0]))
        how = __int32(user_ulong(&@cast($args, "ulong")[1]))
 }
 probe __syscall.compat_socketcall.shutdown =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SHUTDOWN")) next;
+       if (__int32($call) != @const("SYS_SHUTDOWN")) next;
        s = user_int(&@cast($args, "unsigned int")[0])
        how = user_int(&@cast($args, "unsigned int")[1])
 }
@@ -59,7 +59,7 @@ probe __syscall.socketcall.shutdown.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_SHUTDOWN")) next;
+       if (__int32(@entry($call)) != @const("SYS_SHUTDOWN")) next;
 }
 
 # nd_shutdown _____________________________________________________
index 4ee602e2974072901ac1f66d61c19bf72dbe800d..1b35e5a2ee464c5b5620016526ad7364fa17ece2 100644 (file)
@@ -36,7 +36,7 @@ probe __syscall.socket = kernel.function("sys_socket").call ?
 }
 probe __syscall.socketcall.socket = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SOCKET")) next;
+       if (__int32($call) != @const("SYS_SOCKET")) next;
        family = __int32(user_ulong(&@cast($args, "ulong")[0]))
        type = __int32(user_ulong(&@cast($args, "ulong")[1]))
        protocol = __int32(user_ulong(&@cast($args, "ulong")[2]))
@@ -44,7 +44,7 @@ probe __syscall.socketcall.socket = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.socket =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SOCKET")) next;
+       if (__int32($call) != @const("SYS_SOCKET")) next;
        family = user_int(&@cast($args, "unsigned int")[0])
        type = user_int(&@cast($args, "unsigned int")[1])
        protocol = user_int(&@cast($args, "unsigned int")[2])
@@ -63,7 +63,7 @@ probe __syscall.socketcall.socket.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_SOCKET")) next;
+       if (__int32(@entry($call)) != @const("SYS_SOCKET")) next;
 }
 
 # nd_socket _____________________________________________________
index 18eb89b8a7089995d67bb1d333440e466a77f5be..e35a6e2cc2619940c0df293a243efa467d166ce0 100644 (file)
@@ -42,7 +42,7 @@ probe __syscall.socketpair = kernel.function("sys_socketpair").call ?
 }
 probe __syscall.socketcall.socketpair = kernel.function("sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SOCKETPAIR")) next;
+       if (__int32($call) != @const("SYS_SOCKETPAIR")) next;
        family = __int32(user_ulong(&@cast($args, "ulong")[0]))
        type = __int32(user_ulong(&@cast($args, "ulong")[1]))
        protocol = __int32(user_ulong(&@cast($args, "ulong")[2]))
@@ -51,7 +51,7 @@ probe __syscall.socketcall.socketpair = kernel.function("sys_socketcall").call ?
 probe __syscall.compat_socketcall.socketpair =
        kernel.function("compat_sys_socketcall").call ?
 {
-       if ($call != @const("SYS_SOCKETPAIR")) next;
+       if (__int32($call) != @const("SYS_SOCKETPAIR")) next;
        family = user_int(&@cast($args, "unsigned int")[0])
        type = user_int(&@cast($args, "unsigned int")[1])
        protocol = user_int(&@cast($args, "unsigned int")[2])
@@ -71,7 +71,7 @@ probe __syscall.socketcall.socketpair.return =
        kernel.function("sys_socketcall").return ?,
        kernel.function("compat_sys_socketcall").return ?
 {
-       if (@entry($call) != @const("SYS_SOCKETPAIR")) next;
+       if (__int32(@entry($call)) != @const("SYS_SOCKETPAIR")) next;
 }
 
 # nd_socketpair _____________________________________________________
index b9e4952fbcbf0202f08d7f09b5e99a105cdd19e8..7e9adefc4f0044fd11a64704baa8e690071a4be6 100644 (file)
@@ -4,6 +4,8 @@
 # long sys_stat64(char __user * filename, struct stat64 __user * statbuf)
 # long sys_oabi_stat64(char __user * filename, struct oldabi_stat64 __user * statbuf)
 # long compat_sys_newstat(char __user * filename, struct compat_stat __user *statbuf)
+# COMPAT_SYSCALL_DEFINE2(s390_stat64, const char __user *, filename, struct stat64_emu31 __user *, statbuf)
+#
 
 @define _SYSCALL_STAT_NAME
 %(
@@ -25,6 +27,9 @@ probe dw_syscall.stat = kernel.function("sys_stat").call ?,
                      kernel.function("sys32_stat64").call ?,
                      kernel.function("sys_stat64").call ?,
                      kernel.function("sys_oabi_stat64").call ?,
+%( arch == "s390" %?
+                     kernel.function("compat_sys_s390_stat64").call ?,
+%)
                      kernel.function("compat_sys_newstat").call ?
 {
        @_SYSCALL_STAT_NAME
@@ -38,6 +43,9 @@ probe dw_syscall.stat.return = kernel.function("sys_stat").return ?,
                             kernel.function("sys32_stat64").return ?,
                             kernel.function("sys_stat64").return ?,
                             kernel.function("sys_oabi_stat64").return ?,
+%( arch == "s390" %?
+                            kernel.function("compat_sys_s390_stat64").return ?,
+%)
                             kernel.function("compat_sys_newstat").return ?
 {
        @_SYSCALL_STAT_NAME
@@ -51,6 +59,9 @@ probe nd_syscall.stat = kprobe.function("sys_stat") ?,
                         kprobe.function("sys32_stat64") ?,
                         kprobe.function("sys_stat64") ?,
                         kprobe.function("sys_oabi_stat64") ?,
+%( arch == "s390" %?
+                        kprobe.function("compat_sys_s390_stat64") ?,
+%)
                         kprobe.function("compat_sys_newstat") ?
 {
        @_SYSCALL_STAT_NAME
@@ -61,11 +72,14 @@ probe nd_syscall.stat = kprobe.function("sys_stat") ?,
        @_SYSCALL_STAT_ARGSTR
 }
 probe nd_syscall.stat.return = kprobe.function("sys_stat").return ?,
-                               kprobe.function("sys_newstat").return ?,
-                               kprobe.function("sys32_stat64").return ?,
-                               kprobe.function("sys_stat64").return ?,
-                               kprobe.function("sys_oabi_stat64").return ?,
-                               kprobe.function("compat_sys_newstat").return ?
+       kprobe.function("sys_newstat").return ?,
+       kprobe.function("sys32_stat64").return ?,
+       kprobe.function("sys_stat64").return ?,
+       kprobe.function("sys_oabi_stat64").return ?,
+%( arch == "s390" %?
+       kprobe.function("compat_sys_s390_stat64").return ?,
+%)
+       kprobe.function("compat_sys_newstat").return ?
 {
        @_SYSCALL_STAT_NAME
        retstr = returnstr(1)
index 74db584f1bbf5bf1a08e11e6588946c840bf8e4a..3960d195261411859dc6bc74925a0ae61f71724a 100644 (file)
@@ -23,8 +23,8 @@ probe dw_syscall.statfs = kernel.function("compat_sys_statfs").call ?,
                        kernel.function("sys_statfs").call ?
 {
        @_SYSCALL_STATFS_NAME
-       buf_uaddr = $buf
-       path = user_string_quoted(@choose_defined($pathname, $path))
+       buf_uaddr = @__pointer($buf)
+       path = user_string_quoted(@__pointer(@choose_defined($pathname, $path)))
        @_SYSCALL_STATFS_ARGSTR
 }
 
index ff2a88242e9bcfacba40e077bdd9686889e1a17c..d9de181a5eed051019128bb83a93b19d4703bf13 100644 (file)
@@ -24,9 +24,9 @@ probe dw_syscall.statfs64 = kernel.function("sys_statfs64").call ?,
        kernel.function("compat_sys_statfs64").call ?
 {
        @_SYSCALL_STATFS64_NAME
-       path = user_string_quoted(@choose_defined($pathname, $path))
+       path = user_string_quoted(@__pointer(@choose_defined($pathname, $path)))
        sz = __ulong($sz)
-       buf_uaddr = $buf
+       buf_uaddr = @__pointer($buf)
        @_SYSCALL_STATFS64_ARGSTR
 }
 probe dw_syscall.statfs64.return = kernel.function("sys_statfs64").return ?,
index 7d97bf19d9e163781e506e9f6cc5315fd5faddf9..1d61398b2311b57965b0a6d3c8f00a3bd899d891 100644 (file)
@@ -30,8 +30,8 @@ probe dw_syscall.timer_create = __syscall.timer_create,
        @_SYSCALL_TIMER_CREATE_NAME
        clockid = __int32($which_clock)
        clockid_str = _get_wc_str(__int32($which_clock))
-       evp_uaddr = $timer_event_spec
-       timerid_uaddr = $created_timer_id
+       evp_uaddr = @__pointer($timer_event_spec)
+       timerid_uaddr = @__pointer($created_timer_id)
        @_SYSCALL_TIMER_CREATE_ARGSTR
 }
 probe __syscall.timer_create = kernel.function("sys_timer_create").call
index 739c423c5c030af6ed26ec2d3e7fb7957975d621..d0b48992e0fd4ac6afcc53ebe2083117e60cdc98 100644 (file)
@@ -33,8 +33,8 @@ probe dw_syscall.timer_settime = __syscall.timer_settime,
        @_SYSCALL_TIMER_SETTIME_NAME
        timerid = __int32($timer_id)
        flags = __int32($flags)
-       value_uaddr  = @choose_defined($new, $new_setting)
-       ovalue_uaddr = @choose_defined($old, $old_setting)
+       value_uaddr  = @__pointer(@choose_defined($new, $new_setting))
+       ovalue_uaddr = @__pointer(@choose_defined($old, $old_setting))
 %( CONFIG_COMPAT == "y" %?
        value_str = (@__compat_task ? _struct_compat_itimerspec_u(value_uaddr)
                     : _struct_itimerspec_u(value_uaddr))
index acd601b88b60691e9b0e960d8e3c41a86af48c34..97a58619e0e1b52aa1cd87d8252fd82d383a5623 100644 (file)
@@ -23,7 +23,7 @@ probe dw_syscall.times = kernel.function("compat_sys_times").call ?,
                       kernel.function("sys_times").call ?
 {
        @_SYSCALL_TIMES_NAME
-       buf_uaddr = $tbuf
+       buf_uaddr = @__pointer($tbuf)
        buf_str = _struct_tms_u(buf_uaddr)
        @_SYSCALL_TIMES_ARGSTR
 }
index 53d97525dfdc25c0ce016b557eb540a6b99fa708..f13ed88036f24fa40761ab5fa18534627b5b3e96 100644 (file)
@@ -66,9 +66,9 @@ probe syscall.compat_utime.return = dw_syscall.compat_utime.return !,
 probe dw_syscall.compat_utime = kernel.function("compat_sys_utime").call ?
 {
        @_SYSCALL_UTIME_NAME
-       filename_uaddr = $filename
-       filename = user_string_quoted($filename)
-       buf_uaddr = $t
+       filename_uaddr = @__pointer($filename)
+       filename = user_string_quoted(filename_uaddr)
+       buf_uaddr = @__pointer($t)
        actime = _struct_compat_utimbuf_actime(buf_uaddr)
        modtime = _struct_compat_utimbuf_modtime(buf_uaddr)
        @_SYSCALL_UTIME_ARGSTR
index f540ddae5db55456dea97aa8980224e18b0cba31..ded3e0f3179c2f12575b091c1c77f32ec5c46929 100644 (file)
@@ -77,9 +77,9 @@ probe dw_syscall.compat_utimensat = kernel.function("compat_sys_utimensat").call
        @_SYSCALL_UTIMENSAT_NAME
        dfd = __int32($dfd)
        dfd_str = _dfd_str(__int32($dfd))
-       filename_uaddr = $filename
-       filename = user_string_quoted($filename)
-       tsp_uaddr = $t
+       filename_uaddr = @__pointer($filename)
+       filename = user_string_quoted(filename_uaddr)
+       tsp_uaddr = @__pointer($t)
        tsp_str = _struct_compat_timespec_u(tsp_uaddr, 2)
        flags = __int32($flags)
        flags_str = _at_flag_str(__int32($flags))
index b05c9eaf7f6735cbaed58fbb0eb47524e183cfb7..ae96773186d0893ad4829e8fcfa5f24fa358b719 100644 (file)
@@ -67,8 +67,8 @@ probe syscall.compat_sys_utimes.return = dw_syscall.compat_sys_utimes.return !,
 probe dw_syscall.compat_sys_utimes = kernel.function("compat_sys_utimes").call ?
 {
        @_SYSCALL_UTIMES_NAME
-       filename = user_string_quoted($filename)
-       timeval = $t
+       filename = user_string_quoted(@__pointer($filename))
+       timeval = @__pointer($t)
        tvp_uaddr_str = _struct_compat_timeval_u(timeval, 2)
        @_SYSCALL_UTIMES_ARGSTR
 }
index 2e02f50151466d677b749fa0aa42a56884d3d6f0..7bc956a619bc1a04ce4c8d88f98ccfcccfdf2b04 100644 (file)
@@ -22,7 +22,8 @@ probe syscall.write.return = dw_syscall.write.return !, nd_syscall.write.return
 
 probe dw_syscall.write =
 %( arch == "s390" %?
-       __syscall.write, kernel.function("sys32_write").call ?
+       __syscall.write, kernel.function("sys32_write").call ?,
+       kernel.function("compat_sys_s390_write").call ?
 %:
        __syscall.write
 %)
@@ -30,7 +31,7 @@ probe dw_syscall.write =
        @_SYSCALL_WRITE_NAME
        fd = __int32($fd)
        buf_uaddr = $buf
-       count = __ulong($count)
+       count = @__compat_ulong($count)
        buf_str = user_buffer_quoted(buf_uaddr, count, syscall_string_trunc)
        @_SYSCALL_WRITE_ARGSTR
 }
@@ -42,7 +43,8 @@ probe __syscall.write = kernel.function("sys_write").call
 }
 probe dw_syscall.write.return =
 %( arch == "s390" %?
-       __syscall.write.return, kernel.function("sys32_write").return ?
+       __syscall.write.return, kernel.function("sys32_write").return ?,
+       kernel.function("compat_sys_s390_write").return ?
 %:
        __syscall.write.return
 %)
@@ -61,7 +63,8 @@ probe __syscall.write.return = kernel.function("sys_write").return
 
 probe nd_syscall.write =
 %( arch == "s390" %?
-       __nd_syscall.write, kprobe.function("sys32_write").call ?
+       __nd_syscall.write, kprobe.function("sys32_write") ?,
+       kprobe.function("compat_sys_s390_write") ?
 %:
        __nd_syscall.write
 %)
@@ -82,7 +85,8 @@ probe __nd_syscall.write = kprobe.function("sys_write")
 }
 probe nd_syscall.write.return =
 %( arch == "s390" %?
-       __nd_syscall.write.return, kprobe.function("sys32_write").return ?
+       __nd_syscall.write.return, kprobe.function("sys32_write").return ?,
+       kprobe.function("compat_sys_s390_write").return ?
 %:
        __nd_syscall.write.return
 %)
index f23da2c7a61f35009953240c95e9976f4f45e250..764d1fbb020747601222ff88980ee1e0ae445ef4 100644 (file)
@@ -8,6 +8,32 @@
 #include <string.h>
 #include <inttypes.h>
 
+inline int __io_setup(unsigned nr_events, aio_context_t *ctx_idp)
+{
+       return syscall(__NR_io_setup, nr_events, ctx_idp);
+}
+
+inline int __io_submit(aio_context_t ctx_id, long nr, struct iocb **iocbpp)
+{
+       return syscall(__NR_io_submit, ctx_id, nr, iocbpp);
+}
+
+inline int __io_getevents(aio_context_t ctx_id, long min_nr, long nr,
+                        struct io_event *events, struct timespec *timeout)
+{
+       return syscall(__NR_io_getevents, ctx_id, min_nr, nr, events, timeout);
+}
+
+inline int __io_cancel(aio_context_t ctx_id, struct iocb *iocb,
+                     struct io_event *result)
+{
+       return syscall(__NR_io_cancel, ctx_id, iocb, result);
+}
+
+inline int __io_destroy(aio_context_t ctx_id)
+{
+       return syscall(__NR_io_destroy, ctx_id);
+}
 
 int main() {
        aio_context_t ctx;
@@ -23,7 +49,7 @@ int main() {
 
        // ----- test normal operation
 
-       ret = syscall(__NR_io_setup, 128, &ctx);
+       ret = __io_setup(128, &ctx);
        //staptest// io_setup (128, XXXX) = NNNN
        if (ret < 0) {
                perror("io_setup failed");
@@ -39,18 +65,18 @@ int main() {
        cb.aio_nbytes = 8;
        cbs[0] = &cb;
 
-       ret = syscall(__NR_io_submit, ctx, 1, cbs);
+       ret = __io_submit(ctx, 1, cbs);
         //staptest// io_submit (NNNN, 1, XXXX) = NNNN
        if (ret != 1) {
                perror("io_sumbit failed");
                return  -1;
        }
 
-       ret = syscall(__NR_io_getevents, ctx, 1, 1, events, NULL);
+       ret = __io_getevents(ctx, 1, 1, events, NULL);
         //staptest// io_getevents (NNNN, 1, 1, XXXX, NULL) = NNNN
        printf("%d\n", ret);
 
-       ret = syscall(__NR_io_destroy, ctx);
+       ret = __io_destroy(ctx);
         //staptest// io_destroy (NNNN) = NNNN
        if (ret < 0) {
                perror("io_destroy failed");
@@ -60,85 +86,85 @@ int main() {
 
        // ----- test nasty things
 
-        syscall(__NR_io_setup, (unsigned)-1, &ctx);
+        __io_setup((unsigned)-1, &ctx);
         //staptest// io_setup (4294967295, XXXX) = NNNN
 
-        syscall(__NR_io_setup, 1, (aio_context_t *)-1);
+        __io_setup(1, (aio_context_t *)-1);
 #ifdef __s390__
         //staptest// io_setup (1, 0x[7]?[f]+) = NNNN
 #else
         //staptest// io_setup (1, 0x[f]+) = NNNN
 #endif
 
-        syscall(__NR_io_submit, (aio_context_t)-1, 1, cbs);
+        __io_submit((aio_context_t)-1, 1, cbs);
 #if __WORDSIZE == 64
         //staptest// io_submit (18446744073709551615, 1, XXXX) = NNNN
 #else
         //staptest// io_submit (4294967295, 1, XXXX) = NNNN
 #endif
 
-        syscall(__NR_io_submit, 0, (long)-1, cbs);
+        __io_submit(0, (long)-1, cbs);
         //staptest// io_submit (0, -1, XXXX) = NNNN
 
-        syscall(__NR_io_submit, 0, 1, (struct iocb **)-1);
+        __io_submit(0, 1, (struct iocb **)-1);
 #ifdef __s390__
         //staptest// io_submit (0, 1, 0x[7]?[f]+) = NNNN
 #else
         //staptest// io_submit (0, 1, 0x[f]+) = NNNN
 #endif
 
-        syscall(__NR_io_getevents, (aio_context_t)-1, 1, 1, events, NULL);
+        __io_getevents((aio_context_t)-1, 1, 1, events, NULL);
 #if __WORDSIZE == 64
         //staptest// io_getevents (18446744073709551615, 1, 1, XXXX, NULL) = NNNN
 #else
         //staptest// io_getevents (4294967295, 1, 1, XXXX, NULL) = NNNN
 #endif
 
-        syscall(__NR_io_getevents, 0, (long)-1, 1, events, NULL);
+        __io_getevents(0, (long)-1, 1, events, NULL);
         //staptest// io_getevents (0, -1, 1, XXXX, NULL) = NNNN
 
-        syscall(__NR_io_getevents, 0, 1, (long)-1, events, NULL);
+        __io_getevents(0, 1, (long)-1, events, NULL);
         //staptest// io_getevents (0, 1, -1, XXXX, NULL) = NNNN
 
-        syscall(__NR_io_getevents, 0, 1, 1, (struct io_event *)-1, NULL);
+        __io_getevents(0, 1, 1, (struct io_event *)-1, NULL);
 #ifdef __s390__
         //staptest// io_getevents (0, 1, 1, 0x[7]?[f]+, NULL) = NNNN
 #else
         //staptest// io_getevents (0, 1, 1, 0x[f]+, NULL) = NNNN
 #endif
 
-        syscall(__NR_io_getevents, 0, 1, 1, events, (struct timespec *)-1);
+        __io_getevents(0, 1, 1, events, (struct timespec *)-1);
 #ifdef __s390__
         //staptest// io_getevents (0, 1, 1, XXXX, 0x[7]?[f]+) = NNNN
 #else
         //staptest// io_getevents (0, 1, 1, XXXX, 0x[f]+) = NNNN
 #endif
 
-        syscall(__NR_io_cancel, 1, (struct iocb *)1, (struct io_event *)1);
+        __io_cancel(1, (struct iocb *)1, (struct io_event *)1);
         //staptest// io_cancel (1, 0x1, 0x1) = NNNN
 
-        syscall(__NR_io_cancel, (aio_context_t)-1, (struct iocb *)1, (struct io_event *)1);
+        __io_cancel((aio_context_t)-1, (struct iocb *)1, (struct io_event *)1);
 #if __WORDSIZE == 64
         //staptest// io_cancel (18446744073709551615, 0x1, 0x1) = NNNN
 #else
         //staptest// io_cancel (4294967295, 0x1, 0x1) = NNNN
 #endif
 
-        syscall(__NR_io_cancel, 1, (struct iocb *)-1, (struct io_event *)1);
+       __io_cancel(1, (struct iocb *)-1, (struct io_event *)1);
 #ifdef __s390__
         //staptest// io_cancel (1, 0x[7]?[f]+, 0x1) = NNNN
 #else
         //staptest// io_cancel (1, 0x[f]+, 0x1) = NNNN
 #endif
 
-        syscall(__NR_io_cancel, 1, (struct iocb *)1, (struct io_event *)-1);
+        __io_cancel(1, (struct iocb *)1, (struct io_event *)-1);
 #ifdef __s390__
         //staptest// io_cancel (1, 0x1, 0x[7]?[f]+) = NNNN
 #else
         //staptest// io_cancel (1, 0x1, 0x[f]+) = NNNN
 #endif
 
-       ret = syscall(__NR_io_destroy, (aio_context_t)-1);
+       __io_destroy((aio_context_t)-1);
 #if __WORDSIZE == 64
         //staptest// io_destroy (18446744073709551615) = NNNN
 #else
index 4c539cf4a0d13bc3ca01b44869d93ea449868046..1ac1a62e4a85c55764aeb88841b08445ad06d535 100644 (file)
@@ -47,7 +47,7 @@ int main()
 #endif
 
   settimeofday(&tv, NULL);
-  //staptest// settimeofday (\[NNNN.NNNN\], NULL) =
+  //staptest// settimeofday (\[NNNN.NNNN\], NULL) = NNNN
 
   settimeofday((struct timeval *)-1, NULL);
 #ifdef __s390__
index a0271b0225b32ed1a2dfdd18c61621f46966b659..5e16f4ad97bf65b1f526632e474cebb634395dfe 100644 (file)
@@ -48,7 +48,7 @@ int main ()
     copy_file_range(-1, &off_in, fd_out, &off_out, buf_size, 0);
     //staptest// copy_file_range (-1, XXXX, NNNN, XXXX, 59, 0x0) = -NNNN
 
-    copy_file_range(fd_in, (off_t*)-1, fd_out, &off_out, buf_size, 0);
+    copy_file_range(fd_in, (loff_t*)-1, fd_out, &off_out, buf_size, 0);
 #ifdef __s390__
     //staptest// copy_file_range (NNNN, 0x[7]?[f]+, NNNN, XXXX, 59, 0x0) = -NNNN
 #else
@@ -58,20 +58,24 @@ int main ()
     copy_file_range(fd_in, &off_in, -1, &off_out, buf_size, 0);
     //staptest// copy_file_range (NNNN, XXXX, -1, XXXX, 59, 0x0) = -NNNN
 
-    copy_file_range(fd_in, &off_in, fd_out, (off_t*)-1, buf_size, 0);
+    copy_file_range(fd_in, &off_in, fd_out, (loff_t*)-1, buf_size, 0);
 #ifdef __s390__
     //staptest// copy_file_range (NNNN, XXXX, NNNN, 0x[7]?[f]+, 59, 0x0) = -NNNN
 #else
     //staptest// copy_file_range (NNNN, XXXX, NNNN, 0x[f]+, 59, 0x0) = -NNNN
 #endif
 
-    copy_file_range(fd_in, &off_in, fd_out, &off_out, -1, 0);
-    //staptest// copy_file_range (NNNN, XXXX, NNNN, XXXX, -1, 0x0) = -NNNN
+    copy_file_range(fd_in, &off_in, fd_out, &off_out, -1L, 0);
+#if __WORDSIZE == 64
+    //staptest// copy_file_range (NNNN, XXXX, NNNN, XXXX, 18446744073709551615, 0x0) = NNNN
+#else
+    //staptest// copy_file_range (NNNN, XXXX, NNNN, XXXX, 4294967295, 0x0) = NNNN
+#endif
 
     /* Note: flags is unused and should be set to 0, otherwise an
      * error occurs. This may change if the syscall is developed. */
     copy_file_range(fd_in, &off_in, fd_out, &off_out, buf_size, -1);
-    //staptest// copy_file_range (NNNN, XXXX, NNNN, XXXX, 59, 0xffffffff) = -NNNN
+    //staptest// copy_file_range (NNNN, XXXX, NNNN, XXXX, 59, 0xffffffff) = NNNN
 
     close(fd_out);
     close(fd_in);
index dd31740e22d400c8078d1dcf567133d32861790d..6ef7cd903f2ae80476ed636a4e2fca5762eebae4 100644 (file)
@@ -108,4 +108,5 @@ int main()
     //staptest// fadvise64 (NNNN, 0, 1024, 0x[f]+) = NNNN
 #endif
     close(fd);
+    return 0;
 }
index bdaca03b57eec080c38522d92a6fe064f4026605..a61620185d45370413d5e6b111815bcbb9ea5970 100644 (file)
@@ -38,4 +38,5 @@ int main()
   //staptest// getgroups (NNNN, 0x[f]+) = NNNN
 #endif
 #endif
+  return 0;
 }
index 242ced97871355d4a0e988c595a6cf2d84d06218..9aef9c99e9e5420ad5fa54675412d749b2938b47 100644 (file)
@@ -3,8 +3,19 @@
 #define _GNU_SOURCE
 #include <unistd.h>
 #include <sys/syscall.h>
+
 #ifdef __NR_ioperm
-#include <sys/io.h>
+static inline int __ioperm(unsigned long from, unsigned long num, int turn_on)
+{
+    return syscall(__NR_ioperm, from, num, turn_on);
+}
+#endif
+
+#ifdef __NR_iopl
+static inline int __iopl(int level)
+{
+    return syscall(__NR_iopl, level);
+}
 #endif
 
 // ENOSYS expected on s390 (31-on-64) and on powerpc
 int main() {
 
 #ifdef __NR_ioperm
-    syscall(__NR_ioperm, 1060, 1, 1);
+    __ioperm(1060, 1, 1);
 #if defined(__powerpc__) || defined(__s390__)
     //staptest// ni_syscall () = -38 (ENOSYS)
 #else
     //staptest// ioperm (0x424, 0x1, 0x1) = NNNN
 #endif
 
-    syscall(__NR_ioperm, (unsigned long)-1, 1, 1);
+    __ioperm((unsigned long)-1, 1, 1);
 #if defined(__powerpc__) || defined(__s390__)
     //staptest// ni_syscall () = -38 (ENOSYS)
 #else
@@ -30,7 +41,7 @@ int main() {
 #endif
 #endif
 
-    syscall(__NR_ioperm, 1060, (unsigned long)-1, 1);
+    __ioperm(1060, (unsigned long)-1, 1);
 #if defined(__powerpc__) || defined(__s390__)
     //staptest// ni_syscall () = -38 (ENOSYS)
 #else
@@ -41,7 +52,7 @@ int main() {
 #endif
 #endif
 
-    syscall(__NR_ioperm, 1060, 1, (int)-1);
+    __ioperm(1060, 1, -1);
 #if defined(__powerpc__) || defined(__s390__)
     //staptest// ni_syscall () = -38 (ENOSYS)
 #else
@@ -54,12 +65,10 @@ int main() {
     // its args vary between those two archs. Not all are
     // being addressed in the tapset.
 
-#define iopl(x) syscall(__NR_iopl,x)
-    
-    iopl(3);
+    __iopl(3);
     //staptest// iopl (3) = NNNN
 
-    iopl(-1);
+    __iopl(-1);
     //staptest// iopl (4294967295) = NNNN
 #endif
 
index 63c69b86f889bd3931e6f68c28d1bbef35abccb3..3738396637379193530324b9e141d1aa2a885f48 100644 (file)
@@ -20,8 +20,12 @@ int main()
    syscall(__NR_memfd_create, (size_t)-1, MFD_CLOEXEC|MFD_ALLOW_SEALING);
 #if __WORDSIZE == 64
    //staptest// [[[[memfd_create (0x[16]?[f]+, MFD_CLOEXEC|MFD_ALLOW_SEALING)!!!!ni_syscall ()]]]] = -NNNN
+#else
+#ifdef __s390__
+   //staptest// [[[[memfd_create (0x[7]?[f]+, MFD_CLOEXEC|MFD_ALLOW_SEALING)!!!!ni_syscall ()]]]] = -NNNN
 #else
    //staptest// [[[[memfd_create (0x[8]?[f]+, MFD_CLOEXEC|MFD_ALLOW_SEALING)!!!!ni_syscall ()]]]] = -NNNN
+#endif
 #endif
    syscall(__NR_memfd_create,"memfd_create1", -1);
    //staptest// [[[[memfd_create ("memfd_create1", MFD_[^ ]+|XXXX)!!!!ni_syscall ()]]]] = -NNNN
index c986f4ebed80db092c8913898df7e20861af1e67..533414799f5d98c97856255f5f4fccd0aeeb7c7a 100644 (file)
 #define PTRACE_SETFPREGS PT_SETFPREGS
 #endif
 
+/* Sigh. On s390x, the user headers have the PTRACE_GETREGS and
+ * PTRACE_SINGLEBLOCK constants with the same value. The kernel only
+ * supports PTRACE_SINGLEBLOCK. Fix this. */
+#if ((defined(__s390__) || defined(__s390x__)) && defined(PTRACE_GETREGS) \
+     && defined(PTRACE_SINGLEBLOCK))
+#undef PTRACE_GETREGS
+#endif
+
 static void do_child(void)
 {
     struct sigaction child_act;
index f7d2d9465e30b993104fad45f0c72102951da825..fe7077e4e6eda2273a7d456281d771d709ab70ef 100644 (file)
@@ -39,7 +39,7 @@ int main() {
 
     __readdir(fd, (void *)-1, 0);
 #ifdef __s390__
-    //staptest// [[[[readdir (NNNN, 0x7[f]+, 0)!!!!ni_syscall ()]]]] = NNNN
+    //staptest// [[[[readdir (NNNN, 0x[7]?[f]+, 0)!!!!ni_syscall ()]]]] = NNNN
 #else
     //staptest// [[[[readdir (NNNN, 0x[f]+, 0)!!!!ni_syscall ()]]]] = NNNN
 #endif
index 062b062d1b247d0b30937b0a920e1069c016b1b0..4683e04143e75da735f55f3d60370bd33f8e571c 100644 (file)
@@ -44,7 +44,11 @@ int main()
     //staptest// [[[[sched_getattr (-1, NULL, 0, 0)!!!!ni_syscall ()]]]] = -NNNN
 
     __sched_getattr(0, (void *)-1, 0, 0);
+#ifdef __s390__
+    //staptest// [[[[sched_getattr (0, 0x[7]?[f]+, 0, 0)!!!!ni_syscall ()]]]] = -NNNN
+#else
     //staptest// [[[[sched_getattr (0, 0x[f]+, 0, 0)!!!!ni_syscall ()]]]] = -NNNN
+#endif
 
     __sched_getattr(0, 0, -1, 0);
     //staptest// [[[[sched_getattr (0, NULL, 4294967295, 0)!!!!ni_syscall ()]]]] = -NNNN
@@ -56,7 +60,11 @@ int main()
     //staptest// [[[[sched_setattr (-1, NULL, 0)!!!!ni_syscall ()]]]] = -NNNN
 
     __sched_setattr(0, (void *)-1, 0);
+#ifdef __s390__
+    //staptest// [[[[sched_setattr (0, 0x[7]?[f]+, 0)!!!!ni_syscall ()]]]] = -NNNN
+#else
     //staptest// [[[[sched_setattr (0, 0x[f]+, 0)!!!!ni_syscall ()]]]] = -NNNN
+#endif
 
     __sched_setattr(0, NULL, -1);
     //staptest// [[[[sched_setattr (0, NULL, 4294967295)!!!!ni_syscall ()]]]] = -NNNN
index 86892f4ebb71a45591eef35c9e0ed7c0db3c883c..c3ee20b132b9406e56ad6f096d35deb246a55ebb 100644 (file)
 #include <linux/signal.h>
 #include <sys/ptrace.h>
 
+// Some versions of <linux/seccomp.h> don't define SECCOMP_SET_MODE_FILTER.
+#ifndef SECCOMP_SET_MODE_FILTER
+#define SECCOMP_SET_MODE_FILTER 1
+#endif
+
 struct sock_filter filter[] = {
     BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
 };
@@ -29,18 +34,22 @@ static inline int __seccomp(unsigned int operation, unsigned int flags, void *ar
 int main()
 {
     __seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog);
-    //staptest// seccomp (SECCOMP_SET_MODE_FILTER, 0x0, XXXX) = NNNN
+    //staptest// [[[[seccomp (SECCOMP_SET_MODE_FILTER, 0x0, XXXX)!!!!ni_syscall ()]]]] = NNNN
 
     // Limit testing
 
     __seccomp(-1, 0, NULL);
-    //staptest// seccomp (0x[f]+, 0x0, 0x0) = -NNNN
+    //staptest// [[[[seccomp (0x[f]+, 0x0, 0x0)!!!!ni_syscall ()]]]] = -NNNN
 
     __seccomp(SECCOMP_SET_MODE_FILTER, -1, NULL);
-    //staptest// seccomp (SECCOMP_SET_MODE_FILTER, 0x[f]+, 0x0) = -NNNN
+    //staptest// [[[[seccomp (SECCOMP_SET_MODE_FILTER, 0x[f]+, 0x0)!!!!ni_syscall ()]]]] = -NNNN
 
     __seccomp(SECCOMP_SET_MODE_FILTER, 0, (void *)-1);
-    //staptest// seccomp (SECCOMP_SET_MODE_FILTER, 0x0, 0x[f]+) = -NNNN
+#ifdef __s390__
+    //staptest// [[[[seccomp (SECCOMP_SET_MODE_FILTER, 0x0, 0x[7]?[f]+)!!!!ni_syscall ()]]]] = -NNNN
+#else
+    //staptest// [[[[seccomp (SECCOMP_SET_MODE_FILTER, 0x0, 0x[f]+)!!!!ni_syscall ()]]]] = -NNNN
+#endif
 
     return 0;
 }
index 762e1af1ce3937b20ca29f4caae1878d4d5ff562..11785227995a14a0b7251a472300d92555aec929 100644 (file)
@@ -86,16 +86,24 @@ int main()
   //staptest// statx (-1, "foobar", AT_SYMLINK_NOFOLLOW, AT_STATX_FORCE_SYNC, XXXX) = -NNNN (EBADF)
 
   statx(AT_FDCWD, (const char *)-1, AT_SYMLINK_NOFOLLOW, AT_STATX_FORCE_SYNC, &stx);
+#ifdef __s390__
+  //staptest// statx (AT_FDCWD, 0x[7]?[f]+, AT_SYMLINK_NOFOLLOW, AT_STATX_FORCE_SYNC, XXXX) = -NNNN (EFAULT)
+#else
   //staptest// statx (AT_FDCWD, 0x[f]+, AT_SYMLINK_NOFOLLOW, AT_STATX_FORCE_SYNC, XXXX) = -NNNN (EFAULT)
+#endif
 
   statx(AT_FDCWD, "foobar", (unsigned)-1, AT_STATX_FORCE_SYNC, &stx);
   //staptest// statx (AT_FDCWD, "foobar", AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|XXXX, AT_STATX_FORCE_SYNC, XXXX) = -NNNN (EINVAL)
 
   statx(AT_FDCWD, "foobar", AT_SYMLINK_NOFOLLOW, (unsigned)-1, &stx);
-  //staptest// statx (AT_FDCWD, "foobar", AT_SYMLINK_NOFOLLOW, 0x[f]+, XXXX) = 0
+  //staptest// statx (AT_FDCWD, "foobar", AT_SYMLINK_NOFOLLOW, 0x[f]+, XXXX) = NNNN
 
   statx(AT_FDCWD, "foobar", AT_SYMLINK_NOFOLLOW, AT_STATX_FORCE_SYNC, (struct statx *)-1);
+#ifdef __s390__
+  //staptest// statx (AT_FDCWD, "foobar", AT_SYMLINK_NOFOLLOW, AT_STATX_FORCE_SYNC, 0x[7]?[f]+) = -NNNN (EFAULT)
+#else
   //staptest// statx (AT_FDCWD, "foobar", AT_SYMLINK_NOFOLLOW, AT_STATX_FORCE_SYNC, 0x[f]+) = -NNNN (EFAULT)
+#endif
 #endif
 
   close(fd);
index ca778c310cd168ccf9cf70bf473fdc13a0f0a4ad..ade3aeb0342edfe823d9aeec8e2ca19cb1991f58 100644 (file)
@@ -56,7 +56,7 @@ probe init {
 %)
 
 %( arch == "x86_64" %?
-    __syscall_map["ni_syscall"] = ",get_thread_area,kcmp,nfsservctl,set_thread_area,uselib,"
+    __syscall_map["ni_syscall"] = ",bpf,get_thread_area,kcmp,nfsservctl,set_thread_area,uselib,"
 %)
 
 %( arch == "arm" %?
@@ -64,15 +64,15 @@ probe init {
 %)
 
 %( arch == "arm64" %?
-    __syscall_map["ni_syscall"] = ",get_mempolicy,kcmp,mbind,migrate_pages,move_pages,set_mempolicy,"
+    __syscall_map["ni_syscall"] = ",bpf,get_mempolicy,kcmp,mbind,migrate_pages,move_pages,set_mempolicy,"
 %)
 
 %( arch == "powerpc" %?
-    __syscall_map["ni_syscall"] = ",execveat,getrandom,kcmp,memfd_create,olduname,oldolduname,readdir,renameat2,sched_getattr,sched_setattr,sigaction,signalfd4,sigpending,sigprocmask,kexec_file_load,"
+    __syscall_map["ni_syscall"] = ",bpf,execveat,getrandom,ioperm,kcmp,memfd_create,nfsservctl,olduname,oldolduname,readdir,renameat2,sched_getattr,sched_setattr,seccomp,sigaction,signalfd4,sigpending,sigprocmask,kexec_file_load,uselib,"
 %)
 
 %( arch == "s390" %?
-    __syscall_map["ni_syscall"] = ",kcmp,readdir,nfsservctl,"
+    __syscall_map["ni_syscall"] = ",bpf,get_mempolicy,ioperm,kcmp,mbind,migrate_pages,move_pages,nfsservctl,readdir,set_mempolicy,uselib,userfaultfd,"
 %)
 
 }
index 5830b8d017184116d465ec642afe4aafe7820999..1ed70eb1884557a9d47c39f268ac215622b9036e 100644 (file)
@@ -22,7 +22,7 @@ int main()
 
     uselib((const char *)-1);
 #ifdef __s390__
-    //staptest// uselib (0x[7]?[f]+) = -NNNN
+    //staptest// [[[[uselib (0x[7]?[f]+)!!!!ni_syscall ()]]]] = -NNNN
 #else
     //staptest// [[[[uselib (0x[f]+) = -NNNN!!!!ni_syscall () = -NNNN (ENOSYS)]]]]
 #endif
index 946d1aead5c95e85005fa7a7a56f512879f939d3..943dcdba5552b71a10823091349999e826d99cb7 100644 (file)
@@ -26,7 +26,7 @@ int main()
     struct uffdio_api api;
 
     fd = userfaultfd(0);
-    //staptest// userfaultfd (0x0) = NNNN
+    //staptest// [[[[userfaultfd (0x0)!!!!ni_syscall ()]]]] = NNNN
 
     // userfaulfd API sanity check
     memset(&api, 0, sizeof(api));
@@ -36,10 +36,10 @@ int main()
     //staptest// ioctl (NNNN, NNNN, XXXX) = NNNN
 
     close(fd);
-    //staptest// close (NNNN) = 0
+    //staptest// close (NNNN) = NNNN
 
     fd = userfaultfd(-1);
-    //staptest// userfaultfd (O_[^ ]+|XXXX) = -NNNN
+    //staptest// [[[[userfaultfd (O_[^ ]+|XXXX)!!!!ni_syscall ()]]]] = -NNNN
 #endif
     return 0;
 }
This page took 0.265724 seconds and 5 git commands to generate.