]> sourceware.org Git - systemtap.git/commitdiff
PR20333/fremovexattr
authorMartin Cermak <mcermak@redhat.com>
Thu, 22 Dec 2016 17:01:47 +0000 (18:01 +0100)
committerMartin Cermak <mcermak@redhat.com>
Thu, 22 Dec 2016 17:01:47 +0000 (18:01 +0100)
tapset/linux/nd_syscalls.stp
tapset/linux/sysc_fremovexattr.stp [new file with mode: 0644]
tapset/linux/syscalls.stp

index eadfa98b5b3fca089cdc53d6a0b8f64c758788a2..8f38fecd2ce2428329c01bae7617e770d14a4b5c 100644 (file)
@@ -1,26 +1,4 @@
 
-# fremovexattr _______________________________________________
-# long sys_fremovexattr(int fd, char __user *name)
-probe nd_syscall.fremovexattr = kprobe.function("sys_fremovexattr") ?
-{
-       name = "fremovexattr"
-       asmlinkage()
-       filedes = int_arg(1)
-
-# 'name2' should have been 'name_str'.  Deprecate the old name.
-%(systemtap_v <= "1.4" %?
-       name2 = user_string_quoted(pointer_arg(2))
-%)
-       name_uaddr = pointer_arg(2)
-       name_str = user_string_quoted(pointer_arg(2))
-       argstr = sprintf("%d, %s", filedes, user_string_quoted(pointer_arg(2)))
-}
-probe nd_syscall.fremovexattr.return = kprobe.function("sys_fremovexattr").return ?
-{
-       name = "fremovexattr"
-       retstr = returnstr(1)
-}
-
 # fsetxattr __________________________________________________
 /*
  * asmlinkage long
diff --git a/tapset/linux/sysc_fremovexattr.stp b/tapset/linux/sysc_fremovexattr.stp
new file mode 100644 (file)
index 0000000..1ba0b85
--- /dev/null
@@ -0,0 +1,48 @@
+# fremovexattr _______________________________________________
+# long sys_fremovexattr(int fd, char __user *name)
+
+@define _SYSCALL_FREMOVEXATTR_NAME
+%(
+       name = "fremovexattr"
+%)
+
+@define _SYSCALL_FREMOVEXATTR_ARGSTR
+%(
+       argstr = sprintf("%d, %s", filedes, name_str)
+%)
+
+probe syscall.fremovexattr = dw_syscall.fremovexattr !, nd_syscall.fremovexattr {}
+probe syscall.fremovexattr.return = dw_syscall.fremovexattr.return !, nd_syscall.fremovexattr.return {}
+
+# dw_fremovexattr _____________________________________________________
+
+probe dw_syscall.fremovexattr = kernel.function("sys_fremovexattr").call
+{
+       @_SYSCALL_FREMOVEXATTR_NAME
+       filedes = __int32($fd)
+       name_uaddr = $name
+       name_str = user_string_quoted($name)
+       @_SYSCALL_FREMOVEXATTR_ARGSTR
+}
+probe dw_syscall.fremovexattr.return = kernel.function("sys_fremovexattr").return
+{
+       @_SYSCALL_FREMOVEXATTR_NAME
+       retstr = return_str(1, $return)
+}
+
+# nd_fremovexattr _____________________________________________________
+
+probe nd_syscall.fremovexattr = kprobe.function("sys_fremovexattr") ?
+{
+       @_SYSCALL_FREMOVEXATTR_NAME
+       asmlinkage()
+       filedes = int_arg(1)
+       name_uaddr = pointer_arg(2)
+       name_str = user_string_quoted(pointer_arg(2))
+       @_SYSCALL_FREMOVEXATTR_ARGSTR
+}
+probe nd_syscall.fremovexattr.return = kprobe.function("sys_fremovexattr").return ?
+{
+       @_SYSCALL_FREMOVEXATTR_NAME
+       retstr = returnstr(1)
+}
index 1eaf92f07018756ad276fb8f190dba97fb1d82bf..a8a7d1e59c6791df886f19d118ea978c8cb22e0d 100644 (file)
@@ -1,20 +1,4 @@
 
-# fremovexattr _______________________________________________
-# long sys_fremovexattr(int fd, char __user *name)
-probe syscall.fremovexattr = kernel.function("sys_fremovexattr").call
-{
-       name = "fremovexattr"
-       filedes = __int32($fd)
-       name_uaddr = $name
-       name_str = user_string_quoted($name)
-       argstr = sprintf("%d, %s", __int32($fd), user_string_quoted($name))
-}
-probe syscall.fremovexattr.return = kernel.function("sys_fremovexattr").return
-{
-       name = "fremovexattr"
-       retstr = return_str(1, $return)
-}
-
 # fsetxattr __________________________________________________
 /*
  * asmlinkage long
This page took 0.032523 seconds and 5 git commands to generate.