From ae34ff1086e98f986c2f62b8c4666adf57663f11 Mon Sep 17 00:00:00 2001 From: David Smith Date: Fri, 5 Mar 2010 11:14:46 -0600 Subject: PR 11338 (partial): Used '@defined()' in syscall tapsets. * tapset/syscalls.stp: Used '@defined()' to remove kernel version checks. * tapset/syscalls2.stp: Ditto. * tapset/x86_64/syscalls.stp: Ditto. * tapset/nd_syscalls.stp: Updated to match tapset/syscalls.stp. * tapset/nd_syscalls2.stp: Updated to match tapset/syscalls2.stp. * tapset/x86_64/nd_syscalls.stp: Updated to match tapset/x86_64/syscalls.stp. --- tapset/x86_64/nd_syscalls.stp | 12 +++--------- tapset/x86_64/syscalls.stp | 6 +----- 2 files changed, 4 insertions(+), 14 deletions(-) (limited to 'tapset/x86_64') diff --git a/tapset/x86_64/nd_syscalls.stp b/tapset/x86_64/nd_syscalls.stp index 80c092a8..b0b0686c 100644 --- a/tapset/x86_64/nd_syscalls.stp +++ b/tapset/x86_64/nd_syscalls.stp @@ -30,11 +30,7 @@ probe nd_syscall.arch_prctl.return = kprobe.function("sys_arch_prctl").return probe nd_syscall.iopl = kprobe.function("sys_iopl") { name = "iopl" -// %( kernel_vr == "*xen" %? -// level = $new_iopl -// %: -// level = $level -// %) +// level = (@defined($level) ? $level : $new_iopl) asmlinkage() level = int_arg(1) argstr = sprint(level) @@ -177,17 +173,15 @@ probe nd_syscall.vm86_warning.return = kprobe.function("sys32_vm86_warning").ret # # long sys32_pipe(int __user *fd) # -%(kernel_v < "2.6.32" %? -probe nd_syscall.pipe32 = kprobe.function("sys32_pipe") +probe nd_syscall.pipe32 = kprobe.function("sys32_pipe")? { name = "pipe" // argstr = sprintf("%p", $fd) asmlinkage() argstr = sprintf("%p", pointer_arg(1)) } -probe nd_syscall.pipe32.return = kprobe.function("sys32_pipe").return +probe nd_syscall.pipe32.return = kprobe.function("sys32_pipe").return? { name = "pipe" retstr = returnstr(1) } -%) diff --git a/tapset/x86_64/syscalls.stp b/tapset/x86_64/syscalls.stp index 28fa2969..bcb9523d 100644 --- a/tapset/x86_64/syscalls.stp +++ b/tapset/x86_64/syscalls.stp @@ -26,11 +26,7 @@ probe syscall.arch_prctl.return = kernel.function("sys_arch_prctl").return probe syscall.iopl = kernel.function("sys_iopl") { name = "iopl" -%( kernel_vr == "*xen" %? - level = $new_iopl -%: - level = $level -%) + level = (@defined($level) ? $level : $new_iopl) argstr = sprint(level) } probe syscall.iopl.return = kernel.function("sys_iopl").return -- cgit