]> sourceware.org Git - systemtap.git/commitdiff
PR16207 partial fix: Fix the 'mount' [nd_]syscall.exp tests on rawhide.
authorDavid Smith <dsmith@redhat.com>
Thu, 19 Dec 2013 19:05:15 +0000 (13:05 -0600)
committerDavid Smith <dsmith@redhat.com>
Thu, 19 Dec 2013 19:05:15 +0000 (13:05 -0600)
* tapset/linux/syscalls2.stp: Add 'sys_oldumount' support to the
  syscall.umount probe. Don't allow syscall nesting in syscall.umount.
* tapset/linux/nd_syscalls2.stp: Ditto.

tapset/linux/nd_syscalls2.stp
tapset/linux/syscalls2.stp

index 6ef34882428c677b45cff04b14cec1cb6488fe64..e9ed66831245c681109188576030585111681381 100644 (file)
@@ -4147,10 +4147,15 @@ probe nd_syscall.umask.return = kprobe.function("sys_umask").return ?
 
 # umount _____________________________________________________
 # long sys_umount(char __user * name, int flags)
+# SYSCALL_DEFINE1(oldumount, char __user *, name)
 #
-probe nd_syscall.umount = kprobe.function("sys_umount") ?
+probe nd_syscall.umount = __nd_syscall.umount, __nd_syscall.oldumount ?
 {
        name = "umount"
+}
+probe __nd_syscall.umount = kprobe.function("sys_umount")
+{
+       @__syscall_compat_gate(%{ __NR_umount2 %}, %{ __NR_compat_umount2 %})
        // target = user_string($name)
        // flags = $flags
        // flags_str = _umountflags_str($flags)
@@ -4161,11 +4166,28 @@ probe nd_syscall.umount = kprobe.function("sys_umount") ?
        flags_str = _umountflags_str(flags)
        argstr = sprintf("%s, %s", user_string_quoted(pointer_arg(1)), flags_str)
 }
-probe nd_syscall.umount.return = kprobe.function("sys_umount").return ?
+probe __nd_syscall.oldumount = kprobe.function("sys_oldumount") ?
+{
+       // target = user_string_quoted($name)
+       // flags = 0
+       // flags_str = "0"
+       // argstr = sprintf("%s, 0", user_string_quoted($name))
+       asmlinkage()
+       target = user_string_quoted(pointer_arg(1))
+       flags = 0
+       flags_str = "0"
+       argstr = sprintf("%s, 0", user_string_quoted(pointer_arg(1)))
+}
+probe nd_syscall.umount.return = __nd_syscall.umount.return,
+                                kprobe.function("sys_oldumount").return ?
 {
        name = "umount"
        retstr = returnstr(1)
 }
+probe __nd_syscall.umount.return = kprobe.function("sys_umount").return
+{
+       @__syscall_compat_gate(%{ __NR_umount2 %}, %{ __NR_compat_umount2 %})
+}
 
 # uname ______________________________________________________
 #
index 2c72e1fa4af50a73228e3629b1422e9249d26db8..72a0909091a9643f2a55712449c6e8b8df4042f0 100644 (file)
@@ -3417,20 +3417,38 @@ probe syscall.umask.return = kernel.function("sys_umask").return
 
 # umount _____________________________________________________
 # long sys_umount(char __user * name, int flags)
+# SYSCALL_DEFINE1(oldumount, char __user *, name)
 #
-probe syscall.umount = kernel.function("sys_umount").call
+probe syscall.umount = __syscall.umount, __syscall.oldumount ?
 {
        name = "umount"
+}
+probe __syscall.umount = kernel.function("sys_umount").call
+{
+       @__syscall_compat_gate(%{ __NR_umount2 %}, %{ __NR_compat_umount2 %})
        target = user_string_quoted($name)
        flags = $flags
        flags_str = _umountflags_str($flags)
        argstr = sprintf("%s, %s", user_string_quoted($name), flags_str)
 }
-probe syscall.umount.return = kernel.function("sys_umount").return
+probe __syscall.oldumount = kernel.function("sys_oldumount").call ?
+{
+       target = user_string_quoted($name)
+       flags = 0
+       flags_str = "0"
+       argstr = sprintf("%s, 0", user_string_quoted($name))
+}
+probe syscall.umount.return = __syscall.umount.return,
+                             kernel.function("sys_oldumount").return ?
 {
        name = "umount"
        retstr = return_str(1, $return)
 }
+probe __syscall.umount.return = kernel.function("sys_umount").return
+{
+       @__syscall_compat_gate(%{ __NR_umount2 %}, %{ __NR_compat_umount2 %})
+}
+
 # uname ______________________________________________________
 #
 # int sys_uname(struct old_utsname __user *name)
This page took 0.036879 seconds and 5 git commands to generate.