diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2016-06-30 13:24:42 -0500 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2016-06-30 13:24:42 -0500 |
commit | 9d5ffb47ff56597309eb2939cc97b1df4d616797 (patch) | |
tree | b34fd92dce8092bb4cb58c875caabd93e1fece39 /share/man | |
parent | 1fc6b0207cc2f3cce33817706603caa41a9de24d (diff) | |
parent | 13295f52fb5936b237a994e75311fe18612c73c4 (diff) | |
download | FreeBSD-src-9d5ffb47ff56597309eb2939cc97b1df4d616797.zip FreeBSD-src-9d5ffb47ff56597309eb2939cc97b1df4d616797.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man4/filemon.4 | 56 | ||||
-rw-r--r-- | share/man/man4/ng_mppc.4 | 8 | ||||
-rw-r--r-- | share/man/man9/atomic.9 | 20 |
3 files changed, 63 insertions, 21 deletions
diff --git a/share/man/man4/filemon.4 b/share/man/man4/filemon.4 index 92876a3..6ab3e9e 100644 --- a/share/man/man4/filemon.4 +++ b/share/man/man4/filemon.4 @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 9, 2016 +.Dd June 21, 2016 .Dt FILEMON 4 .Os .Sh NAME @@ -51,7 +51,7 @@ calls. .Pp .Nm is not intended to be a security auditing tool. -Many syscalls are not tracked and binaries of foreign ABI will not be fully +Many system calls are not tracked and binaries of foreign ABI will not be fully audited. It is intended for auditing of processes for the purpose of determining its dependencies in an efficient and easily parsable format. @@ -64,6 +64,9 @@ to handle incremental builds more smartly. System calls are denoted using the following single letters: .Pp .Bl -tag -width indent -compact +.It Ql A +.Xr openat 2 . +The next log entry may be lacking an absolute path or be inaccurate. .It Ql C .Xr chdir 2 .It Ql D @@ -82,11 +85,13 @@ System calls are denoted using the following single letters: .Xr rename 2 .It Ql R .Xr open 2 +or +.Xr openat 2 for read -.It Ql S -.Xr stat 2 .It Ql W .Xr open 2 +or +.Xr openat 2 for write .It Ql X .Xr _exit 2 @@ -116,6 +121,10 @@ Each takes a single argument. Write the internal tracing buffer to the supplied open file descriptor. .It Dv FILEMON_SET_PID Child process ID to trace. +This should normally be done under the control of a parent in the child after +.Xr fork 2 +but before anything else. +See the example below. .El .Sh RETURN VALUES .\" .Rv -std ioctl @@ -138,6 +147,35 @@ The .Nm handle is already associated with a file descriptor. .El +.Pp +The +.Fn ioctl +system call +with +.Dv FILEMON_SET_PID +will fail if: +.Bl -tag -width Er +.It Bq Er ESRCH +No process having the specified process ID exists. +.It Bq Er EBUSY +The process ID specified is already being traced and was not the current +process. +.El +.Pp +The +.Fn close +system call on the filemon file descriptor may fail with the errors from +.Xr write 2 +if any error is encountered while writing the log. +It may also fail if: +.Bl -tag -width Er +.It Bq Er EFAULT +An invalid address was used for a traced system call argument, resulting in +no log entry for the system call. +.It Bq Er ENAMETOOLONG +An argument for a traced system call was too long, resulting in +no log entry for the system call. +.El .Sh FILES .Bl -tag -width ".Pa /dev/filemon" .It Pa /dev/filemon @@ -190,6 +228,7 @@ buffer contents to it. .Sh SEE ALSO .Xr dtrace 1 , .Xr ktrace 1 , +.Xr script 1 , .Xr truss 1 , .Xr ioctl 2 .Sh HISTORY @@ -198,14 +237,5 @@ A device appeared in .Fx 9.1 . .Sh BUGS -Loading -.Nm -may reduce system performance for the noted syscalls. -.Pp -Only children of the set process are logged. -Processes can escape being traced by double forking. -This is not seen as a problem as the intended use is build monitoring, which -does not make sense to have daemons for. -.Pp Unloading the module may panic the system, thus requires using .Ic kldunload -f . diff --git a/share/man/man4/ng_mppc.4 b/share/man/man4/ng_mppc.4 index e7eeedf..94a0f4a 100644 --- a/share/man/man4/ng_mppc.4 +++ b/share/man/man4/ng_mppc.4 @@ -35,7 +35,7 @@ .\" $Whistle: ng_mppc.8,v 1.1 1999/12/08 20:20:39 archie Exp $ .\" $FreeBSD$ .\" -.Dd December 8, 1999 +.Dd June 7, 2016 .Dt NG_MPPC 4 .Os .Sh NAME @@ -153,12 +153,6 @@ and are supplied to selectively compile in either or both capabilities. At least one of these must be defined, or else this node type is useless. .Pp -The MPPC protocol requires proprietary compression code available -from Hi/Fn (formerly STAC). -These files must be obtained elsewhere and added to the kernel -sources before this node type will compile with the -.Dv NETGRAPH_MPPC_COMPRESSION -option. .Sh SEE ALSO .Xr netgraph 4 , .Xr ng_ppp 4 , diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index 5939b9c..fdeb0d3 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 14, 2015 +.Dd May 12, 2016 .Dt ATOMIC 9 .Os .Sh NAME @@ -65,6 +65,8 @@ .Ft <type> .Fn atomic_swap_<type> "volatile <type> *p" "<type> v" .Ft int +.Fn atomic_testandclear_<type> "volatile <type> *p" "u_int v" +.Ft int .Fn atomic_testandset_<type> "volatile <type> *p" "u_int v" .Sh DESCRIPTION Each of the atomic operations is guaranteed to be atomic across multiple @@ -313,6 +315,15 @@ and .Dq Li 16 and do not have any variants with memory barriers at this time. .Bl -hang +.It Fn atomic_testandclear p v +.Bd -literal -compact +bit = 1 << (v % (sizeof(*p) * NBBY)); +tmp = (*p & bit) != 0; +*p &= ~bit; +return (tmp); +.Ed +.El +.Bl -hang .It Fn atomic_testandset p v .Bd -literal -compact bit = 1 << (v % (sizeof(*p) * NBBY)); @@ -324,6 +335,8 @@ return (tmp); .Pp The .Fn atomic_testandset +and +.Fn atomic_testandclear functions are only implemented for the types .Dq Li int , .Dq Li long @@ -352,6 +365,8 @@ and functions return the value at the specified address. The .Fn atomic_testandset +and +.Fn atomic_testandclear function returns the result of the test operation. .Sh EXAMPLES This example uses the @@ -429,3 +444,6 @@ and .Fn atomic_testandset operations were added in .Fx 10.0 . +.Fn atomic_testandclear +operation was added in +.Fx 11.0 . |