History log of /freebsd/sys/dev/filemon/filemon_wrapper.c (Results 26 – 50 of 85)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 8536d1b7 21-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Attempt to use the namecache for openat(2) path resolution.

This finishes the work done in D2810.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division


# 4f0d7851 21-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Use curthread for vn_fullpath.

No functional change.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division


# 4d3cfa1d 21-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Consolidate open(2) and openat(2) code.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division


# 6d2077c2 21-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Stop tracking stat(2).

None of lstat(2), fstat(2), fstatat(2) were tracked either.

The other filemon implementations also do not track stat(2), nor
does bmake utilize it. The act of opening a file

Stop tracking stat(2).

None of lstat(2), fstat(2), fstatat(2) were tracked either.

The other filemon implementations also do not track stat(2), nor
does bmake utilize it. The act of opening a file for read should
be enough to decide that a file is a dependency. There could be
rare cases where just having a file would cause a dependency but it
is unlikely.

MFC after: 2 weeks
Also noted by: sjg
Sponsored by: EMC / Isilon Storage Division

show more ...


# e0d84b9e 21-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Track filemon usage via a proc.p_filemon pointer rather than its own lists.

- proc.p_filemon is added which is protected by PROC_LOCK. This improves
performance and avoids double-fork issues, tak

Track filemon usage via a proc.p_filemon pointer rather than its own lists.

- proc.p_filemon is added which is protected by PROC_LOCK. This improves
performance and avoids double-fork issues, taking allproc_lock
while in syscalls, and walking the process tree in syscalls. A
particular proc.p_filemon can only be changed to NULL or another
filemon, or the filemon inherited, while the filemon->lock is held.
- Filemon are reference counted. On the last reference the log will be closed.
- When closing the devfs file handle, the filemon will be detached from all
processes and inheritance prevented.
- Disallow attaching to a process already being traced since filemon is
typically intended to be used on children only. This is allowed for
curproc as bmake relies on this behavior for rare cases when combining
.MAKE with .META.
- Detach any previously tracked process on ioctl(FILEMON_SET_PID).
- Handle error from devfs_set_cdevpriv() in filemon_open().
- The global filemon lock and lists are removed.
- A free list is no longer kept. Previously this list was
forever-expanding and never garbage cleaned.
- No longer loses track of double-forks. If the process holding the filemon
handle closes it will close the log rather than wait on a daemonized process,
but it will log all activity until it closes its handle. The filemon
will be removed from the process and not inherited.
- A separate process count is kept only as an optimization for
forced detachment to avoid taking allproc_lock and walking the entire
process tree.
- struct filemon access is protected by sx(9) filemon->lock as it was before.
- Add more comments and KASSERTS.

MFC after: 2 weeks
Reviewed by: kib, mjg, markj (all on previous versions)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5520

show more ...


# 7d536dc8 10-Mar-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# 8a81693a 07-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Only call bwillwrite() for logging to vnodes, as other fo_write() calls do.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division


# 82aa34e6 04-Mar-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r296007 through r296368.


# 52259a98 02-Mar-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# e0dae8f1 02-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Remove filemon->lock wrappers.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division


# 5b83ad4b 27-Feb-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Remove old compatibility checks.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division


# 9893f787 21-Feb-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r295601 through r295844.


# 72c3aa02 18-Feb-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# a2109e00 16-Feb-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Filemon: Fix panic when fork1() is called from kproc_create().

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division


# a49d8b6e 06-Feb-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r294961 through r295350.


# 2414e864 03-Feb-2016 Bjoern A. Zeeb <bz@FreeBSD.org>

MfH @r295202

Expect to see panics in routing code at least now.


# c8296cbb 29-Jan-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# d5e53f99 29-Jan-2016 Bryan Drewery <bdrewery@FreeBSD.org>

filemon: Track the process pointer rather than a pid.

The process is not held since the process_exit hook is called after the
exithold. There is no need to hold the process since the hook will
alwa

filemon: Track the process pointer rather than a pid.

The process is not held since the process_exit hook is called after the
exithold. There is no need to hold the process since the hook will
always see it exiting via the process_exit event.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

show more ...


# f889a61a 28-Jan-2016 Bryan Drewery <bdrewery@FreeBSD.org>

filemon: Use process_exec EVENTHANDLER to capture sys_execve.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division


# e95c55e5 28-Jan-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Follow-up r294967: Mark flags unused.

X-MFC-With: r294967
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division


# 2f600962 28-Jan-2016 Bryan Drewery <bdrewery@FreeBSD.org>

filemon: Trace fork via process_fork event.

This avoids needing ugly hooks and needing both a vfork and fork
handler.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division


# 79d69913 28-Jan-2016 Bryan Drewery <bdrewery@FreeBSD.org>

filemon: Use process_exit EVENTHANDLER to capture process exit.

This fixes some cases where a process could exit without being untracked
by filemon.

Reported by: mjg
MFC after: 2 weeks
Sponsored by

filemon: Use process_exit EVENTHANDLER to capture process exit.

This fixes some cases where a process could exit without being untracked
by filemon.

Reported by: mjg
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

show more ...


# 752d0060 27-Jan-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r294777 through r294960.


# 2b198fe9 27-Jan-2016 Bryan Drewery <bdrewery@FreeBSD.org>

filemon_comment has nothing to do with wrappers so move it out of filemon_wrapper.c.

It only prints the header from filemon_ioctl. Keep the name though to stay
closer to other implementations.

MFC

filemon_comment has nothing to do with wrappers so move it out of filemon_wrapper.c.

It only prints the header from filemon_ioctl. Keep the name though to stay
closer to other implementations.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

show more ...


# 64c368a4 27-Jan-2016 Bryan Drewery <bdrewery@FreeBSD.org>

filemon_ioctl: Lock the associated filemon handle before writing to it.

Reported by: mjg
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division


1234