MFC r259811:

MFV r258373:

4168 ztest assertion failure in dbuf_undirty

4169 verbatim import causes zdb to segfa
4170 zhack leaves pool in ACTIVE state

illumos/illumos-gate@7fdd916c474ea52896c671bbe7b56ba34a1ca132
MFC r259921,259950:

Provide the manual page for aio_fsync(2).
MFC r260541, r260547:
Take additional reference on SCSI probe periph to cover its freeze count.

Otherwise periph may be invalidated and freed before single-stepping freeze
is dropped, causing use after free panic.
MFC r257705:

Clean up -Wtautological-compare -Wformat warnings.
MFC	r260545:

ext2fs: fix inode flag conversion.

After r252890 we are naively attempting to pass through the
inode flags.  This is technically incorrect as the ext2
inode flags don't match the UFS/system values used in
FreeBSD and a clean conversion is needed.

Some filtering was left in place so the change didn't cause
significant changes in FreeBSD but some of the garbage passed
is likely to be the cause for warning messages in linux.

Fix the issue by resetting the flags before conversion as was
done previously. This also means we will not pass the EXT4_*
inode flags into FreeBSD's inode.

PR:		kern/185448
MFC r260636:

Fix bsnmpd remote denial of service vulnerability.

Reported by:	dinoex
Submitted by:	harti
Security:	FreeBSD-SA-14:01.bsnmpd
Security:	CVE-2014-1452
MFC r260637:

Disable 'monitor' feature in ntpd by default.

Security:	FreeBSD-SA-14:02.ntpd
Approved by:	so
- MFC 260653,260655:

* Purge old translations.
* Add missing footer due to DSSSL->XSLT migration and use XML catalog to
  resolve URI.
* Add missing arch= and revision= support.

- Update release.ent and fix release number in Errata.
Fix release numbers and branch names.
Remove a non-applicable sentence.
MFC r256542,r256581

Move the PMC handling to the first level interrupt handler where it belongs.
Also add the pmc_hook use, to handle callchain tracing.
MFC r259394,r259395,r259699

r259394:
Rebase the PMC indices at 1, since PMC_SOFT is at 0.

r259395,r259699:
Add userland PMC backtracing, and use the PMC trapframe macros for kernel
backtraces.
MFC r256543,r259245,r259421,r259668,r259674

r256543:

Add fasttrap for PowerPC.  This is the last piece of the DTrace/ppc puzzle.
It's incomplete, it doesn't contain full instruction emulation, but it should be
sufficient for most cases.

r259245,r259421: (FBT)

FBT now does work fully on PowerPC.

Save r3 before using it for the trap check, else we end up saving the new r3,
containing the trap instruction encoding (0x7c810808), and restoring it back
with the frame on return.  This caused it to panic on my ppc32 machine.

r259668,r259674:
Fix a typo in the FBT code.
MFC r258362

Use 'int' to store the return value of getopt(), rather than char.

On some architectures (powerpc), char is unsigned by default, which means
comparisons against -1 always fail, so the programs get stuck in an
infinite loop.
MFC r257941,r258119

Add the necessary bits for dumps on ppc64.
MFC r259082

Make some unsigned ints signed.

Found by:	clang (powerpc64)
MFC r259284,r259287

Add PMU-based CPU frequency scalling.  This is used on most Titanium
PowerBooks.
MFC r258355,258360,258400-258401,258406-258407,258418,258430,258439,258589-
258590,258592,258727-258728,258785, with the following descriptions:

Revisions 258400-258401,258406-258407,258590,258727-258728,258785:
+ Add a new `includes' module (see: bsdconfig includes -h) for exploring
  the bsdconfig(8) API

Remaining revisions:
258592: Sort all the messages.subr files
258355: Fix typo in a comment in networking/device.subr
258360: Whitespace, style, and other changes in networking/device.subr
258418: Quote interface names for good measure in networking/device.subr
258430: Remove an unused line in networking/device.subr
258439: Minor bugfix to f_die() function in common.subr
258589: Minor bugfix to syscons_ttys module
MFC r258458:
Improve network device scanning in the netdev module. First, make it use the
`device.subr' framework (improving performane and reducing sub-shells). Next
improve the `device.subr' framework itself. Make use of the `flags' device
struct member for network interfaces to indicate if an interface is Active,
Wired Ethernet, or 802.11 Wireless. Functions have been added to make checks
against the `flags' bit-field quick and efficient. Last, add function for
rescanning the network to update the device registers. Remove an unnecessary
local (ifn) while we're here (use already provided local `if').
MFC r259054:
Performance and debugging enhancements:
+ Remove UNAME_P=$(...) from startup/misc -- already supplied by common.subr
+ Use f_getvar instead of $(eval echo \$$var) -- f_getvar is sub-shell free
+ Add `-e' and `-k var' options to f_eval_catch -- increasing use-cases
+ Use f_eval_catch to display errors on failure -- reducing duplicated code
+ Use f_eval_catch when we need output from a command -- improving debugging
+ Optimize f_isinter of strings.subr for performance -- now sub-shell free
+ Improve error checking on pidfiles -- using f_eval_catch and f_isinteger
+ Use $var_to_set arg of f_ifconfig_{inet,netmask} -- eliminate sub-shells
+ Use f_sprintf instead of $(printf ...) -- consolidate sub-shells
+ Use $var_to_set arg of f_route_get_default -- eliminate sub-shells
+ Add f_count to replace $(set -- ...;echo $#) -- eliminate sub-shells
+ Add f_count_ifs to replace $(IFS=x;set -- ...;echo $#) -- no sub-shells
+ Replace var="$var${var:+ }..." in loops with var="$var ..." with a follow-
  up var="${var# }" to trim leading whitespace -- optimize loops
+ Use $var_to_set arg of f_resolv_conf_nameservers -- eliminate sub-shells
+ Comments for the f_eval_catch function
+ Remove a duplicate `local ... desc ...' in f_device_get_all of device.subr
+ Use $var_to_set arg of f_device_capacity -- eliminate sub-shells
+ Whitespace fixes in f_dialog_init of dialog.subr
+ Optimize f_inet_atoi of media/tcpip.subr for performance -- sub-shell free
+ In several cases, send stderr to /dev/null -- clean up runtime execution
+ Change f_err of common.subr to go to program stderr not terminal stderr,
  allowing redirection of output from functions that use f_err
+ Disable debugging when using f_getvar to get variable argument to
  f_startup_rcconf_map_expand of startup/rcconf.subr
+ Use f_replace_all instead of $(echo ... | tr | sed) -- performance
+ Add a $var_to_set option to f_index_{file,menusel_{command,keyword}} of
  common.subr -- centralize sub-shells