Bug 13452 - tapset/nd_syscalls.stp:# FIXME: doesn't handle sys_eventfd2()
Summary: tapset/nd_syscalls.stp:# FIXME: doesn't handle sys_eventfd2()
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: tapsets (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on: 11424
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-29 19:17 UTC by Mark Wielaard
Modified: 2012-07-20 19:47 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2011-11-29 19:17:51 UTC
The corresponding tapset/syscalls.stp has:

# SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)
probe syscall.eventfd = kernel.function("sys_eventfd2").call !,
                        kernel.function("sys_eventfd").call ?
Comment 1 David Smith 2011-11-30 16:53:02 UTC
Here's a bit more from tapset/syscalls.stp:

----
# eventfd _____________________________________________________                 
# long sys_eventfd(unsigned int count)                                          
# SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)                    
probe syscall.eventfd = kernel.function("sys_eventfd2").call !,                 
                        kernel.function("sys_eventfd").call ?                   
----

The reason why it is done this way is that in the kernel sys_eventfd is just a wrapper around sys_eventfd2.  This way we ignore the sys_eventfd call, and only
catch the sys_eventfd2 call on kernels with sys_eventfd2.

Unfortunately, as bug #11424 notes, '!' (optional and sufficient) doesn't work
for kprobe.function probes.  So, the above logic will be difficult to duplicate
in tapset/nd_syscalls.stp.
Comment 2 David Smith 2012-07-20 19:47:55 UTC
Now that bug #11424 and bug #14378 are fixed, this bug can be addressed.

Fixed in commit f6f8f0e.