> uname -a Linux tiger 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux > stap -e 'probe kernel.function("vgettimeofday") {}' ERROR: probe 0 registration failed, rc=1, kernel.function("vgettimeofday@arch/x86_64/kernel/vsyscall.c:126")
vgettimeofday can be called by application in user mode, now in x86_64 function address of vgettimeofday is outside of kernel_text_address() scope, so it failed to register kprobe for this function.
Consider allowing probes on weird locations like i386 vtoc page, x86_64 .vsyscall_ section, etc.
Further thoughts: - vdso, not vtoc. (Haste and advanced age are a bad combo. :-}) - Since a kprobed instruction is copied into a kernel-space buffer and single-stepped there, we do NOT want to allow kprobes on instructions that are executed in user mode, such as on the vdso page.
(In reply to comment #3) > [...] > - Since a kprobed instruction is copied into a kernel-space buffer and > single-stepped there, we do NOT want to allow kprobes on instructions that are > executed in user mode, such as on the vdso page. Good point. We should leave vdso type probes to user-space probing.