Import libucl 0.4.0
Import libucl version 2014-05-14 (almost 0.4.1)
This bring ucl_lookup_path (xpath like for ucl objects)
Add a call to synthesize a C/H/S value for block emulations
that require it (ahci). The algorithm used is from the VHD
specification.
Use the blockif CHS routine to create fake CHS values,
and then populate them in the identity page.

This fixes a divide-by-zero error at probe time with NetBSD.

MFC after:	1 week.
Allow multi-byte reads in the private CHELSIO_T4_GET_I2C ioctl.  The
firmware allows up to 48B to be read this way but the driver limits
itself to 8B at a time to remain compatible with old cxgbetool
binaries.

MFC after:	1 week
Fix an issue with service(8) where utilities such as screen(1) and tmux(1)
would behave differently when utilizing rc-script was invoked manually vs.
service(8). The issue being that these utilities require the TERM environ
variable to be set and service(8) was not passing it down.

Reported by:	Michael Dexter <editor@callfortesting.org>
PR:		bin/191869
Reviewed by:	allanjude
MFC after:	3 days
X-MFC-to:	stable/10, stable/9
libc/gen: small updates to code originating at OpenBSD

arc4random.c
- CVS rev. 1.22
Change arc4random_uniform() to calculate ``2**32 % upper_bound'' as
``-upper_bound % upper_bound''. Simplifies the code and makes it the
same on both ILP32 and LP64 architectures, and also slightly faster on
LP64 architectures by using a 32-bit remainder instead of a 64-bit
remainder.
- CVS rev. 1.23
Spacing

readpassphrase.c
-CVS rev. v 1.24
most obvious unsigned char casts for ctype

Obtained from:	OpenBSD
MFC after:	5 days
Document that listen(2) can fail with EDESTADDRREQ.
libc/stdlib: Minor cleanups to code originating in NetBSD

Mostly ANSIfication and typos.

Obtained from:	NetBSD
MFC after:	5 days
Add image_data() for checking whether a sequence of blocks has data.
Use this for VHD and VMDK to avoid allocating space in the image
for empty sectors.

Note that this negatively affects performance because mkimg uses a
temporary file for the intermediate storage. When mkimg has better
internal book keeping, performance can be significantly improved.
Eliminate repeated calculation of next_bucket in pmap_protect() and
pmap_remove().  Eliminate an unnecessary variable from pmap_remove() and
pmap_advise().
Make amd64 pmap_copy_pages() functional for pages not mapped by DMAP.

Requested and reviewed by:	royger
Tested by:	pho, royger
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Add a comment to explain the EAGAIN is only there for POSIX compliance

Resquested by:	kib
Reviewed by:	des
Fix build with SMP disabled.

CR:		https://phabric.freebsd.org/D407
Reviewed by:	royger
Actually set the "no execute" bit on 1 MB page mappings in pmap_protect().
Previously, the "no execute" bit was being set directly in the PTE, instead
of the local variable in which the new PTE value is being constructed.  So,
when the local variable was finally assigned to the PTE, the "no execute"
bit setting was lost.
Add support for operand size and address size override prefixes in bhyve's
instruction emulation [1].

Fix bug in emulation of opcode 0x8A where the destination is a legacy high
byte register and the guest vcpu is in 32-bit mode. Prior to this change
instead of modifying %ah, %bh, %ch or %dh the emulation would end up
modifying %spl, %bpl, %sil or %dil instead.

Add support for moffsets by treating it as a 2, 4 or 8 byte immediate value
during instruction decoding.

Fix bug in verify_gla() where the linear address computed after decoding
the instruction was not being truncated to the effective address size [2].

Tested by:	Leon Dang [1]
Reported by:	Peter Grehan [2]
Sponsored by:	Nahanni Systems
cxgbe(4): Display CF facility correctly in the device log.

MFC after:	3 days
Change the calculation of the kinfo_vmentry field kve_private_resident
to reflect its name.

Noted and reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Followup to r268466.

- Move the code to calculate resident count into separate function.
  It reduces the indent level and makes the operation of
  vmmap_skip_res_cnt tunable more clear.
- Optimize the calculation of the resident page count for map entry.
  Skip directly to the next lowest available index and page among the
  whole shadow chain.
- Restore the use of pmap_incore(9), only to verify that current
  mapping is indeed superpage.
- Note the issue with the invalid pages.

Suggested and reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
MFV r268702:

Add missing *_destroy() calls in various places with ZFS.

Illumos issue:
  4975 missing mutex_destroy() calls in zfs

MFC after:	2 weeks