]> sourceware.org Git - systemtap.git/commitdiff
PR20333/iopl
authorMartin Cermak <mcermak@redhat.com>
Wed, 4 Jan 2017 14:30:57 +0000 (15:30 +0100)
committerMartin Cermak <mcermak@redhat.com>
Wed, 4 Jan 2017 14:30:57 +0000 (15:30 +0100)
tapset/linux/x86_64/nd_syscalls.stp
tapset/linux/x86_64/sysc_iopl.stp [new file with mode: 0644]
tapset/linux/x86_64/syscalls.stp

index 303585c54f676e854b3db9009bbc4a07549fb918..da086402deb5f5e0b12cfc796d0870f0a50af9dc 100644 (file)
@@ -1,23 +1,4 @@
 
-# iopl _______________________________________________________
-# long sys_iopl(unsigned int level, struct pt_regs *regs);
-# NOTE. This function is only in i386 and x86_64 and its args vary
-# between those two archs.
-#
-probe nd_syscall.iopl = kprobe.function("sys_iopl")
-{
-       name = "iopl"
-//     level = (@defined($level) ? $level : $new_iopl)
-       asmlinkage()
-       level = uint_arg(1)
-       argstr = sprint(level)
-}
-probe nd_syscall.iopl.return = kprobe.function("sys_iopl").return
-{
-       name = "iopl"
-       retstr = returnstr(1)
-}
-
 # set_thread_area ____________________________________________
 /*
  * asmlinkage int
diff --git a/tapset/linux/x86_64/sysc_iopl.stp b/tapset/linux/x86_64/sysc_iopl.stp
new file mode 100644 (file)
index 0000000..d0d8473
--- /dev/null
@@ -0,0 +1,47 @@
+# iopl _______________________________________________________
+# long sys_iopl(unsigned int level, struct pt_regs *regs);
+# NOTE. This function is only in i386 and x86_64 and its args vary
+# between those two archs.
+#
+
+@define _SYSCALL_IOPL_NAME
+%(
+       name = "iopl"
+%)
+
+@define _SYSCALL_IOPL_ARGSTR
+%(
+       argstr = sprint(level)
+%)
+
+probe syscall.iopl = dw_syscall.iopl !, nd_syscall.iopl {}
+probe syscall.iopl.return = dw_syscall.iopl.return !, nd_syscall.iopl.return {}
+
+# dw_iopl _____________________________________________________
+
+probe dw_syscall.iopl = kernel.function("sys_iopl")
+{
+       @_SYSCALL_IOPL_NAME
+       level = __uint32(@choose_defined($level, $new_iopl))
+       @_SYSCALL_IOPL_ARGSTR
+}
+probe dw_syscall.iopl.return = kernel.function("sys_iopl").return
+{
+       @_SYSCALL_IOPL_NAME
+       retstr = return_str(1, $return)
+}
+
+# nd_iopl _____________________________________________________
+
+probe nd_syscall.iopl = kprobe.function("sys_iopl")
+{
+       @_SYSCALL_IOPL_NAME
+       asmlinkage()
+       level = uint_arg(1)
+       @_SYSCALL_IOPL_ARGSTR
+}
+probe nd_syscall.iopl.return = kprobe.function("sys_iopl").return
+{
+       @_SYSCALL_IOPL_NAME
+       retstr = returnstr(1)
+}
index 04f8c9242a9b383f4f7c4559ccedb6c9d372817a..25914a5741f402ff3fcb9de9934813e475886ef7 100644 (file)
@@ -1,21 +1,4 @@
 
-# iopl _______________________________________________________
-# long sys_iopl(unsigned int level, struct pt_regs *regs);
-# NOTE. This function is only in i386 and x86_64 and its args vary
-# between those two archs.
-#
-probe syscall.iopl = kernel.function("sys_iopl")
-{
-       name = "iopl"
-       level = __uint32(@choose_defined($level, $new_iopl))
-       argstr = sprint(level)
-}
-probe syscall.iopl.return = kernel.function("sys_iopl").return
-{
-       name = "iopl"
-       retstr = return_str(1, $return)
-}
-
 # set_thread_area ____________________________________________
 /*
  * asmlinkage int
This page took 0.033135 seconds and 5 git commands to generate.