Bryan Drewery
8b64fa1e12
Avoid taking proctree_lock and searching parents in wrappers if not needed.
...
This should help the case where filemon is loaded but not in use.
Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks
2015-08-26 03:37:18 +00:00
Bryan Drewery
9fa45e4864
Remove unneeded inuse list locking in filemon_comment().
...
Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks
2015-08-26 03:33:34 +00:00
Bryan Drewery
1ab9f216d2
Move common locking for filemon_inuse and struct filemon* to filemon_pid_check().
...
This keeps the lock for the filemon_inuse list held only while reading
the list.
Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks
2015-08-26 03:32:47 +00:00
Simon J. Gerraty
3df2b1571b
sx_sunlock for sx_slock
2015-06-19 17:34:59 +00:00
Simon J. Gerraty
c849fda850
filemon_pid_check needs to hold proctree_lock
...
Reviewed by: kib
MFC after: few days
2015-06-19 17:19:20 +00:00
Simon J. Gerraty
f859e95660
Latest clang uses openat(2).
...
If the pathname is absolute or dirfd is AT_FDCWD we can
handle it exactly like open(2).
Otherwise we output an A record to indicate that the path of
an open directory needs to be used (earlier in the trace).
Differential Revision: D2810
Reviewed by: jhb
MFC after: a bit
2015-06-14 16:31:06 +00:00
Hiroki Sato
89cac24e48
- Use pget(PGET_CANDEBUG | PGET_NOTWEXIT) to determine if the specified
...
PID is valid for monitoring in FILEMON_SET_PID ioctl.
- Set the monitored PID to -1 when the process exits.
Suggested by: jilles
Tested by: sjg
MFC after: 3 days
2013-08-06 02:14:30 +00:00
David E. O'Brien
f9d4b3926a
Match the options of the kernel.
2013-06-04 06:38:01 +00:00
David E. O'Brien
93665dfffb
Iterate rather than use recursion. We can blow out the kernel stack if there
...
is a long chain of fork(2)s.
2012-10-26 15:44:29 +00:00
Marcel Moolenaar
097f09bb98
There's no need to make filemon specific to i386 and amd64. All
...
LP64 architectures define elf64_freebsd_sysvec and all ILP32
architectures define elf32_freebsd_sysvec.
2012-07-02 20:36:26 +00:00
David E. O'Brien
eb9aea5ac0
Add the 'filemon' device. 'filemon' is a kernel module that provides a device
...
interface for processes to record system calls of its children.
Submitted by: Juniper Networks.
2012-06-04 22:54:19 +00:00