Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/freebsd/freebsd

Conflicts:
	sys/conf/newvers.sh
  • Loading branch information...
commit d9f76a0f6e1e1242f02320ed4a00635ba6393b78 2 parents 404ef10 + 5cca672
@kmoore134 kmoore134 authored
Showing with 29,309 additions and 2,999 deletions.
  1. +2 −23 ObsoleteFiles.inc
  2. +21 −15 UPDATING
  3. +1 −0  bin/Makefile
  4. +1 −2  {libexec → bin}/freebsd-version/Makefile
  5. +2 −2 {libexec → bin}/freebsd-version/freebsd-version.1
  6. 0  {libexec → bin}/freebsd-version/freebsd-version.sh.in
  7. +652 −645 cddl/contrib/opensolaris/cmd/dtrace/dtrace.1
  8. +15 −7 contrib/binutils/opcodes/i386-dis.c
  9. +2 −1  contrib/binutils/opcodes/i386-opc.h
  10. +18 −0 contrib/binutils/opcodes/i386-opc.tbl
  11. +5 −0 contrib/binutils/opcodes/i386-tbl.h
  12. +1 −1  etc/defaults/periodic.conf
  13. +1 −34 etc/defaults/rc.conf
  14. +67 −10 etc/network.subr
  15. +299 −570 etc/rc.d/jail
  16. +33 −4 etc/rc.d/netif
  17. +1 −1  etc/rc.d/sshd
  18. +0 −22 etc/rc.subr
  19. +5 −0 gnu/usr.bin/Makefile
  20. +2 −1  gnu/usr.bin/groff/tmac/mdoc.local
  21. +24 −0 gnu/usr.bin/rcs/CREDITS
  22. +3 −0  gnu/usr.bin/rcs/Makefile
  23. +3 −0  gnu/usr.bin/rcs/Makefile.inc
  24. +548 −0 gnu/usr.bin/rcs/NEWS
  25. +90 −0 gnu/usr.bin/rcs/REFS
  26. +8 −0 gnu/usr.bin/rcs/ci/Makefile
  27. +898 −0 gnu/usr.bin/rcs/ci/ci.1
  28. +1,318 −0 gnu/usr.bin/rcs/ci/ci.c
  29. +8 −0 gnu/usr.bin/rcs/co/Makefile
  30. +736 −0 gnu/usr.bin/rcs/co/co.1
  31. +826 −0 gnu/usr.bin/rcs/co/co.c
  32. +1,518 −0 gnu/usr.bin/rcs/doc/rcs.ms
  33. +95 −0 gnu/usr.bin/rcs/doc/rcs_func.ms
  34. +8 −0 gnu/usr.bin/rcs/ident/Makefile
  35. +182 −0 gnu/usr.bin/rcs/ident/ident.1
  36. +270 −0 gnu/usr.bin/rcs/ident/ident.c
  37. +14 −0 gnu/usr.bin/rcs/lib/Makefile
  38. +400 −0 gnu/usr.bin/rcs/lib/conf.h
  39. +344 −0 gnu/usr.bin/rcs/lib/maketime.c
  40. +39 −0 gnu/usr.bin/rcs/lib/maketime.h
  41. +148 −0 gnu/usr.bin/rcs/lib/merger.c
  42. +701 −0 gnu/usr.bin/rcs/lib/partime.c
  43. +71 −0 gnu/usr.bin/rcs/lib/partime.h
  44. +762 −0 gnu/usr.bin/rcs/lib/rcsbase.h
  45. +1,958 −0 gnu/usr.bin/rcs/lib/rcsedit.c
  46. +354 −0 gnu/usr.bin/rcs/lib/rcsfcmp.c
  47. +1,132 −0 gnu/usr.bin/rcs/lib/rcsfnms.c
  48. +681 −0 gnu/usr.bin/rcs/lib/rcsgen.c
  49. +452 −0 gnu/usr.bin/rcs/lib/rcskeep.c
  50. +186 −0 gnu/usr.bin/rcs/lib/rcskeys.c
  51. +1,568 −0 gnu/usr.bin/rcs/lib/rcslex.c
  52. +69 −0 gnu/usr.bin/rcs/lib/rcsmap.c
  53. +911 −0 gnu/usr.bin/rcs/lib/rcsrev.c
  54. +681 −0 gnu/usr.bin/rcs/lib/rcssyn.c
  55. +191 −0 gnu/usr.bin/rcs/lib/rcstime.c
  56. +1,398 −0 gnu/usr.bin/rcs/lib/rcsutil.c
  57. +2 −0  gnu/usr.bin/rcs/lib/version.c
  58. +8 −0 gnu/usr.bin/rcs/merge/Makefile
  59. +137 −0 gnu/usr.bin/rcs/merge/merge.1
  60. +113 −0 gnu/usr.bin/rcs/merge/merge.c
  61. +10 −0 gnu/usr.bin/rcs/rcs/Makefile
  62. +454 −0 gnu/usr.bin/rcs/rcs/rcs.1
  63. +1,629 −0 gnu/usr.bin/rcs/rcs/rcs.c
  64. +425 −0 gnu/usr.bin/rcs/rcs/rcsfile.5
  65. +302 −0 gnu/usr.bin/rcs/rcs/rcsintro.1
  66. +8 −0 gnu/usr.bin/rcs/rcsclean/Makefile
  67. +203 −0 gnu/usr.bin/rcs/rcsclean/rcsclean.1
  68. +333 −0 gnu/usr.bin/rcs/rcsclean/rcsclean.c
  69. +8 −0 gnu/usr.bin/rcs/rcsdiff/Makefile
  70. +158 −0 gnu/usr.bin/rcs/rcsdiff/rcsdiff.1
  71. +480 −0 gnu/usr.bin/rcs/rcsdiff/rcsdiff.c
  72. +7 −0 gnu/usr.bin/rcs/rcsfreeze/Makefile
  73. +68 −0 gnu/usr.bin/rcs/rcsfreeze/rcsfreeze.1
  74. +99 −0 gnu/usr.bin/rcs/rcsfreeze/rcsfreeze.sh
  75. +8 −0 gnu/usr.bin/rcs/rcsmerge/Makefile
  76. +189 −0 gnu/usr.bin/rcs/rcsmerge/rcsmerge.1
  77. +286 −0 gnu/usr.bin/rcs/rcsmerge/rcsmerge.c
  78. +454 −0 gnu/usr.bin/rcs/rcstest
  79. +8 −0 gnu/usr.bin/rcs/rlog/Makefile
  80. +318 −0 gnu/usr.bin/rcs/rlog/rlog.1
  81. +1,290 −0 gnu/usr.bin/rcs/rlog/rlog.c
  82. +14 −10 lib/libprocstat/libprocstat.c
  83. +6 −2 lib/libstand/tftp.c
  84. +11 −6 lib/libutil/humanize_number.3
  85. +43 −31 lib/libutil/humanize_number.c
  86. +27 −0 lib/libvmmapi/vmmapi.c
  87. +1 −0  lib/libvmmapi/vmmapi.h
  88. +0 −1  libexec/Makefile
  89. +0 −5 release/release.sh
  90. +1 −1  sbin/camcontrol/camcontrol.c
  91. +2 −0  sbin/camcontrol/fwdownload.c
  92. +6 −31 sbin/iscontrol/iscsi.conf.5
  93. +7 −5 sbin/nvmecontrol/perftest.c
  94. +5 −0 sbin/route/route.c
  95. +6 −0 share/doc/psd/13.rcs/Makefile
  96. +5 −0 share/doc/psd/13.rcs/Makefile.inc
  97. +7 −0 share/doc/psd/13.rcs/rcs/Makefile
  98. +6 −0 share/doc/psd/13.rcs/rcs_func/Makefile
  99. +1 −0  share/doc/psd/Makefile
  100. +2 −2 share/examples/bhyve/vmrun.sh
  101. +4 −4 share/man/man4/altera_avgen.4
  102. +2 −2 share/man/man4/rsu.4
  103. +127 −351 share/man/man5/rc.conf.5
  104. +8 −8 share/man/man5/src.conf.5
  105. +4 −8 share/man/man8/picobsd.8
  106. +2 −0  share/man/man9/Makefile
  107. +88 −0 share/man/man9/VOP_ADVISE.9
  108. +84 −0 share/man/man9/VOP_ALLOCATE.9
  109. +0 −9 share/man/man9/VOP_FSYNC.9
  110. +2 −2 share/man/man9/firmware.9
  111. +1 −1  share/man/man9/vm_page_grab.9
  112. +2 −0  share/man/man9/vnode.9
  113. +14 −5 share/misc/bsd-family-tree
  114. +1 −0  share/misc/committers-src.dot
  115. +1 −0  share/mk/bsd.own.mk
  116. +1 −0  sys/amd64/amd64/pmap.c
  117. +0 −1  sys/arm/s3c2xx0/uart_bus_s3c2410.c
  118. +0 −2  sys/arm/s3c2xx0/uart_cpu_s3c2410.c
  119. +6 −9 sys/cam/cam_xpt.c
  120. +101 −40 sys/cam/ctl/ctl_frontend_iscsi.c
  121. +0 −9 sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
  122. +10 −0 sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
  123. +1 −1  sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
  124. +3 −1 sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c
  125. +2 −0  sys/cddl/dev/dtrace/dtrace_load.c
  126. +2 −0  sys/cddl/dev/dtrace/dtrace_unload.c
  127. +2 −2 sys/conf/newvers.sh
  128. +2 −0  sys/conf/options.mips
  129. +1 −1  sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c
  130. +1 −1  sys/contrib/ipfilter/netinet/ip_tftp_pxy.c
  131. +10 −0 sys/dev/ath/ath_hal/ar5212/ar5212.h
  132. +56 −16 sys/dev/ath/ath_hal/ar5212/ar5212_ani.c
  133. +36 −2 sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
  134. +1 −1  sys/dev/cxgbe/t4_main.c
  135. +1 −4 sys/dev/cxgbe/t4_sge.c
  136. +160 −198 sys/dev/e1000/e1000_80003es2lan.c
  137. +5 −7 sys/dev/e1000/e1000_80003es2lan.h
  138. +16 −11 sys/dev/e1000/e1000_82571.c
  139. +287 −38 sys/dev/e1000/e1000_82575.c
  140. +5 −0 sys/dev/e1000/e1000_82575.h
  141. +8 −3 sys/dev/e1000/e1000_api.c
  142. +40 −0 sys/dev/e1000/e1000_defines.h
  143. +15 −1 sys/dev/e1000/e1000_hw.h
  144. +165 −102 sys/dev/e1000/e1000_i210.c
  145. +6 −2 sys/dev/e1000/e1000_i210.h
  146. +285 −151 sys/dev/e1000/e1000_ich8lan.c
  147. +34 −16 sys/dev/e1000/e1000_ich8lan.h
  148. +29 −11 sys/dev/e1000/e1000_mac.c
  149. +1 −0  sys/dev/e1000/e1000_osdep.h
  150. +231 −54 sys/dev/e1000/e1000_phy.c
  151. +14 −4 sys/dev/e1000/e1000_phy.h
  152. +10 −2 sys/dev/e1000/e1000_regs.h
  153. +54 −52 sys/dev/e1000/e1000_vf.h
  154. +498 −435 sys/dev/e1000/if_igb.c
