When I try to use this script:
probe kernel.function("sys_open").return
{
# -EPERM or -EACCES
if ($return == -1 || $return == -13) {
printf ("%s(%d) %s (%d) %s\n",
execname(), pid(), probefunc(), $return, kernel_string($filename))
printf("euid %d\n", euid())
}
}
I get a long list of errors beginning with:
In file included from /usr/share/systemtap/runtime/runtime.h:118,
from /tmp/stapPD2v8O/stap_ae6cb464ee6f134b982d954fb5baac90_4259.c:51:
/usr/share/systemtap/runtime/alloc.c: In function ‘_stp_alloc_percpu’:
/usr/share/systemtap/runtime/alloc.c:241: error: too few arguments to function ‘__alloc_percpu’
In file included from /usr/share/systemtap/runtime/runtime.h:124,
from /tmp/stapPD2v8O/stap_ae6cb464ee6f134b982d954fb5baac90_4259.c:51:
/usr/share/systemtap/runtime/regs.c: In function ‘_stp_print_regs’:
/usr/share/systemtap/runtime/regs.c:125: error: ‘struct pt_regs’ has no member named ‘rip’
/usr/share/systemtap/runtime/regs.c:125: error: ‘struct pt_regs’ has no member named ‘rsp’
/usr/share/systemtap/runtime/regs.c:125: error: ‘struct pt_regs’ has no member named ‘eflags’
/usr/share/systemtap/runtime/regs.c:127: error: ‘struct pt_regs’ has no member named ‘rax’
/usr/share/systemtap/runtime/regs.c:127: error: ‘struct pt_regs’ has no member named ‘rbx’
/usr/share/systemtap/runtime/regs.c:127: error: ‘struct pt_regs’ has no member named ‘rcx’
/usr/share/systemtap/runtime/regs.c:129: error: ‘struct pt_regs’ has no member named ‘rdx’
/usr/share/systemtap/runtime/regs.c:129: error: ‘struct pt_regs’ has no member named ‘rsi’
/usr/share/systemtap/runtime/regs.c:129: error: ‘struct pt_regs’ has no member named ‘rdi’
/usr/share/systemtap/runtime/regs.c:131: error: ‘struct pt_regs’ has no member named ‘rbp’
/usr/share/systemtap/runtime/regs.c: In function ‘_stp_get_sp’:
/usr/share/systemtap/runtime/regs.c:409: error: ‘struct pt_regs’ has no member named ‘rsp’
/usr/share/systemtap/runtime/regs.c: In function ‘_stp_get_arg32_by_number’:
/usr/share/systemtap/runtime/regs.c:468: error: ‘struct pt_regs’ has no member named ‘rax’
/usr/share/systemtap/runtime/regs.c:469: error: ‘struct pt_regs’ has no member named ‘rdx’
/usr/share/systemtap/runtime/regs.c:470: error: ‘struct pt_regs’ has no member named ‘rcx’
/usr/share/systemtap/runtime/regs.c: In function ‘_stp_get_arg64_by_number’:
/usr/share/systemtap/runtime/regs.c:495: error: ‘struct pt_regs’ has no member named ‘rdi’
/usr/share/systemtap/runtime/regs.c:496: error: ‘struct pt_regs’ has no member named ‘rsi’
/usr/share/systemtap/runtime/regs.c:497: error: ‘struct pt_regs’ has no member named ‘rdx’
/usr/share/systemtap/runtime/regs.c:498: error: ‘struct pt_regs’ has no member named ‘rcx’
In file included from /usr/share/systemtap/runtime/unwind/unwind.h:19,
from /usr/share/systemtap/runtime/unwind.c:16,
from /usr/share/systemtap/runtime/stack.c:26,
from /tmp/stapPD2v8O/stap_ae6cb464ee6f134b982d954fb5baac90_4259.c:52:
This is in a fresh lucid VM (with lucid-updates and lucid-security).
Linux systap-lucid-amd64 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:52:38 UTC 2011 x86_64 GNU/Linux