-.\" $OpenBSD: ddb.4,v 1.85 2017/01/24 05:32:00 mpi Exp $
+.\" $OpenBSD: ddb.4,v 1.86 2017/04/22 11:05:04 visa Exp $
.\" $NetBSD: ddb.4,v 1.5 1994/11/30 16:22:09 jtc Exp $
.\"
.\" Mach Operating System
.\" any improvements or extensions that they make and grant Carnegie Mellon
.\" the rights to redistribute these changes.
.\"
-.Dd $Mdocdate: January 24 2017 $
+.Dd $Mdocdate: April 22 2017 $
.Dt DDB 4
.Os
.Sh NAME
.It Ic show extents
Prints a detailed list of all extents.
.\" --------------------
+.It Ic show locks Op Ar addr
+Prints the list of locks held by a thread.
+If an optional address is not specified,
+.Li curproc
+is assumed.
+The
+.Cm option WITNESS
+is required for this command to be available.
+.\" --------------------
.It Ic show malloc Op Ar addr
Prints malloc debugging information if available.
If an optional address is specified, only information about that address
.Ic watch
command.
.\" --------------------
+.It Ic show witness Op Cm /b
+Prints the current order list.
+If the
+.Cm /b
+modifier is specified, the list of found lock order violations is printed
+instead.
+The
+.Cm option WITNESS
+is required for this command to be available.
+.\" --------------------
.It Ic show all procs Op Cm /anow
Display information on all processes.
.Pp
address information.
.El
.\" --------------------
+.It Ic show all locks
+Prints the list of locks held by all threads in the system.
+The
+.Cm option WITNESS
+is required for this command to be available.
+.\" --------------------
.It Ic show all mounts Op Cm /f
Display information on all mounted filesystems.
.Pp
.Sh SEE ALSO
.Xr gdb 1 ,
.Xr nm 1 ,
+.Xr witness 4 ,
.Xr sysctl.conf 5 ,
.Xr hangman 6 ,
.Xr kgdb 7 ,
-.\" $OpenBSD: options.4,v 1.247 2017/03/20 11:04:25 jmc Exp $
+.\" $OpenBSD: options.4,v 1.248 2017/04/22 11:05:04 visa Exp $
.\" $NetBSD: options.4,v 1.21 1997/06/25 03:13:00 thorpej Exp $
.\"
.\" Copyright (c) 1998 Theo de Raadt
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"
-.Dd $Mdocdate: March 20 2017 $
+.Dd $Mdocdate: April 22 2017 $
.Dt OPTIONS 4
.Os
.Sh NAME
See
.Xr vfs 9
for details.
+.It Cd option WITNESS
+Compiles in a lock checker for detecting lock order violations in the kernel.
+See
+.Xr witness 4
+for details.
+.It Cd option WITNESS_COUNT= Ns Ar integer
+Maximum number of lock types that are tracked by
+.Xr witness 4 .
+It defaults to 1536.
.El
.Sh FILE SYSTEMS
.Bl -ohang
-.\" $OpenBSD: witness.4,v 1.1 2017/04/22 04:00:21 visa Exp $
+.\" $OpenBSD: witness.4,v 1.2 2017/04/22 11:05:04 visa Exp $
.\"
.\" Copyright (c) 2001 John H. Baldwin <jhb@FreeBSD.org>
.\" All rights reserved.
.Sh NAME
.Nm witness
.Nd lock validation facility
-.Sh SYNOPSIS
-.Cd options WITNESS
-.Cd options WITNESS_COUNT
.Sh DESCRIPTION
The
.Nm
does not recurse on a non-recursive lock,
or attempt an upgrade on a shared lock held by another thread.
If any of these checks fail, then the kernel will panic.
-.Pp
-The
-.Dv WITNESS_COUNT
-kernel option controls the maximum number of
-.Nm
-entries that are tracked in the kernel.
-.Pp
-The
-.Nm
-code also provides three extra
-.Xr ddb 4
-commands if
-.Nm
-is compiled into the kernel:
-.Bl -ohang
-.It Ic show locks Op Ar addr
-Prints the list of locks held by a thread
-along with the filename and line number at which each lock was last acquired
-by the thread.
-If an optional address is not specified,
-.Li curproc
-is assumed.
-.It Ic show all locks
-Prints the list of locks held by all threads in the system.
-.It Ic show witness Op Cm /b
-Prints the current order list to the kernel console.
-If the
-.Cm /b
-modifier is specified, the list of found lock order violations is printed
-instead.
-.El
.Sh SEE ALSO
-.Xr ddb 4
+.Xr ddb 4 ,
+.Xr options 4
.Sh HISTORY
The
.Nm