Bug 2945 - cannot probe vgettimeofday on x86_64
Summary: cannot probe vgettimeofday on x86_64
Status: RESOLVED INVALID
Alias: None
Product: systemtap
Classification: Unclassified
Component: kprobes (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-20 18:29 UTC by Martin Hunt
Modified: 2006-11-16 23:37 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Hunt 2006-07-20 18:29:52 UTC
> 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")
Comment 1 bibo,mao 2006-07-21 06:19:34 UTC
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.
Comment 2 Jim Keniston 2006-11-16 01:25:13 UTC
Consider allowing probes on weird locations like i386 vtoc page, x86_64
.vsyscall_ section, etc.
Comment 3 Jim Keniston 2006-11-16 18:07:34 UTC
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.
Comment 4 Frank Ch. Eigler 2006-11-16 23:37:01 UTC
(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.