MFC r245113:
lockmgr: unlock interlock (if requested) when dealing with upgrade/downgrade
requests for LK_NOSHARE locks, just like for shared locks.

PR:		kern/174969
MFC r245262:
When nullfs mount is forcibly unmounted and nullfs vnode is reclaimed,
get back the leased write reference from the lower vnode.  There is no
other path which can correct v_writecount on the lowervp.
MFC r245004:
Add the "nocache" nullfs mount option.

MFC r245033:
Fix reversed condition in the assertion.
MFC r245005:
Allow to specify "cache" and "nocache" as an option for
mount_nullfs(8).
ext2fs: cleanup the dinode structure.

It was plagued with style errors and the offsets had been lost.
While here took the time to update the fields according to the
latest ext4 documentation.

Reviewed by:	bde
MFC r244719:
  Add the NO_SYNC_CACHE quirk for all Apple USB MSC devices, as they
  typically do not handle the SYNCHRONIZE_CACHE command - they either
  return an error or the firmware enters a reset loop.

Approved by:	rstone (co-mentor)
MFC r244995 r244996 r244997.

MFC r244995:
  Fix a typo in an error message.

MFC r244996:
  Have -n imply -r, since dry-run mode obviously doesn't require root
  privileges.

MFC r244997:
  Make sure to update the mtime of a logfile after archiving it. This
  ensures that the next rotation happens at the correct time when using
  interval-based rotations.

Approved by:	rstone (co-mentor)
MFC r245272:

Add an ugly hack to libgcc's unwind code, to make it behave properly at
runtime on amd64, when it is compiled by clang.  Some versions of clang
don't save and restore all callee registers, if a __builtin_eh_return()
intrinsic is used in a function.  This is particularly bad on amd64.

Until the problem gets fixed by upstream, use an asm statement to force
clang to assume the registers in question are clobbered, when invoking
__builtin_eh_return(), so it will emit code to save and restore them.

This should fix the crashes reported on -current with some C++ programs,
particularly those that throw exceptions over multiple function
boundaries.

Reported by:	stefanf
MFC: r243883

if PACKAGESITE url scheme is not 'file://', always try to revolv SRV records and
use them if any. It allows the bootstrap to use directly pkg.FreeBSD.org instead
of pkgbeta.FreeBSD.org
MFC r244383:
- Set memorylocked limit to 64Kb for default login class.
  This prevents unprivileged users to lock too much memory.
- Set memorylocked limit to 64Mb for daemon login class.
  Some daemons such as amd(8) and watchdogd(8) calls mlockall(2) on
  startup, they are run from init(8) which uses daemon login class.
- Set memorylocked limit to unlimited for root login class.

Approved by:	kib (mentor)
MFC r244384:
- Fix locked memory accounting for maps with MAP_WIREFUTURE flag.
- Add sysctl vm.old_mlock which may turn such accounting off.

MFC r244385:
- Add sysctl to allow unprivileged users to call mlock(2)-family system
  calls and turn it off for compatibility.
- Do not allow to call them inside jail.

Approved by:	kib (mentor)
MFC r244679:
- Update manual pages accordingly to r244384 and r244385.

Approved by:	kib (mentor)
- Fix r245416.
  Turn unprivileged mlock off for compatibility.  Exactly this behaviour
  was approved by kib (mentor).

This is a direct commit.

Approved by:	kib (mentor)
Partial MFC of r234508 (by adrian):

  "Upgrade" the AR9285 code to support PCI/ART EEPROM on flash.

  I've just verified that this boots on an Atheros AP91. I haven't verified
  it with traffic though, so YMMV.

(This is a prerequisite for the coming clang 3.2 upgrade.)
MFC r244628:

  Upgrade our copy of llvm/clang to 3.2 release.

  Release notes for llvm:
  http://llvm.org/releases/3.2/docs/ReleaseNotes.html

  Release notes for clang:
  http://llvm.org/releases/3.2/tools/clang/docs/ReleaseNotes.html
Use a direct commit to fix a minor mistake in r245431, before it spreads
too far: use the correct FreeBSD version in clang's target triple.  That
is, $ARCH-unknown-freebsd9.1 instead of $ARCH-unknown-freebsd9.2.

This will be bumped again for the 9.2 release, when it branches off.
Oops, r186202 (4 years ago) forgot to remove Tape from the F1 Help file.
MFC r244401,245305,245308:

Replace our implementation of the vis(3) and unvis(3) APIs with
NetBSD's.  This output size limited versions of vis and unvis functions
as well as a set of vis variants that allow arbitrary characters to be
specified for encoding.

Finally, MIME Quoted-Printable encoding as described in RFC 2045 is
supported.
Merge remote-tracking branch 'upstream/stable/9' into stable/9