Sorry, we could not display the entire diff because it was too big.
View
25 ObsoleteFiles.inc
@@ -38,29 +38,8 @@
# xargs -n1 | sort | uniq -d;
# done
-# 20131015: removal of RCS from base
-OLD_FILES+=usr/bin/ci
-OLD_FILES+=usr/bin/co
-OLD_FILES+=usr/bin/ident
-OLD_FILES+=usr/bin/merge
-OLD_FILES+=usr/bin/rcs
-OLD_FILES+=usr/bin/rcsclean
-OLD_FILES+=usr/bin/rcsdiff
-OLD_FILES+=usr/bin/rcsfreeze
-OLD_FILES+=usr/bin/rcsmerge
-OLD_FILES+=usr/bin/rlog
-OLD_FILES+=usr/share/man/man1/ci.1.gz
-OLD_FILES+=usr/share/man/man1/co.1.gz
-OLD_FILES+=usr/share/man/man1/ident.1.gz
-OLD_FILES+=usr/share/man/man1/merge.1.gz
-OLD_FILES+=usr/share/man/man1/rcs.1.gz
-OLD_FILES+=usr/share/man/man1/rcsclean.1.gz
-OLD_FILES+=usr/share/man/man1/rcsdiff.1.gz
-OLD_FILES+=usr/share/man/man1/rcsfreeze.1.gz
-OLD_FILES+=usr/share/man/man1/rcsintro.1.gz
-OLD_FILES+=usr/share/man/man1/rcsmerge.1.gz
-OLD_FILES+=usr/share/man/man1/rlog.1.gz
-OLD_FILES+=usr/share/man/man5/rcsfile.5.gz
+# 20131009: freebsd-version moved from /libexec to /bin
+OLD_FILES+=/libexec/freebsd-version
# 20131001: ar and ranlib from binutils not used
OLD_FILES+=usr/bin/gnu-ar
OLD_FILES+=usr/bin/gnu-ranlib
View
36 UPDATING
@@ -16,8 +16,8 @@ from older versions of FreeBSD, try WITHOUT_CLANG to bootstrap to the tip of
head, and then rebuild without this option. The bootstrap process from
older version of current is a bit fragile.
-NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS SLOW:
- FreeBSD 10.x has many debugging features turned on, in both the kernel
+NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
+ FreeBSD 11.x has many debugging features turned on, in both the kernel
and userland. These features attempt to detect incorrect use of
system primitives, and encourage loud failure through extra sanity
checking and fail stop semantics. They also substantially impact
@@ -31,6 +31,25 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20131010:
+ The rc.d/jail script has been updated to support jail(8)
+ configuration file. The "jail_<jname>_*" rc.conf(5) variables
+ for per-jail configuration are automatically converted to
+ /var/run/jail.<jname>.conf before the jail(8) utility is invoked.
+ This is transparently backward compatible. See below about some
+ incompatibilities and rc.conf(5) manual page for more details.
+
+ These variables are now deprecated in favor of jail(8) configuration
+ file. One can use "rc.d/jail config <jname>" command to generate
+ a jail(8) configuration file in /var/run/jail.<jname>.conf without
+ running the jail(8) utility. The default pathname of the
+ configuration file is /etc/jail.conf and can be specified by
+ using $jail_conf or $jail_<jname>_conf variables.
+
+ Please note that jail_devfs_ruleset accepts an integer at
+ this moment. Please consider to rewrite the ruleset name
+ with an integer.
+
20130930:
BIND has been removed from the base system. If all you need
is a local resolver, simply enable and start the local_unbound
@@ -73,19 +92,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS SLOW:
has been updated to use this support. A new gcc is required to build
the aesni module on both i386 and amd64.
-20130827:
- Thomas Dickey (vendor author thereof) reports that dialog(1) since
- 2011/10/18 has a bug in handling --hline. Testers and I noticed the
- --hline is not ignored but displayed as a NULL string, regardless of
- value. This will cause confusion in some bsdconfig dialogs where the
- --hline is used to inform users which keybindings to use. This will
- likewise affect any other persons relying on --hline. It also looks
- rather strange seeing "[]" at the bottom of dialog(1) widgets when
- passing --hline "anything". Thomas said he will have a look in a few
- weeks. NOTE: The "[]" brackets appear with the left-edge where it
- would normally appear given the width of text to display, but the
- displayed text is not there (part of the bug).
-
20130821:
The PADLOCK_RNG and RDRAND_RNG kernel options are now devices.
Thus "device padlock_rng" and "device rdrand_rng" should be
View
1  bin/Makefile
@@ -15,6 +15,7 @@ SUBDIR= cat \
echo \
ed \
expr \
+ freebsd-version \
getfacl \
hostname \
kenv \
View
3  libexec/freebsd-version/Makefile → bin/freebsd-version/Makefile
@@ -2,12 +2,11 @@
SCRIPTS = freebsd-version
MAN = freebsd-version.1
-BINDIR = /libexec
CLEANFILES = freebsd-version.sh
NEWVERS = ${.CURDIR}/../../sys/conf/newvers.sh
freebsd-version.sh.in: ${NEWVERS}
-freebsd-version.sh: freebsd-version.sh.in
+freebsd-version.sh: ${.CURDIR}/freebsd-version.sh.in
eval $$(egrep '^(TYPE|REVISION|BRANCH)=' ${NEWVERS}) ; \
if ! sed -e "\
s/@@TYPE@@/$${TYPE}/g; \
View
4 libexec/freebsd-version/freebsd-version.1 → bin/freebsd-version/freebsd-version.1
@@ -100,13 +100,13 @@ and the kernel.
.Sh EXAMPLES
To determine the version of the currently running userland:
.Bd -literal -offset indent
-/libexec/freebsd-version -u
+/bin/freebsd-version -u
.Ed
.Pp
To inspect a system being repaired using a live CD:
.Bd -literal -offset indent
mount -rt ufs /dev/ada0p2 /mnt
-env ROOT=/mnt /mnt/libexec/freebsd-version -ku
+env ROOT=/mnt /mnt/bin/freebsd-version -ku
.Ed
.Sh SEE ALSO
.Xr uname 1 ,
View
0  libexec/freebsd-version/freebsd-version.sh.in → bin/freebsd-version/freebsd-version.sh.in
File renamed without changes
View
1,297 cddl/contrib/opensolaris/cmd/dtrace/dtrace.1
@@ -2,7 +2,7 @@
.\" CDDL HEADER START
.\"
.\" The contents of this file are subject to the terms of the
-.\" Common Development and Distribution License (the "License").
+.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
@@ -18,653 +18,660 @@
.\"
.\" CDDL HEADER END
.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
-.TH dtrace 1M "5 Sep 2006" "SunOS 5.11" "System Administration Commands"
-.SH NAME
-dtrace \- DTrace dynamic tracing compiler and tracing utility
-.SH SYNOPSIS
-.LP
-.nf
-\fBdtrace\fR [\fB-32\fR | \fB-64\fR] [\fB-aACeFGHhlqSvVwZ\fR] [\fB-b\fR \fIbufsz\fR] [\fB-c\fR \fIcmd\fR]
- [\fB-D\fR \fIname\fR [\fI=value\fR]] [\fB-I\fR \fIpath\fR] [\fB-L\fR \fIpath\fR] [\fB-o\fR \fIoutput\fR]
- [\fB-s\fR \fIscript\fR] [\fB-U\fR \fIname\fR] [\fB-x\fR \fIarg\fR [\fI=val\fR]]
- [\fB-X\fR a | c | s | t] [\fB-p\fR \fIpid\fR]
- [\fB-P\fR \fIprovider\fR [[\fIpredicate\fR] \fIaction\fR]]
- [\fB-m\fR [\fIprovider:\fR] \fImodule\fR [[\fIpredicate\fR] \fIaction\fR]]
- [\fB-f\fR [[\fIprovider:\fR] \fImodule:\fR] \fIfunction\fR [[\fIpredicate\fR] \fIaction\fR]]
- [\fB-n\fR [[[\fIprovider:\fR] \fImodule:\fR] \fIfunction:\fR] \fIname\fR [[\fIpredicate\fR] \fIaction\fR]]
- [\fB-i\fR \fIprobe-id\fR [[\fIpredicate\fR] \fIaction\fR]]
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-DTrace is a comprehensive dynamic tracing framework for the Solaris Operating System. DTrace provides a powerful infrastructure that permits administrators, developers, and service personnel to concisely answer arbitrary questions about the behavior of the operating system and user programs.
-.sp
-.LP
-The \fISolaris Dynamic Tracing Guide\fR describes how to use DTrace to observe, debug, and tune system behavior. Refer to this book for a detailed description of DTrace features, including the bundled DTrace observability
-tools, instrumentation providers, and the D programming language.
-.sp
-.LP
-The \fBdtrace\fR command provides a generic interface to the essential services provided by the DTrace facility, including:
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 5, 2013
+.Dt DTRACE 1
+.Os
+.Sh NAME
+.Nm dtrace
+.Nd dynamic tracing compiler and tracing utility
+.Sh SYNOPSIS
+.Nm
+.Op Fl 32 | Fl 64
+.Op Fl aACeFGhHlqSvVwZ
+.Op Fl b Ar bufsz
+.Op Fl c Ar cmd
+.Op Fl D Ar name Op Ns = Ns value
+.Op Fl I Ar path
+.Op Fl L Ar path
+.Op Fl o Ar output
+.Op Fl s Ar script
+.Op Fl U Ar name
+.Op Fl x Ar arg Op Ns = Ns value
+.Op Fl X Cm a | c | s | t
+.Op Fl p Ar pid
+.Op Fl P Ar provider Oo Oo Ar predicate Oc Ar action Oc
+.Op Fl m Oo Ar provider : Oc Ar module Oo Oo Ar predicate Oc Ar action Oc
+.Op Fl f Oo Oo Ar provider : Oc Ar module : Oc Ar function Oo Oo Ar predicate \
+ Oc Ar action Oc
+.Op Fl n Oo Oo Oo Ar provider : Oc Ar module : Oc Ar function : Oc Ar name \
+ Oo Oo Ar predicate Oc Ar action Oc
+.Op Fl i Ar probe-id Oo Oo Ar predicate Oc Ar action Oc
+.Sh DESCRIPTION
+DTrace is a comprehensive dynamic tracing framework ported from Solaris.
+DTrace provides a powerful infrastructure that permits administrators,
+developers, and service personnel to concisely answer arbitrary questions about
+the behavior of the operating system and user programs.
+.Pp
+The
+.Nm
+command provides a generic interface to the essential services provided by the
+DTrace facility, including:
+.Bl -bullet -offset indent
+.It
Options that list the set of probes and providers currently published by DTrace
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-Options that enable probes directly using any of the probe description specifiers (provider, module, function, name)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-Options that run the D compiler and compile one or more D program files or programs written directly on the command line
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.It
+Options that enable probes directly using any of the probe description
+specifiers (provider, module, function, name)
+.It
+Options that run the D compiler and compile one or more D program files or
+programs written directly on the command line
+.It
Options that generate anonymous tracing programs
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.It
Options that generate program stability reports
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-Options that modify DTrace tracing and buffering behavior and enable additional D compiler features
-.RE
-.sp
-.LP
-You can use \fBdtrace\fR to create D scripts by using it in a \fB#!\fR declaration to create an interpreter file. You can also use \fBdtrace\fR to attempt to compile D programs and determine their properties without actually enabling tracing using the \fB-e\fR option. See \fBOPTIONS\fR. See the \fISolaris Dynamic Tracing Guide\fR for detailed examples of how to use the \fBdtrace\fR utility to perform these tasks.
-.SH OPTIONS
-.sp
-.LP
-The arguments accepted by the \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, and \fB-i\fR options can include an optional D language \fIpredicate\fR enclosed in slashes \fB//\fR and optional D language \fIaction\fR statement list enclosed in braces \fB{}\fR. D program code specified on the command line must be appropriately quoted to avoid intepretation of meta-characters by the shell.
-.sp
-.LP
+.It
+Options that modify DTrace tracing and buffering behavior and enable
+additional D compiler features
+.El
+.Pp
+You can use
+.Nm
+to create D scripts by using it in a shebang declaration to create an
+interpreter file.
+You can also use
+.Nm
+to attempt to compile D programs and determine their properties without
+actually enabling traces using the
+.Fl e
+option.
+.Sh OPTIONS
+The arguments accepted by the
+.Fl P ,
+.Fl m ,
+.Fl f ,
+.Fl n ,
+and
+.Fl i
+options can include an optional D language
+.Ar predicate
+enclosed in slashes and an optional D language
+.Ar action
+statement list enclosed in braces.
+D program code specified on the command line must be appropriately quoted to
+avoid interpretation of meta-characters by the shell.
+.Pp
The following options are supported:
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-32\fR | \fB-64\fR\fR
-.ad
-.sp .6
-.RS 4n
-The D compiler produces programs using the native data model of the operating system kernel. You can use the \fBisainfo\fR \fB-b\fR command to determine the current operating system data model. If the \fB-32\fR option is specified, \fBdtrace\fR forces
-the D compiler to compile a D program using the 32-bit data model. If the \fB-64\fR option is specified, \fBdtrace\fR forces the D compiler to compile a D program using the 64-bit data model. These options are typically not required as \fBdtrace\fR selects the
-native data model as the default. The data model affects the sizes of integer types and other language properties. D programs compiled for either data model can be executed on both 32-bit and 64-bit kernels. The \fB-32\fR and \fB-64\fR options also determine the ELF file format
-(ELF32 or ELF64) produced by the \fB-G\fR option.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-a\fR\fR
-.ad
-.sp .6
-.RS 4n
-Claim anonymous tracing state and display the traced data. You can combine the \fB-a\fR option with the \fB-e\fR option to force \fBdtrace\fR to exit immediately after consuming the anonymous tracing state rather than continuing to wait for new
-data. See the \fISolaris Dynamic Tracing Guide\fR for more information about anonymous tracing.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-A\fR\fR
-.ad
-.sp .6
-.RS 4n
-Generate \fBdriver.conf\fR(4) directives for anonymous tracing. This option constructs a set of \fBdtrace\fR(7D) configuration file directives to enable the specified probes for anonymous tracing and then exits. By default, \fBdtrace\fR attempts to store the directives to the file \fB/kernel/drv/dtrace.conf\fR. You can modify this behavior if you use the \fB-o\fR option to specify an alternate output file.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-b\fR \fIbufsz\fR\fR
-.ad
-.sp .6
-.RS 4n
-Set principal trace buffer size (\fIbufsz\fR). The trace buffer size can include any of the size suffixes \fBk\fR, \fBm\fR, \fBg\fR, or \fBt\fR. If the buffer space cannot be allocated, \fBdtrace\fR attempts
-to reduce the buffer size or exit depending on the setting of the \fBbufresize\fR property.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-c\fR \fIcmd\fR\fR
-.ad
-.sp .6
-.RS 4n
-Run the specified command \fIcmd\fR and exit upon its completion. If more than one \fB-c\fR option is present on the command line, \fBdtrace\fR exits when all commands have exited, reporting the exit status for each child process as it
-terminates. The process-ID of the first command is made available to any D programs specified on the command line or using the \fB-s\fR option through the \fB$target\fR macro variable. Refer to the \fISolaris Dynamic Tracing Guide\fR for more information
-on macro variables.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-C\fR\fR
-.ad
-.sp .6
-.RS 4n
-Run the C preprocessor \fBcpp\fR(1) over D programs before compiling them. You can pass options to the C preprocessor using the \fB-D\fR, \fB-U\fR, \fB-I\fR, and \fB-H\fR options. You can select the degree of C standard conformance if you use the \fB-X\fR option. For a description of the set of tokens defined by the D compiler when invoking the C preprocessor, see \fB-X\fR.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-D\fR \fIname\fR \fB[=\fR\fIvalue\fR\fB]\fR\fR
-.ad
-.sp .6
-.RS 4n
-Define \fIname\fR when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). If you specify the equals sign (\fB=\fR)
-and additional \fIvalue\fR, the name is assigned the corresponding value. This option passes the \fB-D\fR option to each \fBcpp\fR invocation.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-e\fR\fR
-.ad
-.sp .6
-.RS 4n
-Exit after compiling any requests and consuming anonymous tracing state (\fB-a\fR option) but prior to enabling any probes. You can combine this option with the \fB-a\fR option to print anonymous tracing data and exit. You can also combine this option with D
-compiler options. This combination verifies that the programs compile without actually executing them and enabling the corresponding instrumentation.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-f\fR\fB[[\fR\fIprovider\fR\fB:]\fR\fImodule\fR\fB:]\fR\fIfunction\fR\fB[[\fR\fIpredicate\fR\fB]\fR\fIaction\fR\fB]]\fR\fR
-.ad
-.sp .6
-.RS 4n
-Specify function name to trace or list (\fB-l\fR option). The corresponding argument can include any of the probe description forms \fIprovider:module:function\fR, \fImodule:function\fR, or \fIfunction\fR.
-Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than \fIfunction\fR are specified in the description, all probes with the corresponding \fIfunction\fR are matched.
-The \fB-f\fR argument can be suffixed with an optional D probe clause. You can specify more than one \fB-f\fR option on the command line at a time.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-F\fR\fR
-.ad
-.sp .6
-.RS 4n
-Coalesce trace output by identifying function entry and return. Function entry probe reports are indented and their output is prefixed with \fB->\fR. Function return probe reports are unindented and their output is prefixed with \fB<-\fR\&. System call
-entry probe reports are indented and their output is prefixed with \fB=>\fR. System call return probe reports are unindented and their output is prefixed with \fB<=\fR\&.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-G\fR\fR
-.ad
-.sp .6
-.RS 4n
-Generate an ELF file containing an embedded DTrace program. The DTrace probes specified in the program are saved inside of a relocatable ELF object which can be linked into another program. If the \fB-o\fR option is present, the ELF file is saved using the pathname specified
-as the argument for this operand. If the \fB-o\fR option is not present and the DTrace program is contained with a file whose name is \fB\fIfilename\fR.d\fR, then the ELF file is saved using the name \fB\fIfilename\fR.o\fR.
-Otherwise the ELF file is saved using the name \fBd.out\fR.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-H\fR\fR
-.ad
-.sp .6
-.RS 4n
-Print the pathnames of included files when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). This option passes the \fB-H\fR option
-to each \fBcpp\fR invocation, causing it to display the list of pathnames, one for each line, to \fBstderr\fR.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-h\fR\fR
-.ad
-.sp .6
-.RS 4n
-Generate a header file containing macros that correspond to probes in the specified provider definitions. This option should be used to generate a header file that is included by other source files for later use with the \fB-G\fR option. If the \fB-o\fR option
-is present, the header file is saved using the pathname specified as the argument for that option. If the \fB-o\fR option is not present and the DTrace program is contained with a file whose name is \fIfilename\fR\fB\&.d\fR, then the header file is saved
-using the name \fIfilename\fR\fB\&.h\fR.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-i\fR \fIprobe-id\fR\fB[[\fR\fIpredicate\fR] \fIaction\fR\fB]\fR\fR
-.ad
-.sp .6
-.RS 4n
-Specify probe identifier (\fIprobe-id\fR) to trace or list (\fB-l\fR option). You can specify probe IDs using decimal integers as shown by \fBdtrace\fR \fB-l\fR. The \fB-i\fR argument can be suffixed with an optional
-D probe clause. You can specify more than one \fB-i\fR option at a time.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-I\fR \fIpath\fR\fR
-.ad
-.sp .6
-.RS 4n
-Add the specified directory \fIpath\fR to the search path for \fB#include\fR files when invoking \fBcpp\fR(1) (enabled
-using the \fB-C\fR option). This option passes the \fB-I\fR option to each \fBcpp\fR invocation. The specified \fIpath\fR is inserted into the search path ahead of the default directory list.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-L\fR \fIpath\fR\fR
-.ad
-.sp .6
-.RS 4n
-Add the specified directory \fIpath\fR to the search path for DTrace libraries. DTrace libraries are used to contain common definitions that can be used when writing D programs. The specified \fIpath\fR is added after the default library
-search path.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-l\fR\fR
-.ad
-.sp .6
-.RS 4n
-List probes instead of enabling them. If the \fB-l\fR option is specified, \fBdtrace\fR produces a report of the probes matching the descriptions given using the \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, \fB-i\fR,
-and \fB-s\fR options. If none of these options are specified, this option lists all probes.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-m\fR [[\fIprovider:\fR] \fImodule:\fR [[\fIpredicate\fR] \fIaction\fR]]\fR
-.ad
-.sp .6
-.RS 4n
-Specify module name to trace or list (\fB-l\fR option). The corresponding argument can include any of the probe description forms \fIprovider:module\fR or \fImodule\fR. Unspecified probe description fields are left blank and match
-any probes regardless of the values in those fields. If no qualifiers other than \fImodule\fR are specified in the description, all probes with a corresponding \fImodule\fR are matched. The \fB-m\fR argument can be suffixed with an optional D
-probe clause. More than one \fB-m\fR option can be specified on the command line at a time.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-n\fR [[[\fIprovider:\fR] \fImodule:\fR] \fIfunction:\fR] \fIname\fR [[\fIpredicate\fR] \fIaction\fR]\fR
-.ad
-.sp .6
-.RS 4n
-Specify probe name to trace or list (\fB-l\fR option). The corresponding argument can include any of the probe description forms \fIprovider:module:function:name\fR, \fImodule:function:name\fR, \fIfunction:name\fR,
-or \fIname\fR. Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than \fIname\fR are specified in the description, all probes with a corresponding \fIname\fR are
-matched. The \fB-n\fR argument can be suffixed with an optional D probe clause. More than one \fB-n\fR option can be specified on the command line at a time.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-o\fR \fIoutput\fR\fR
-.ad
-.sp .6
-.RS 4n
-Specify the \fIoutput\fR file for the \fB-A\fR , \fB-G\fR, and \fB-l\fR options, or for the traced data itself. If the \fB-A\fR option is present and \fB-o\fR is not present, the default output file is \fB/kernel/drv/dtrace.conf\fR. If the \fB-G\fR option is present and the \fB-s\fR option's argument is of the form \fB\fIfilename\fR.d\fR and \fB-o\fR is not present, the default output file is \fB\fIfilename\fR.o\fR.
-Otherwise the default output file is \fBd.out\fR.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-p\fR \fIpid\fR\fR
-.ad
-.sp .6
-.RS 4n
-Grab the specified process-ID \fIpid\fR, cache its symbol tables, and exit upon its completion. If more than one \fB-p\fR option is present on the command line, \fBdtrace\fR exits when all commands have exited, reporting the exit status
-for each process as it terminates. The first process-ID is made available to any D programs specified on the command line or using the \fB-s\fR option through the \fB$target\fR macro variable. Refer to the \fISolaris Dynamic Tracing Guide\fR for
-more information on macro variables.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-P\fR \fIprovider\fR \fB[[\fR\fIpredicate\fR\fB]\fR \fIaction\fR]\fR
-.ad
-.sp .6
-.RS 4n
-Specify provider name to trace or list (\fB-l\fR option). The remaining probe description fields module, function, and name are left blank and match any probes regardless of the values in those fields. The \fB-P\fR argument can be suffixed with an optional D
-probe clause. You can specify more than one \fB-P\fR option on the command line at a time.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-q\fR\fR
-.ad
-.sp .6
-.RS 4n
-Set quiet mode. \fBdtrace\fR suppresses messages such as the number of probes matched by the specified options and D programs and does not print column headers, the CPU ID, the probe ID, or insert newlines into the output. Only data traced and formatted by D program
-statements such as \fBtrace()\fR and \fBprintf()\fR is displayed to \fBstdout\fR.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-s\fR\fR
-.ad
-.sp .6
-.RS 4n
-Compile the specified D program source file. If the \fB-e\fR option is present, the program is compiled but instrumentation is not enabled. If the \fB-l\fR option is present, the program is compiled and the set of probes matched by it is listed, but instrumentation
-is not enabled. If none of \fB-e\fR, \fB-l\fR, \fB-G\fR, or \fB-A\fR are present, the instrumentation specified by the D program is enabled and tracing begins.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-S\fR\fR
-.ad
-.sp .6
-.RS 4n
-Show D compiler intermediate code. The D compiler produces a report of the intermediate code generated for each D program to \fBstderr\fR.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-U\fR \fIname\fR\fR
-.ad
-.sp .6
-.RS 4n
-Undefine the specified \fIname\fR when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). This option passes the \fB-U\fR option to each \fBcpp\fR invocation.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-v\fR\fR
-.ad
-.sp .6
-.RS 4n
-Set verbose mode. If the \fB-v\fR option is specified, \fBdtrace\fR produces a program stability report showing the minimum interface stability and dependency level for the specified D programs. DTrace stability levels are explained in further detail in the \fISolaris Dynamic Tracing Guide\fR.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-V\fR\fR
-.ad
-.sp .6
-.RS 4n
-Report the highest D programming interface version supported by \fBdtrace\fR. The version information is printed to \fBstdout\fR and the \fBdtrace\fR command exits. Refer to the \fISolaris Dynamic Tracing Guide\fR for
-more information about DTrace versioning features.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-w\fR\fR
-.ad
-.sp .6
-.RS 4n
-Permit destructive actions in D programs specified using the \fB-s\fR, \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, or \fB-i\fR options. If the \fB-w\fR option is not specified, \fBdtrace\fR does not
-permit the compilation or enabling of a D program that contains destructive actions.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-x\fR \fIarg\fR [\fI=val\fR]\fR
-.ad
-.sp .6
-.RS 4n
-Enable or modify a DTrace runtime option or D compiler option. The list of options is found in the \fISolaris Dynamic Tracing Guide\fR. Boolean options are enabled by specifying their name. Options with values are set by separating the option name and
-value with an equals sign (\fB=\fR).
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-X\fR \fBa | c | s | t\fR\fR
-.ad
-.sp .6
-.RS 4n
-Specify the degree of conformance to the ISO C standard that should be selected when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option).
-The \fB-X\fR option argument affects the value and presence of the \fB__STDC__\fR macro depending upon the value of the argument letter.
-.sp
-The \fB-X\fR option supports the following arguments:
-.sp
-.ne 2
-.mk
-.na
-\fB\fBa\fR\fR
-.ad
-.RS 5n
-.rt
-Default. ISO C plus K&R compatibility extensions, with semantic changes required by ISO C. This is the default mode if \fB-X\fR is not specified. The predefined macro \fB__STDC__\fR has a value of 0 when \fBcpp\fR is invoked in conjunction
-with the \fB-Xa\fR option.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBc\fR\fR
-.ad
-.RS 5n
-.rt
-Conformance. Strictly conformant ISO C, without K&R C compatibility extensions. The predefined macro \fB__STDC__\fR has a value of 1 when \fBcpp\fR is invoked in conjunction with the \fB-Xc\fR option.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBs\fR\fR
-.ad
-.RS 5n
-.rt
-K&R C only. The macro \fB__STDC__\fR is not defined when \fBcpp\fR is invoked in conjunction with the \fB-Xs\fR option.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBt\fR\fR
-.ad
-.RS 5n
-.rt
-Transition. ISO C plus K&R C compatibility extensions, without semantic changes required by ISO C. The predefined macro \fB__STDC__\fR has a value of 0 when \fBcpp\fR is invoked in conjunction with the \fB-Xt\fR option.
-.RE
-
-As the \fB-X\fR option only affects how the D compiler invokes the C preprocessor, the \fB-Xa\fR and \fB-Xt\fR options are equivalent from the perspective of D and both are provided only to ease re-use of settings from a C build environment.
-.sp
-Regardless of the \fB-X\fR mode, the following additional C preprocessor definitions are always specified and valid in all modes:
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fB__sun\fR
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fB__unix\fR
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fB__SVR4\fR
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fB__sparc\fR (on SPARC systems only)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fB__sparcv9\fR (on SPARC systems only when 64-bit programs are compiled)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fB__i386\fR (on x86 systems only when 32-bit programs are compiled)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fB__amd64\fR (on x86 systems only when 64-bit programs are compiled)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fB__\fI`uname -s`\fR_\fI`uname -r`\fR\fR (for example, \fB__SunOS_5_10\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fB__SUNW_D=1\fR
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fB__SUNW_D_VERSION=0x\fIMMmmmuuu\fR\fR
-.sp
-Where \fIMM\fR is the major release value in hexadecimal, \fImmm\fR is the minor release value in hexadecimal, and \fIuuu\fR is the
-micro release value in hexadecimal. Refer to the \fISolaris Dynamic Tracing Guide\fR for more information about DTrace versioning.
-.RE
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-Z\fR\fR
-.ad
-.sp .6
-.RS 4n
-Permit probe descriptions that match zero probes. If the \fB-Z\fR option is not specified, \fBdtrace\fR reports an error and exits if any probe descriptions specified in D program files (\fB-s\fR option) or on the command line (\fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, or \fB-i\fR options) contain descriptions that do not match any known probes.
-.RE
-
-.SH OPERANDS
-.sp
-.LP
-You can specify zero or more additional arguments on the \fBdtrace\fR command line to define a set of macro variables (\fB$1\fR, \fB$2\fR, and so forth). The additional arguments can be used in D programs specified using the \fB-s\fR option
-or on the command line. The use of macro variables is described further in the \fISolaris Dynamic Tracing Guide\fR.
-.SH EXIT STATUS
-.sp
-.LP
-The following exit values are returned:
-.sp
-.ne 2
-.mk
-.na
-\fB0\fR
-.ad
-.RS 5n
-.rt
-Successful completion.
-.sp
-For D program requests, an exit status of \fB0\fR indicates that programs were successfully compiled, probes were successfully enabled, or anonymous state was successfully retrieved. \fBdtrace\fR returns \fB0\fR even if the specified tracing requests
-encountered errors or drops.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB1\fR\fR
-.ad
-.RS 5n
-.rt
+.Bl -tag -width indent
+.It Fl 32 | Fl 64
+The D compiler produces programs using the native data model of the operating
+system kernel.
+If the
+.Fl 32
+option is specified,
+.Nm
+forces the D compiler to compile a D program using the 32-bit data model.
+If the
+.Fl 64
+option is specified,
+.Nm
+forces the D compiler to compile a D program using the 64-bit data model.
+These options are typically not required as
+.Nm
+selects the native data model as the default.
+The data model affects the sizes of integer types and other language properties.
+D programs compiled for either data model can be executed on both 32-bit and
+64-bit kernels.
+The
+.Fl 32
+and
+.Fl 64
+options also determine the
+.Xr elf 5
+file format (ELF32 or ELF64) produced by the
+.Fl G
+option.
+.It Fl a
+Claim anonymous tracing state and display the traced data.
+You can combine the
+.Fl a
+option with the
+.Fl e
+option to force
+.Nm
+to exit immediately after consuming the anonymous tracing state rather than
+continuing to wait for new data.
+.It Fl A
+Generate directives for anonymous tracing and write them to
+.Pa /boot/dtrace.dof .
+This option constructs a set of dtrace configuration file directives to enable
+the specified probes for anonymous tracing and then exits.
+By default,
+.Nm
+attempts to store the directives to the file
+.Pa /boot/dtrace.dof .
+This behavior can be modified using the
+.Fl o
+option to specify an alternate output file.
+.It Fl b Ar bufsz
+Set the principal trace buffer size to
+.Ar bufsz .
+The trace buffer size can include any of the size suffixes k, m, g, or t.
+If the buffer space cannot be allocated,
+.Nm dtrace
+attempts to reduce the buffer size or exit depending on the setting of the
+bufresize property.
+.It Fl c Ar cmd
+Run the specified command
+.Ar cmd
+and exit upon its completion.
+If more than one
+.Fl c
+option is present on the command line,
+.Nm dtrace
+exits when all commands have exited, reporting the exit status for each child
+process as it terminates.
+The process ID of the first command is made available to any D programs
+specified on the command line or using the
+.Fl s
+option through the
+.Li $target
+macro variable.
+.It Fl C
+Run the C preprocessor
+.Xr cpp 1
+over D programs before compiling them.
+You can pass options to the C preprocessor using the
+.Fl D ,
+.Fl U ,
+.Fl I ,
+and
+.Fl H
+options.
+You can select the degree of C standard conformance if you use the
+.Fl X
+option.
+For a description of the set of tokens defined by the D compiler when invoking
+the C preprocessor, see
+.Fl X .
+.It Fl D Ar name Op Ns = Ns value
+Define
+.Ar name
+when invoking
+.Xr cpp 1
+(enabled using the
+.Fl C
+option).
+If you specify an additional
+.Ar value ,
+the name is assigned the corresponding value.
+This option passes the
+.Fl D
+option to each
+.Xr cpp 1
+invocation.
+.It Fl e
+Exit after compiling any requests and consuming anonymous tracing state
+.Fl ( a
+option) but prior to enabling any probes.
+You can combine this option with the
+.Fl a
+option to print anonymous tracing data and exit.
+You can also combine this option with D compiler options.
+This combination verifies that the programs compile without actually executing
+them and enabling the corresponding instrumentation.
+.It Fl f Oo Oo Ar provider : Oc Ar module : Oc Ar function Oo Oo Ar predicate \
+ Oc Ar action Oc
+Specify function name to trace or list
+.Fl ( l
+option).
+The corresponding argument can include any of the probe description forms
+.Ar provider:module:function ,
+.Ar module:function ,
+or
+.Ar function .
+Unspecified probe description fields are left blank and match any probes
+regardless of the values in those fields.
+If no qualifiers other than
+.Ar function
+are specified in the description, all probes with the corresponding
+.Ar function
+are matched.
+The
+.Fl f
+argument can be suffixed with an optional D probe clause.
+You can specify more than one
+.Fl f
+option on the command line at a time.
+.It Fl F
+Coalesce trace output by identifying function entry and return.
+Function entry probe reports are indented and their output is prefixed with
+.Ql -> .
+Function return probe reports are unindented and their output is prefixed with
+.Ql <- .
+System call entry probe reports are indented and their output is prefixed with
+.Ql => .
+System call return probe reports are unindented and their output is prefixed
+with
+.Ql <= .
+.It Fl G
+Generate an ELF file containing an embedded DTrace program.
+The DTrace probes specified in the program are saved inside of a relocatable ELF
+object which can be linked into another program.
+If the
+.Fl o
+option is present, the ELF file is saved using the pathname specified as the
+argument for this operand.
+If the
+.Fl o
+option is not present and the DTrace program is contained with a file whose name
+is
+.Ar filename.d ,
+then the ELF file is saved using the name
+.Ar filename.o .
+Otherwise the ELF file is saved using the name d.out.
+.It Fl h
+Generate a header file containing macros that correspond to probes in the
+specified provider definitions.
+This option should be used to generate a header file that is included by other
+source files for later use with the
+.It Fl H
+Print the pathnames of included files when invoking
+.Xr cpp 1
+(enabled using the
+.Fl C
+option).
+This option passes the
+.Fl H
+option to each
+.Xr cpp 1
+invocation, causing it to display the list of pathnames, one for each line, to
+standard error.
+.Fl G
+option.
+If the
+.Fl o
+option
+is present, the header file is saved using the pathname specified as the
+argument for that option.
+If the
+.Fl o
+option is not present and the DTrace program is contained with a file whose
+name is
+.Ar filename.d ,
+then the header file is saved using the name
+.Ar filename.h .
+.It Fl i Ar probe-id Op Oo Ar predicate Oc Ar action
+Specify probe identifier
+.Ar ( probe-id )
+to trace or list
+.Ar ( l
+option).
+You can specify probe IDs using decimal integers as shown by `dtrace -l`.
+The
+.Fl i
+argument can be suffixed with an optional D probe clause.
+You can specify more than one
+.Fl i
+option at a time.
+.It Fl I Ar path
+Add the specified directory
+.Ar path
+to the search path for #include files when invoking
+.Xr cpp 1
+(enabled using the
+.Fl C
+option).
+This option passes the
+.Fl I
+option to each
+.Xr cpp 1
+invocation.
+The specified
+.Ar path
+is inserted into the search path ahead of the default directory list.
+.It Fl l
+List probes instead of enabling them.
+If the
+.Fl l
+option is specified,
+.Nm
+produces a report of the probes matching the descriptions given using the
+.Fl P , m , f , n , i ,
+and
+.Fl s
+options.
+If none of these options are specified, this option lists all probes.
+.It Fl L Ar path
+Add the specified directory
+.Ar path
+to the search path for DTrace libraries.
+DTrace libraries are used to contain common definitions that can be used when
+writing D programs.
+The specified
+.Ar path
+is added after the default library search path.
+.It Fl m Oo Ar provider : Oc Ar module Oo Oo Ar predicate Oc Ar action Oc
+Specify module name to trace or list
+.Fl ( l
+option).
+The corresponding argument can include any of the probe description forms
+.Ar provider:module
+or
+.Ar module .
+Unspecified probe description fields are left blank and match any probes
+regardless of the values in those fields.
+If no qualifiers other than
+.Ar module
+are specified in the description, all probes with a corresponding
+.Ar module
+are matched.
+The
+.Fl m
+argument can be suffixed with an optional D probe clause.
+More than one
+.Fl m
+option can be specified on the command line at a time.
+.It Fl n Oo Oo Oo Ar provider : Oc Ar module : Oc Ar function : Oc Ar name \
+ Oo Oo Ar predicate Oc Ar action Oc
+Specify probe name to trace or list
+.Fl ( l
+option).
+The corresponding argument can include any of the probe description forms
+.Ar provider:module:function:name , module:function:name , function:name ,
+or
+.Ar name .
+Unspecified probe description fields are left blank and match any probes
+regardless of the values in those fields.
+If no qualifiers other than
+.Ar name
+are specified in the description, all probes with a corresponding
+.Ar name
+are matched.
+The
+.Fl n
+argument can be suffixed with an optional D probe clause.
+More than one
+.Fl n
+option can be specified on the command line at a time.
+.It Fl o Ar output
+Specify the
+.Ar output
+file for the
+.Fl A , G ,
+and
+.Fl l
+options, or for the traced data itself.
+If the
+.Fl A
+option is present and
+.Fl o
+is not present, the default output file is
+.Pa /boot/dtrace.dof .
+If the
+.Fl G
+option is present and the
+.Fl s
+option's argument is of the form
+.Ar filename.d
+and
+.Fl o
+is not present, the default output file is
+.Ar filename.o .
+Otherwise the default output file is
+.Ar d.out .
+.It Fl p Ar pid
+Grab the specified process-ID
+.Ar pid ,
+cache its symbol tables, and exit upon its completion.
+If more than one
+.Fl p
+option is present on the command line,
+.Nm
+exits when all commands have exited, reporting the exit status for each process
+as it terminates.
+The first process-ID is made available to any D programs specified on the
+command line or using the
+.Fl s
+option through the
+.Li $target
+macro variable.
+.It Fl P Ar provider Oo Oo Ar predicate Oc Ar action Oc
+Specify provider name to trace or list
+.Fl ( l
+option).
+The remaining probe description fields module, function, and name are left
+blank and match any probes regardless of the values in those fields.
+The
+.Fl P
+argument can be suffixed with an optional D probe clause.
+You can specify more than one
+.Fl P
+option on the command line at a time.
+.It Fl q
+Set quiet mode.
+.Nm
+suppresses messages such as the number of probes matched by the specified
+options and D programs and does not print column headers, the CPU ID, the probe
+ID, or insert newlines into the output.
+Only data traced and formatted by D program statements such as
+.Ql dtrace()
+and
+.Ql printf()
+is displayed to standard output.
+.It Fl s Ar script
+Compile the specified D program source file.
+If the
+.Fl e
+option is present, the program is compiled but instrumentation is not enabled.
+If the
+.Fl l
+option is present, the program is compiled and the set of probes matched by it
+is listed, but instrumentation is not enabled.
+If none of
+.Fl e , l , G ,
+or
+.Fl A
+are present, the instrumentation specified by the D program is enabled and
+tracing begins.
+.It Fl S
+Show D compiler intermediate code.
+The D compiler produces a report of the intermediate code generated for each D
+program to standard error.
+.It Fl U Ar name
+Undefine the specified
+.Ar name
+when invoking
+.Xr cpp 1
+(enabled using the
+.Fl C
+option).
+This option passes the
+.Fl U
+option to each
+.Xr cpp 1
+invocation.
+.It Fl v
+Set verbose mode.
+If the
+.Fl v
+option is specified,
+.Nm
+produces a program stability report showing the minimum interface stability and
+dependency level for the specified D programs.
+.It Fl V
+Report the highest D programming interface version supported by
+.Nm .
+The version information is printed to standard output and the
+.Nm
+command exits.
+.It Fl w
+Permit destructive actions in D programs specified using the
+.Fl s , P , m , f , n ,
+or
+.Fl i
+options.
+If the
+.Fl w
+option is not specified,
+.Nm
+does not permit the compilation or enabling of a D program that contains
+destructive actions.
+.It Fl x Ar arg Op Ns = Ns value
+Enable or modify a DTrace runtime option or D compiler option.
+Boolean options are enabled by specifying their name.
+Options with values are set by separating the option name and value with an
+equals sign (=).
+.It Fl X Cm a | c | s | t
+Specify the degree of conformance to the ISO C standard that should be selected
+when invoking
+.Xr cpp 1
+(enabled using the
+.Fl C
+option).
+The
+.Fl X
+option argument affects the value and presence of the __STDC__ macro depending
+upon the value of the argument letter.
+.sp
+The
+.Fl X
+option supports the following arguments:
+.Bl -tag -width indent
+.It a
+Default.
+ISO C plus K&R compatibility extensions, with semantic changes required by ISO
+C.
+This is the default mode if
+.Fl X
+is not specified.
+The predefined macro __STDC__ has a value of 0 when
+.Xr cpp 1
+is invoked in conjunction with the
+.Fl Xa
+option.
+.It c
+Conformance.
+Strictly conformant ISO C, without K&R C compatibility extensions.
+The predefined macro __STDC__ has a value of 1 when
+.Xr cpp 1
+is invoked in conjunction with the
+.Fl \&Xc
+option.
+.It s
+K&R C only.
+The macro __STDC__ is not defined when
+.Xr cpp 1
+is invoked in conjunction with the
+.Fl Xs
+option.
+.It t
+Transition.
+ISO C plus K&R C compatibility extensions, without semantic changes required by
+ISO C.
+The predefined macro __STDC__ has a value of 0 when
+.Xr cpp 1
+is invoked in conjunction with the
+.Fl Xt
+option.
+.El
+.Pp
+As the
+.Fl X
+option only affects how the D compiler invokes the C preprocessor, the
+.Fl Xa
+and
+.Fl Xt
+options are equivalent from the perspective of D and both are provided only to
+ease re-use of settings from a C build environment.
+.Pp
+Regardless of the
+.Fl X
+mode, the following additional C preprocessor definitions are always specified
+and valid in all modes:
+.Bl -bullet -offset indent
+.It
+__sun
+.It
+__unix
+.It
+__SVR4
+.It
+__sparc (on SPARC systems only)
+.It
+__sparcv9 (on SPARC systems only when 64-bit programs are compiled)
+.It
+__i386 (on x86 systems only when 32-bit programs are compiled)
+.It
+__amd64 (on x86 systems only when 64-bit programs are compiled)
+.It
+__`uname -s`_`uname -r` (for example,
+.Ql FreeBSD_9.2-RELEASE .
+.It
+__SUNW_D=1
+.It
+.No __SUNW_D_VERSION=0x Ns Ar MMmmmuuu
+.Pp
+Where
+.Ar MM
+is the major release value in hexadecimal,
+.Ar mmm
+is the minor release value in hexadecimal, and
+.Ar uuu
+is the micro release value in hexadecimal.
+.El
+.It Fl Z
+Permit probe descriptions that match zero probes.
+If the
+.Fl Z
+option is not specified,
+.Nm
+reports an error and exits if any probe descriptions specified in D program
+files
+.Fl ( s
+option) or on the command line
+.Fl ( P , m , f , n ,
+or
+.Fl i
+options) contain descriptions that do not match any known probes.
+.El
+.Sh OPERANDS
+You can specify zero or more additional arguments on the
+.Nm
+command line to define a set of macro variables and so forth).
+The additional arguments can be used in D programs specified using the
+.Fl s
+option or on the command line.
+.Sh FILES
+.Bl -tag -width /boot/dtrace.dof -compact
+.It Pa /boot/dtrace.dof
+File for anonymous tracing directives.
+.El
+.Sh EXIT STATUS
+The following exit statuses are returned:
+.Bl -tag -width indent
+.It 0
+Successful completion.
+.Pp
+For D program requests, an exit status of 0 indicates that programs were
+successfully compiled, probes were successfully enabled, or anonymous state
+was successfully retrieved.
+.Nm
+returns 0 even if the specified tracing requests encountered errors or drops.
+.It 1
An error occurred.
-.sp
-For D program requests, an exit status of \fB1\fR indicates that program compilation failed or that the specified request could not be satisfied.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB2\fR\fR
-.ad
-.RS 5n
-.rt
+.Pp
+For D program requests, an exit status of 1 indicates that program compilation
+failed or that the specified request could not be satisfied.
+.It 2
Invalid command line options or arguments were specified.
-.RE
-
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-tab() box;
-cw(2.75i) |cw(2.75i)
-lw(2.75i) |lw(2.75i)
-.
-ATTRIBUTE TYPEATTRIBUTE VALUE
-_
-AvailabilitySUNWdtrc
-_
-Interface StabilitySee below.
-.TE
-
-.sp
-.LP
-The command-line syntax is Committed. The human-readable output is Uncommitted.
-.SH SEE ALSO
-.sp
-.LP
-\fBcpp\fR(1), \fBisainfo\fR(1), \fBlibdtrace\fR(3LIB), \fBdriver.conf\fR(4), \fBattributes\fR(5), \fBdtrace\fR(7D)
-.sp
-.LP
-\fISolaris Dynamic Tracing Guide\fR
+.El
+.Sh SEE ALSO
+.Xr cpp 1 ,
+.Xr dtruss 1 ,
+.Xr elf 5
+.Rs
+.%T Solaris Dynamic Tracing Guide
+.Re
View
22 contrib/binutils/opcodes/i386-dis.c
@@ -6438,14 +6438,22 @@ VMX_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
static void
OP_VMX (int bytemode, int sizeflag)
{
- used_prefixes |= (prefixes & (PREFIX_DATA | PREFIX_REPZ));
- if (prefixes & PREFIX_DATA)
- strcpy (obuf, "vmclear");
- else if (prefixes & PREFIX_REPZ)
- strcpy (obuf, "vmxon");
+ if (modrm.mod == 3)
+ {
+ strcpy (obuf, "rdrand");
+ OP_E (v_mode, sizeflag);
+ }
else
- strcpy (obuf, "vmptrld");
- OP_E (bytemode, sizeflag);
+ {
+ used_prefixes |= (prefixes & (PREFIX_DATA | PREFIX_REPZ));
+ if (prefixes & PREFIX_DATA)
+ strcpy (obuf, "vmclear");
+ else if (prefixes & PREFIX_REPZ)
+ strcpy (obuf, "vmxon");
+ else
+ strcpy (obuf, "vmptrld");
+ OP_E (bytemode, sizeflag);
+ }
}
static void
View
3  contrib/binutils/opcodes/i386-opc.h
@@ -79,6 +79,7 @@ typedef struct template
#define CpuNo64 0x8000000 /* Not supported in the 64bit mode */
#define CpuPCLMUL 0x10000000 /* Carry-less Multiplication extensions */
+#define CpuRdRnd 0x20000000 /* Intel Random Number Generator extensions */
/* SSE4.1/4.2 Instructions required */
#define CpuSSE4 (CpuSSE4_1|CpuSSE4_2)
@@ -87,7 +88,7 @@ typedef struct template
#define CpuUnknownFlags (Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686 \
|CpuP4|CpuSledgehammer|CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuVMX \
|Cpu3dnow|Cpu3dnowA|CpuK6|CpuPadLock|CpuSVME|CpuSSSE3|CpuSSE4_1 \
- |CpuSSE4_2|CpuABM|CpuSSE4a|CpuXSAVE|CpuAES|CpuPCLMUL)
+ |CpuSSE4_2|CpuABM|CpuSSE4a|CpuXSAVE|CpuAES|CpuPCLMUL|CpuRdRnd)
/* the bits in opcode_modifier are used to generate the final opcode from
the base_opcode. These bits also are used to detect alternate forms of
View
18 contrib/binutils/opcodes/i386-opc.tbl
@@ -1502,3 +1502,21 @@ xrstor, 1, 0xfae, 0x5, CpuXSAVE, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf,
// INVPCID
invpcid, 2, 0x660f3882, None, CpuNo64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 }
invpcid, 2, 0x660f3882, None, Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
+
+// Intel AES extensions
+aesdec, 2, 0x660f38de, None, CpuAES, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM|LLongMem, RegXMM }
+aesdeclast, 2, 0x660f38df, None, CpuAES, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM|LLongMem, RegXMM }
+aesenc, 2, 0x660f38dc, None, CpuAES, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM|LLongMem, RegXMM }
+aesenclast, 2, 0x660f38dd, None, CpuAES, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM|LLongMem, RegXMM }
+aesimc, 2, 0x660f38db, None, CpuAES, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM|LLongMem, RegXMM }
+aeskeygenassist, 3, 0x660f3adf, None, CpuAES, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM|LLongMem, RegXMM }
+
+// Intel Carry-less Multiplication extensions
+pclmulqdq, 3, 0x660f3a44, None, CpuPCLMUL, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM|LLongMem, RegXMM }
+pclmullqlqdq, 2, 0x660f3a44, 0x0, CpuPCLMUL, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { RegXMM|LLongMem, RegXMM }
+pclmulhqlqdq, 2, 0x660f3a44, 0x1, CpuPCLMUL, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { RegXMM|LLongMem, RegXMM }
+pclmullqhqdq, 2, 0x660f3a44, 0x10, CpuPCLMUL, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { RegXMM|LLongMem, RegXMM }
+pclmulhqhqdq, 2, 0x660f3a44, 0x11, CpuPCLMUL, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { RegXMM|LLongMem, RegXMM }
+
+// Intel Random Number Generator extensions
+rdrand, 1, 0x0fc7, 0x6, CpuRdRnd, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64 }
View
5 contrib/binutils/opcodes/i386-tbl.h
@@ -4374,6 +4374,11 @@ const template i386_optab[] =
Modrm|IgnoreSize|NoSuf|ImmExt,
{ RegXMM|LLongMem,
RegXMM } },
+
+ /* Intel Random Number Generator extensions */
+ {"rdrand", 1, 0x0fc7, 0x6, CpuRdRnd,
+ Modrm|NoSuf,
+ { Reg16|Reg32|Reg64 } },
{ NULL, 0, 0, 0, 0, 0, { 0 } }
};
View
2  etc/defaults/periodic.conf
@@ -190,7 +190,7 @@ weekly_noid_dirs="/" # Look here
# 400.status-pkg
weekly_status_pkg_enable="NO" # Find out-of-date pkgs
pkg_version=pkg_version # Use this program
-pkg_version_index=/usr/ports/INDEX-10 # Use this index file
+pkg_version_index=/usr/ports/INDEX-11 # Use this index file
# 450.status-security
weekly_status_security_enable="YES" # Security check
View
35 etc/defaults/rc.conf
@@ -674,44 +674,11 @@ mixer_enable="YES" # Run the sound mixer.
opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off
##############################################################
-### Jail Configuration #######################################
+### Jail Configuration (see rc.conf(5) manual page) ##########
##############################################################
jail_enable="NO" # Set to NO to disable starting of any jails
jail_parallel_start="NO" # Start jails in the background
jail_list="" # Space separated list of names of jails
-jail_set_hostname_allow="YES" # Allow root user in a jail to change its hostname
-jail_socket_unixiproute_only="YES" # Route only TCP/IP within a jail
-jail_sysvipc_allow="NO" # Allow SystemV IPC use from within a jail
-
-#
-# To use rc's built-in jail infrastructure create entries for
-# each jail, specified in jail_list, with the following variables.
-# NOTES:
-# - replace 'example' with the jail's name.
-# - except rootdir, hostname, ip and the _multi<n> addresses,
-# all of the following variables may be made global jail variables
-# if you don't specify a jail name (ie. jail_interface, jail_devfs_ruleset).
-#
-#jail_example_rootdir="/usr/jail/default" # Jail's root directory
-#jail_example_hostname="default.domain.com" # Jail's hostname
-#jail_example_interface="" # Jail's interface variable to create IP aliases on
-#jail_example_fib="0" # Routing table for setfib(1)
-#jail_example_ip="192.0.2.10,2001:db8::17" # Jail's primary IPv4 and IPv6 address
-#jail_example_ip_multi0="2001:db8::10" # and another IPv6 address
-#jail_example_exec_start="/bin/sh /etc/rc" # command to execute in jail for starting
-#jail_example_exec_afterstart0="/bin/sh command" # command to execute after the one for
- # starting the jail. More than one can be
- # specified using a trailing number
-#jail_example_exec_stop="/bin/sh /etc/rc.shutdown" # command to execute in jail for stopping
-#jail_example_devfs_enable="NO" # mount devfs in the jail
-#jail_example_devfs_ruleset="ruleset_name" # devfs ruleset to apply to jail -
- # usually you want "devfsrules_jail".
-#jail_example_fdescfs_enable="NO" # mount fdescfs in the jail
-#jail_example_procfs_enable="NO" # mount procfs in jail
-#jail_example_mount_enable="NO" # mount/umount jail's fs
-#jail_example_fstab="" # fstab(5) for mount/umount
-#jail_example_flags="-l -U root" # flags for jail(8)
-#jail_example_parameters="allow.raw_sockets=1" # extra parameters for this jail
##############################################################
### Define source_rc_confs, the mechanism used by /etc/rc.* ##
View
77 etc/network.subr
@@ -82,6 +82,41 @@ ifn_stop()
return $cfg
}
+# ifn_vnetup ifn
+# Move ifn to the specified vnet jail.
+#
+ifn_vnetup()
+{
+
+ ifn_vnet0 $1 vnet
+}
+
+# ifn_vnetdown ifn
+# Reclaim ifn from the specified vnet jail.
+#
+ifn_vnetdown()
+{
+
+ ifn_vnet0 $1 -vnet
+}
+
+# ifn_vnet0 ifn action
+# Helper function for ifn_vnetup and ifn_vnetdown.
+#
+ifn_vnet0()
+{
+ local _ifn _cfg _action _vnet
+ _ifn="$1"
+ _action="$2"
+ _cfg=1
+
+ if _vnet=$(vnetif $_ifn); then
+ ${IFCONFIG_CMD} $_ifn $_action $_vnet && _cfg=0
+ fi
+
+ return $_cfg
+}
+
# ifconfig_up if
# Evaluate ifconfig(8) arguments for interface $if and
# run ifconfig(8) with those arguments. It returns 0 if
@@ -284,24 +319,27 @@ _ifconfig_getargs()
# args such as DHCP and WPA.
ifconfig_getargs()
{
- local _tmpargs _arg _args
+ local _tmpargs _arg _args _vnet
_tmpargs=`_ifconfig_getargs $1 $2`
if [ $? -eq 1 ]; then
return 1
fi
_args=
+ _vnet=0
for _arg in $_tmpargs; do
- case $_arg in
- [Dd][Hh][Cc][Pp]) ;;
- [Nn][Oo][Aa][Uu][Tt][Oo]) ;;
- [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;;
- [Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;;
- [Ww][Pp][Aa]) ;;
- [Hh][Oo][Ss][Tt][Aa][Pp]) ;;
- *)
+ case $_arg:$_vnet in
+ [Dd][Hh][Cc][Pp]:0) ;;
+ [Nn][Oo][Aa][Uu][Tt][Oo]:0) ;;
+ [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]:0) ;;
+ [Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]:0) ;;
+ [Ww][Pp][Aa]:0) ;;
+ [Hh][Oo][Ss][Tt][Aa][Pp]:0) ;;
+ vnet:0) _vnet=1 ;;
+ *:1) _vnet=0 ;;
+ *:0)
_args="$_args $_arg"
- ;;
+ ;;
esac
done
@@ -426,6 +464,25 @@ hostapif()
return 1
}
+# vnetif if
+# Returns 0 and echo jail if "vnet" keyword is specified on the
+# interface, and 1 otherwise.
+vnetif()
+{
+ local _tmpargs _arg _vnet
+ _tmpargs=`_ifconfig_getargs $1`
+
+ _vnet=0
+ for _arg in $_tmpargs; do
+ case $_arg:$_vnet in
+ vnet:0) _vnet=1 ;;
+ *:1) echo $_arg; return 0 ;;
+ esac
+ done
+
+ return 1
+}
+
# afexists af
# Returns 0 if the address family is enabled in the kernel
# 1 otherwise.
View
869 etc/rc.d/jail
@@ -8,81 +8,138 @@
# BEFORE: securelevel
# KEYWORD: nojail shutdown
-# WARNING: This script deals with untrusted data (the data and
-# processes inside the jails) and care must be taken when changing the
-# code related to this! If you have any doubt whether a change is
-# correct and have security impact, please get the patch reviewed by
-# the FreeBSD Security Team prior to commit.
-
. /etc/rc.subr
name="jail"
rcvar="jail_enable"
-start_precmd="jail_prestart"
start_cmd="jail_start"
+start_postcmd="jail_warn"
stop_cmd="jail_stop"
+config_cmd="jail_config"
+console_cmd="jail_console"
+status_cmd="jail_status"
+extra_commands="config console status"
+: ${jail_conf:=/etc/jail.conf}
+: ${jail_program:=/usr/sbin/jail}
+: ${jail_consolecmd:=/bin/sh}
+: ${jail_jexec:=/usr/sbin/jexec}
+: ${jail_jls:=/usr/sbin/jls}
+
+need_dad_wait=
+
+# extact_var jail name param num defval
+# Extract value from ${jail_$jail_$name} or ${jail_$name} and
+# set it to $param. If not defined, $defval is used.
+# When $num is [0-9]*, ${jail_$jail_$name$num} are looked up and
+# $param is set by using +=.
+# When $num is YN or NY, the value is interpret as boolean.
+extract_var()
+{
+ local i _j _name _param _num _def _name1 _name2
+ _j=$1
+ _name=$2
+ _param=$3
+ _num=$4
+ _def=$5
+
+ case $_num in
+ YN)
+ _name1=jail_${_j}_${_name}
+ _name2=jail_${_name}
+ eval $_name1=\"\${$_name1:-\${$_name2:-$_def}}\"
+ if checkyesno $_name1; then
+ echo " $_param = 1;"
+ else
+ echo " $_param = 0;"
+ fi
+ ;;
+ NY)
+ _name1=jail_${_j}_${_name}
+ _name2=jail_${_name}
+ eval $_name1=\"\${$_name1:-\${$_name2:-$_def}}\"
+ if checkyesno $_name1; then
+ echo " $_param = 0;"
+ else
+ echo " $_param = 1;"
+ fi
+ ;;
+ [0-9]*)
+ i=$_num
+ while : ; do
+ _name1=jail_${_j}_${_name}${i}
+ _name2=jail_${_name}${i}
+ eval _tmpargs=\"\${$_name1:-\${$_name2:-$_def}}\"
+ if [ -n "$_tmpargs" ]; then
+ echo " $_param += \"$_tmpargs\";"
+ else
+ break;
+ fi
+ i=$(($i + 1))
+ done
+ ;;
+ *)
+ _name1=jail_${_j}_${_name}
+ _name2=jail_${_name}
+ eval _tmpargs=\"\${$_name1:-\${$_name2:-$_def}}\"
+ if [ -n "$_tmpargs" ]; then
+ echo " $_param = \"$_tmpargs\";"
+ fi
+ ;;
+ esac
+}
-# init_variables _j
-# Initialize the various jail variables for jail _j.
+# parse_options _j
+# Parse options and create a temporary configuration file if necessary.
#
-init_variables()
+parse_options()
{
- _j="$1"
+ local _j
+ _j=$1
+ _confwarn=0
if [ -z "$_j" ]; then
- warn "init_variables: you must specify a jail"
+ warn "parse_options: you must specify a jail"
return
fi
-
+ eval _jconf=\"\${jail_${_j}_conf:-/etc/jail.${_j}.conf}\"
eval _rootdir=\"\$jail_${_j}_rootdir\"
- _devdir="${_rootdir}/dev"
- _fdescdir="${_devdir}/fd"
- _procdir="${_rootdir}/proc"
eval _hostname=\"\$jail_${_j}_hostname\"
+ if [ -z "$_rootdir" -o \
+ -z "$_hostname" ]; then
+ if [ -r "$_jconf" ]; then
+ _conf="$_jconf"
+ return 0
+ elif [ -r "$jail_conf" ]; then
+ _conf="$jail_conf"
+ return 0
+ else
+ warn "Invalid configuration for $_j " \
+ "(no jail.conf, no hostname, or no path). " \
+ "Jail $_j was ignored."
+ fi
+ return 1
+ fi
eval _ip=\"\$jail_${_j}_ip\"
- eval _interface=\"\${jail_${_j}_interface:-${jail_interface}}\"
- eval _exec=\"\$jail_${_j}_exec\"
-
- i=0
- while : ; do
- eval _exec_prestart${i}=\"\${jail_${_j}_exec_prestart${i}:-\${jail_exec_prestart${i}}}\"
- [ -z "$(eval echo \"\$_exec_prestart${i}\")" ] && break
- i=$((i + 1))
- done
-
- eval _exec_start=\"\${jail_${_j}_exec_start:-${jail_exec_start}}\"
-
- i=1
- while : ; do
- eval _exec_afterstart${i}=\"\${jail_${_j}_exec_afterstart${i}:-\${jail_exec_afterstart${i}}}\"
- [ -z "$(eval echo \"\$_exec_afterstart${i}\")" ] && break
- i=$((i + 1))
- done
-
- i=0
- while : ; do
- eval _exec_poststart${i}=\"\${jail_${_j}_exec_poststart${i}:-\${jail_exec_poststart${i}}}\"
- [ -z "$(eval echo \"\$_exec_poststart${i}\")" ] && break
- i=$((i + 1))
- done
-
- i=0
- while : ; do
- eval _exec_prestop${i}=\"\${jail_${_j}_exec_prestop${i}:-\${jail_exec_prestop${i}}}\"
- [ -z "$(eval echo \"\$_exec_prestop${i}\")" ] && break
- i=$((i + 1))
- done
-
- eval _exec_stop=\"\${jail_${_j}_exec_stop:-${jail_exec_stop}}\"
-
- i=0
- while : ; do
- eval _exec_poststop${i}=\"\${jail_${_j}_exec_poststop${i}:-\${jail_exec_poststop${i}}}\"
- [ -z "$(eval echo \"\$_exec_poststop${i}\")" ] && break
- i=$((i + 1))
- done
+ if [ -z "$_ip" ] && ! check_kern_features vimage; then
+ warn "no ipaddress specified and no vimage support. " \
+ "Jail $_j was ignored."
+ return 1
+ fi
+ _conf=/var/run/jail.${_j}.conf
+ #
+ # To relieve confusion, show a warning message.
+ #
+ _confwarn=1
+ if [ -r "$jail_conf" -o -r "$_jconf" ]; then
+ warn "$_conf is created and used for jail $_j."
+ fi
+ /usr/bin/install -m 0644 -o root -g wheel /dev/null $_conf || return 1
+ eval : \${jail_${_j}_flags:=${jail_flags}}
+ eval _exec=\"\$jail_${_j}_exec\"
+ eval _exec_start=\"\$jail_${_j}_exec_start\"
+ eval _exec_stop=\"\$jail_${_j}_exec_stop\"
if [ -n "${_exec}" ]; then
# simple/backward-compatible execution
_exec_start="${_exec}"
@@ -96,285 +153,104 @@ init_variables()
fi
fi
fi
-
- # The default jail ruleset will be used by rc.subr if none is specified.
- eval _ruleset=\"\${jail_${_j}_devfs_ruleset:-${jail_devfs_ruleset}}\"
- eval _devfs=\"\${jail_${_j}_devfs_enable:-${jail_devfs_enable}}\"
- [ -z "${_devfs}" ] && _devfs="NO"
- eval _fdescfs=\"\${jail_${_j}_fdescfs_enable:-${jail_fdescfs_enable}}\"
- [ -z "${_fdescfs}" ] && _fdescfs="NO"
- eval _procfs=\"\${jail_${_j}_procfs_enable:-${jail_procfs_enable}}\"
- [ -z "${_procfs}" ] && _procfs="NO"
-
- eval _mount=\"\${jail_${_j}_mount_enable:-${jail_mount_enable}}\"
- [ -z "${_mount}" ] && _mount="NO"
- # "/etc/fstab.${_j}" will be used for {,u}mount(8) if none is specified.
- eval _fstab=\"\${jail_${_j}_fstab:-${jail_fstab}}\"
- [ -z "${_fstab}" ] && _fstab="/etc/fstab.${_j}"
- eval _flags=\"\${jail_${_j}_flags:-${jail_flags}}\"
- [ -z "${_flags}" ] && _flags="-l -U root"
- eval _consolelog=\"\${jail_${_j}_consolelog:-${jail_consolelog}}\"
- [ -z "${_consolelog}" ] && _consolelog="/var/log/jail_${_j}_console.log"
+ eval _interface=\"\${jail_${_j}_interface:-${jail_interface}}\"
eval _parameters=\"\${jail_${_j}_parameters:-${jail_parameters}}\"
- [ -z "${_parameters}" ] && _parameters=""
- eval _fib=\"\${jail_${_j}_fib:-${jail_fib}}\"
-
- # Debugging aid
- #
- debug "$_j devfs enable: $_devfs"
- debug "$_j fdescfs enable: $_fdescfs"
- debug "$_j procfs enable: $_procfs"
- debug "$_j mount enable: $_mount"
- debug "$_j hostname: $_hostname"
- debug "$_j ip: $_ip"
- jail_show_addresses ${_j}
- debug "$_j interface: $_interface"
- debug "$_j fib: $_fib"
- debug "$_j root: $_rootdir"
- debug "$_j devdir: $_devdir"
- debug "$_j fdescdir: $_fdescdir"
- debug "$_j procdir: $_procdir"
- debug "$_j ruleset: $_ruleset"
- debug "$_j fstab: $_fstab"
-
- i=0
- while : ; do
- eval out=\"\${_exec_prestart${i}:-''}\"
- if [ -z "$out" ]; then
- break
- fi
- debug "$_j exec pre-start #${i}: ${out}"
- i=$((i + 1))
- done
-
- debug "$_j exec start: $_exec_start"
-
- i=1
- while : ; do
- eval out=\"\${_exec_afterstart${i}:-''}\"
+ eval _fstab=\"\${jail_${_j}_fstab:-${jail_fstab:-/etc/fstab.$_j}}\"
+ (
+ date +"# Generated by rc.d/jail at %Y-%m-%d %H:%M:%S"
+ echo "$_j {"
+ extract_var $_j hostname host.hostname - ""
+ extract_var $_j rootdir path - ""
+ if [ -n "$_ip" ]; then
+ extract_var $_j interface interface - ""
+ jail_handle_ips_option $_ip $_interface
+ alias=0
+ while : ; do
+ eval _x=\"\$jail_${_jail}_ip_multi${alias}\"
+ [ -z "$_x" ] && break
- if [ -z "$out" ]; then
- break;
+ jail_handle_ips_option $_x $_interface
+ alias=$(($alias + 1))
+ done
+ case $need_dad_wait in
+ 1)
+ # Sleep to let DAD complete before
+ # starting services.
+ echo " exec.start += \"sleep " \
+ $(($(${SYSCTL_N} net.inet6.ip6.dad_count) + 1)) \
+ "\";"
+ ;;
+ esac
+ # These are applicable only to non-vimage jails.
+ extract_var $_j fib exec.fib - ""
+ extract_var $_j socket_unixiproute_only \
+ allow.raw_sockets NY YES
+ else
+ echo " vnet;"
+ extract_var $_j vnet_interface vnet.interface - ""
fi
- debug "$_j exec after start #${i}: ${out}"
- i=$((i + 1))
- done
-
- i=0
- while : ; do
- eval out=\"\${_exec_poststart${i}:-''}\"
- if [ -z "$out" ]; then
- break
+ echo " exec.clean;"
+ echo " exec.system_user = \"root\";"
+ echo " exec.jail_user = \"root\";"
+ extract_var $_j exec_prestart exec.prestart 0 ""
+ extract_var $_j exec_poststart exec.poststart 0 ""
+ extract_var $_j exec_prestop exec.prestop 0 ""
+ extract_var $_j exec_poststop exec.poststop 0 ""
+
+ echo " exec.start += \"$_exec_start\";"
+ extract_var $_j exec_afterstart exec.start 1 ""
+ echo " exec.stop = \"$_exec_stop\";"
+
+ extract_var $_j consolelog exec.consolelog - \
+ /var/log/jail_${_j}_console.log
+
+ eval : \${jail_${_j}_devfs_enable:=${jail_devfs_enable:-NO}}
+ if checkyesno jail_${_j}_devfs_enable; then
+ echo " mount.devfs;"
+ case $_ruleset in
+ "") ;;
+ [0-9]*) echo " devfs_ruleset = \"$_ruleset\";" ;;
+ devfsrules_jail)
+ # XXX: This is the default value,
+ # Let jail(8) to use the default because
+ # mount(8) only accepts an integer.
+ # This should accept a ruleset name.
+ ;;
+ *) warn "devfs_ruleset must be integer." ;;
+ esac
+ if [ -r $_fstab ]; then
+ echo " mount.fstab = \"$_fstab\";"
+ fi
fi
- debug "$_j exec post-start #${i}: ${out}"
- i=$((i + 1))
- done
- i=0
- while : ; do
- eval out=\"\${_exec_prestop${i}:-''}\"
- if [ -z "$out" ]; then
- break
+ eval : \${jail_${_j}_fdescfs_enable:=${jail_fdescfs_enable:-NO}}
+ if checkyesno jail_${_j}_fdescfs_enable; then
+ echo " mount += " \
+ "\"fdescfs ${_rootdir%/}/dev/fd fdescfs rw 0 0\";"
fi
- debug "$_j exec pre-stop #${i}: ${out}"
- i=$((i + 1))
- done
-
- debug "$_j exec stop: $_exec_stop"
-
- i=0
- while : ; do
- eval out=\"\${_exec_poststop${i}:-''}\"
- if [ -z "$out" ]; then
- break
+ eval : \${jail_${_j}_procfs_enable:=${jail_procfs_enable:-NO}}
+ if checkyesno jail_${_j}_procfs_enable; then
+ echo " mount += " \
+ "\"procfs ${_rootdir%/}/proc procfs rw 0 0\";"
fi
- debug "$_j exec post-stop #${i}: ${out}"
- i=$((i + 1))
- done
-
- debug "$_j flags: $_flags"
- debug "$_j consolelog: $_consolelog"
- debug "$_j parameters: $_parameters"
- if [ -z "${_hostname}" ]; then
- err 3 "$name: No hostname has been defined for ${_j}"
- fi
- if [ -z "${_rootdir}" ]; then
- err 3 "$name: No root directory has been defined for ${_j}"
- fi
-}
+ echo " ${_parameters};"
-# set_sysctl rc_knob mib msg
-# If the mib sysctl is set according to what rc_knob
-# specifies, this function does nothing. However if
-# rc_knob is set differently than mib, then the mib
-# is set accordingly and msg is displayed followed by
-# an '=" sign and the word 'YES' or 'NO'.
-#
-set_sysctl()
-{
- _knob="$1"
- _mib="$2"
- _msg="$3"
-
- _current=`${SYSCTL} -n $_mib 2>/dev/null`
- if checkyesno $_knob ; then
- if [ "$_current" -ne 1 ]; then
- echo -n " ${_msg}=YES"
- ${SYSCTL} 1>/dev/null ${_mib}=1
- fi
- else
- if [ "$_current" -ne 0 ]; then
- echo -n " ${_msg}=NO"
- ${SYSCTL} 1>/dev/null ${_mib}=0
+ eval : \${jail_${_j}_mount_enable:=${jail_mount_enable:-NO}}
+ if checkyesno jail_${_j}_mount_enable; then
+ echo " allow.mount;" >> $_conf
fi
- fi
-}
-# is_current_mountpoint()
-# Is the directory mount point for a currently mounted file
-# system?
-#
-is_current_mountpoint()
-{
- local _dir _dir2
-
- _dir=$1
+ extract_var $_j set_hostname_allow allow.set_hostname YN NO
+ extract_var $_j sysvipc_allow allow.sysvipc YN NO
+ echo "}"
+ ) >> $_conf
- _dir=`echo $_dir | sed -Ee 's#//+#/#g' -e 's#/$##'`
- [ ! -d "${_dir}" ] && return 1
- _dir2=`df ${_dir} | tail +2 | awk '{ print $6 }'`
- [ "${_dir}" = "${_dir2}" ]
- return $?
+ return 0
}
-# is_symlinked_mountpoint()
-# Is a mount point, or any of its parent directories, a symlink?
-#
-is_symlinked_mountpoint()
-{
- local _dir
-
- _dir=$1
-
- [ -L "$_dir" ] && return 0
- [ "$_dir" = "/" ] && return 1
- is_symlinked_mountpoint `dirname $_dir`
- return $?
-}
-
-# secure_umount
-# Try to unmount a mount point without being vulnerable to
-# symlink attacks.
-#
-secure_umount()
-{
- local _dir
-
- _dir=$1
-
- if is_current_mountpoint ${_dir}; then
- umount -f ${_dir} >/dev/null 2>&1
- else
- debug "Nothing mounted on ${_dir} - not unmounting"
- fi
-}
-
-
-# jail_umount_fs
-# This function unmounts certain special filesystems in the
-# currently selected jail. The caller must call the init_variables()
-# routine before calling this one.
-#
-jail_umount_fs()
-{
- local _device _mountpt _rest
-
- if checkyesno _fdescfs; then
- if [ -d "${_fdescdir}" ] ; then
- secure_umount ${_fdescdir}
- fi
- fi
- if checkyesno _devfs; then
- if [ -d "${_devdir}" ] ; then
- secure_umount ${_devdir}
- fi
- fi
- if checkyesno _procfs; then
- if [ -d "${_procdir}" ] ; then
- secure_umount ${_procdir}
- fi
- fi
- if checkyesno _mount; then
- [ -f "${_fstab}" ] || warn "${_fstab} does not exist"
- tail -r ${_fstab} | while read _device _mountpt _rest; do
- case ":${_device}" in
- :#* | :)
- continue
- ;;
- esac
- secure_umount ${_mountpt}
- done
- fi
-}
-
-# jail_mount_fstab()
-# Mount file systems from a per jail fstab while trying to
-# secure against symlink attacks at the mount points.
-#
-# If we are certain we cannot secure against symlink attacks we
-# do not mount all of the file systems (since we cannot just not
-# mount the file system with the problematic mount point).
-#
-# The caller must call the init_variables() routine before
-# calling this one.
-#
-jail_mount_fstab()
-{
- local _device _mountpt _rest
-
- while read _device _mountpt _rest; do
- case ":${_device}" in
- :#* | :)
- continue
- ;;
- esac
- if is_symlinked_mountpoint ${_mountpt}; then
- warn "${_mountpt} has symlink as parent - not mounting from ${_fstab}"
- return
- fi
- done <${_fstab}
- mount -a -F "${_fstab}"
-}
-
-# jail_show_addresses jail
-# Debug print the input for the given _multi aliases
-# for a jail for init_variables().
-#
-jail_show_addresses()
-{
- local _j _type alias
- _j="$1"
- alias=0
-
- if [ -z "${_j}" ]; then
- warn "jail_show_addresses: you must specify a jail"
- return
- fi
-
- while : ; do
- eval _addr=\"\$jail_${_j}_ip_multi${alias}\"
- if [ -n "${_addr}" ]; then
- debug "${_j} ip_multi${alias}: $_addr"
- alias=$((${alias} + 1))
- else
- break
- fi
- done
-}
-
-# jail_extract_address argument
+# jail_extract_address argument iface
# The second argument is the string from one of the _ip
# or the _multi variables. In case of a comma separated list
# only one argument must be passed in at a time.
@@ -382,8 +258,9 @@ jail_show_addresses()
#
jail_extract_address()
{
- local _i
+ local _i _interface
_i=$1
+ _interface=$2
if [ -z "${_i}" ]; then
warn "jail_extract_address: called without input"
@@ -439,21 +316,21 @@ jail_extract_address()
_mask=${_mask:-/32}
elif [ "${_type}" = "inet6" ]; then
- # In case _maske is not set for IPv6, use /128.
- _mask=${_mask:-/128}
+ # In case _maske is not set for IPv6, use /64.
+ _mask=${_mask:-/64}
fi
}
-# jail_handle_ips_option {add,del} input
+# jail_handle_ips_option input iface
# Handle a single argument imput which can be a comma separated
# list of addresses (theoretically with an option interface and
# prefix/netmask/prefixlen).
#
jail_handle_ips_option()
{
- local _x _action _type _i
- _action=$1
- _x=$2
+ local _x _type _i _iface
+ _x=$1
+ _iface=$2
if [ -z "${_x}" ]; then
# No IP given. This can happen for the primary address
@@ -468,294 +345,146 @@ jail_handle_ips_option()
*,*) # Extract the first argument and strip it off the list.
_i=`expr "${_x}" : '^\([^,]*\)'`
_x=`expr "${_x}" : "^[^,]*,\(.*\)"`
- ;;
+ ;;
*) _i=${_x}
_x=""
- ;;
+ ;;
esac
_type=""
- _iface=""
_addr=""
_mask=""
- jail_extract_address "${_i}"
+ jail_extract_address $_i $_iface
# make sure we got an address.
- case "${_addr}" in
+ case $_addr in
"") continue ;;
*) ;;
esac
# Append address to list of addresses for the jail command.
- case "${_type}" in
+ case $_type in
inet)
- case "${_addrl}" in