]> sourceware.org Git - systemtap.git/commitdiff
PR20333/sysctl
authorMartin Cermak <mcermak@redhat.com>
Tue, 3 Jan 2017 11:09:58 +0000 (12:09 +0100)
committerMartin Cermak <mcermak@redhat.com>
Tue, 3 Jan 2017 11:09:58 +0000 (12:09 +0100)
tapset/linux/nd_syscalls2.stp
tapset/linux/sysc_sysctl.stp [new file with mode: 0644]
tapset/linux/syscalls2.stp

index c743c43d5df36b26b205153e84c5ffb19dbbe41c..9bb1f31f20f44fb3088863bef1aef3ca19f47f4e 100644 (file)
@@ -1,22 +1,4 @@
 
-# sysctl _____________________________________________________
-#
-# long sys_sysctl(struct __sysctl_args __user *args)
-#
-probe nd_syscall.sysctl = kprobe.function("compat_sys_sysctl") ?,
-                          kprobe.function("sys_sysctl") ?
-{
-       name = "sysctl"
-       asmlinkage()
-       argstr = sprintf("%p", pointer_arg(1))
-}
-probe nd_syscall.sysctl.return = kprobe.function("compat_sys_sysctl").return ?,
-                                 kprobe.function("sys_sysctl").return ?
-{
-       name = "sysctl"
-       retstr = returnstr(1)
-}
-
 # sysfs ______________________________________________________
 #
 # asmlinkage long
diff --git a/tapset/linux/sysc_sysctl.stp b/tapset/linux/sysc_sysctl.stp
new file mode 100644 (file)
index 0000000..f6028cd
--- /dev/null
@@ -0,0 +1,50 @@
+# sysctl _____________________________________________________
+#
+# long sys_sysctl(struct __sysctl_args __user *args)
+#
+
+@define _SYSCALL_SYSCTL_NAME
+%(
+       name = "sysctl"
+%)
+
+@define _SYSCALL_SYSCTL_ARGSTR
+%(
+       argstr = sprintf("%p", args)
+%)
+
+probe syscall.sysctl = dw_syscall.sysctl !, nd_syscall.sysctl {}
+probe syscall.sysctl.return = dw_syscall.sysctl.return !, nd_syscall.sysctl.return {}
+
+# dw_sysctl _____________________________________________________
+
+probe dw_syscall.sysctl = kernel.function("compat_sys_sysctl").call ?,
+                          kernel.function("sys_sysctl").call ?
+{
+       @_SYSCALL_SYSCTL_NAME
+       args = $args
+       @_SYSCALL_SYSCTL_ARGSTR
+}
+probe dw_syscall.sysctl.return = kernel.function("compat_sys_sysctl").return ?,
+                                 kernel.function("sys_sysctl").return ?
+{
+       @_SYSCALL_SYSCTL_NAME
+       retstr = return_str(1, $return)
+}
+
+# nd_sysctl _____________________________________________________
+
+probe nd_syscall.sysctl = kprobe.function("compat_sys_sysctl") ?,
+                          kprobe.function("sys_sysctl") ?
+{
+       @_SYSCALL_SYSCTL_NAME
+       asmlinkage()
+       args = pointer_arg(1)
+       @_SYSCALL_SYSCTL_ARGSTR
+}
+probe nd_syscall.sysctl.return = kprobe.function("compat_sys_sysctl").return ?,
+                                 kprobe.function("sys_sysctl").return ?
+{
+       @_SYSCALL_SYSCTL_NAME
+       retstr = returnstr(1)
+}
index 1996330f5471f558c5b15091e2d2789161743018..fef0cb2def8a5b026445b18a6be66ec443a8921d 100644 (file)
@@ -1,21 +1,4 @@
 
-# sysctl _____________________________________________________
-#
-# long sys_sysctl(struct __sysctl_args __user *args)
-#
-probe syscall.sysctl = kernel.function("compat_sys_sysctl").call ?,
-                       kernel.function("sys_sysctl").call ?
-{
-       name = "sysctl"
-       argstr = sprintf("%p", $args)
-}
-probe syscall.sysctl.return = kernel.function("compat_sys_sysctl").return ?,
-                              kernel.function("sys_sysctl").return ?
-{
-       name = "sysctl"
-       retstr = return_str(1, $return)
-}
-
 # sysfs ______________________________________________________
 #
 # asmlinkage long
This page took 0.028868 seconds and 5 git commands to generate.