History log of /freebsd-10-stable/sys/dev/filemon/filemon_wrapper.c
Revision Date Author Comments
# 343886 08-Feb-2019 bdrewery

MFC r337272:

Fix some filemon path logging issues.


# 302241 27-Jun-2016 bdrewery

MFC r300809,r300890,r300891:

r300809:
filemon exec: Use imgp->execpath rather than vn_fullpath(9).
r300890:
exec: Cease tracing if credentials will change with the new image.
r300891:
Write to the log using the tracer's credentials.


# 302072 21-Jun-2016 bdrewery

MFC r300892,r300893,r301130,r301404,r301414,r301460:

r300892:
Rename function to be less generic.
r300893:
Don't truncate existing error when writing the log.
r301130:
Enable filemon on all architectures.
r301404:
Support all architectures by just using sysent.
r301414:
Fix build after r301404.
r301460:
Cleanup COMPAT_FREEBSD32 support.


# 302066 21-Jun-2016 bdrewery

MFC r297156,r297157,r297158,r297159,r297161,r297172,r297200,r297201,r297202,
r297203,r297256:

r297156:
Track filemon usage via a proc.p_filemon pointer rather than its own lists.
r297157:
Stop tracking stat(2).
r297158:
Consolidate open(2) and openat(2) code.
r297159:
Use curthread for vn_fullpath.
r297161:
Attempt to use the namecache for openat(2) path resolution.
r297172:
Consolidate common link(2) logic.
r297200:
Follow-up r297156: Close the log in filemon_dtr rather than in the last
reference.
r297201:
Return any log write failure encountered when closing the filemon fd.
r297202:
Remove unused done argument to copyinstr(9).
r297203:
Handle copyin failures.
r297256:
Remove unneeded return left from refactoring.

Relnotes: yes (filemon stability/performance updates)
Sponsored by: EMC / Isilon Storage Division


# 296761 12-Mar-2016 bdrewery

MFC r296148:

Remove old compatibility checks.


# 296752 12-Mar-2016 bdrewery

MFC r296286,r296470,r296472,r296473,r296575:

r296286:
Remove filemon->lock wrappers.
r296470:
Only call bwillwrite() for logging to vnodes, as other fo_write() calls do.
r296472:
Require kldunload -f to unload.
r296473:
Add missing break for r296472.
r296575:
FILEMON_SET_FD: Disallow changing the fd.


# 296015 24-Feb-2016 bdrewery

MFC r294933,r294949,r294952,r294953,r294957,r294965,r294967,r294968,r295017,
r295026,r295027,r295029,r295030,r295649:

r294933:
Drop any previous fd when setting a new one.
r294949:
filemon_ioctl: Handle error from devfs_get_cdevpriv(9).
r294952:
filemon_ioctl: Lock the associated filemon handle before writing to it.
r294953:
filemon_comment has nothing to do with wrappers so move it out of
filemon_wrapper.c.
r294957:
filemon_dtr: Lock the associated filemon handle before writing to it.
r294965:
filemon: Use process_exit EVENTHANDLER to capture process exit.
r294967:
filemon: Trace fork via process_fork event.
r294968:
Follow-up r294967: Mark flags unused.
r295017:
filemon: Use process_exec EVENTHANDLER to capture sys_execve.
r295026:
filemon_open: Don't record a process to trace here.
r295027:
filemon: Track the process pointer rather than a pid.
r295029:
Document the purpose and non-purpose of filemon(4).
r295030:
Note the double fork behavior with filemon.
r295649:
filemon: Fix panic when fork1() is called from kproc_create().

Approved by: re (marius)


# 287598 09-Sep-2015 bdrewery

MFC r287151,r287152,r287153,r287155:

r287151:
Move common locking for filemon_inuse and struct filemon* to
filemon_pid_check().
r287152:
Remove unneeded inuse list locking in filemon_comment().
r287153:
Avoid taking proctree_lock and searching parents in wrappers if not needed.
r287155:
Fix filemon locking races.

Relnotes: yes (race fixes)
Sponsored by: EMC / Isilon Storage Division


# 285112 03-Jul-2015 sjg

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).

Also filemon_pid_check needs to hold proctree_lock
and use proc_realparent()

Differential Revision: D2810
Reviewed by: jhb
Approved by: re


# 287598 09-Sep-2015 bdrewery

MFC r287151,r287152,r287153,r287155:

r287151:
Move common locking for filemon_inuse and struct filemon* to
filemon_pid_check().
r287152:
Remove unneeded inuse list locking in filemon_comment().
r287153:
Avoid taking proctree_lock and searching parents in wrappers if not needed.
r287155:
Fix filemon locking races.

Relnotes: yes (race fixes)
Sponsored by: EMC / Isilon Storage Division


# 285112 03-Jul-2015 sjg

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).

Also filemon_pid_check needs to hold proctree_lock
and use proc_realparent()

Differential Revision: D2810
Reviewed by: jhb
Approved by: re