MFC 235915:

Hook up mkulzma to the build.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236244 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r232598:

Make racct and rctl correctly handle jail renaming.  Previously
they would continue using old name, the one jail was created with.

PR:		bin/165207

MFC r235795:

Don't leak locks in prison_racct_modify().

MFC r235803:

Fix use-after-free in kern_jail_set() triggered e.g. by attempts
to clear "persist" flag from empty persistent jail, like this:

jail -c persist=1
jail -n 1 -m persist=0


git-svn-id: svn://svn.freebsd.org/base/stable/9@236253 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r234106, r235751:

Queue CCBs internally instead of using CAM_REQUEUE_REQ status.  This fixes
problem where userspace apps such as smartctl fail due to CAM_REQUEUE_REQ
status getting returned when tagged commands are outstanding when smartctl
sends its I/O using the pass(4) interface.

Sponsored by: Intel


git-svn-id: svn://svn.freebsd.org/base/stable/9@236263 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r235854

Tweak condition for disabling allocation from per-CPU buckets in
low memory situation. I've observed a situation where per-CPU
allocations were disabled while there were enough free cached pages.
Basically, cnt.v_free_count was sitting stable at a value lower
than cnt.v_free_min and that caused massive performance drop.

Reviewed by:	alc@


git-svn-id: svn://svn.freebsd.org/base/stable/9@236269 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r236135:

Return EBUSY for PTHREAD_MUTEX_ADAPTIVE_NP too when the mutex could not
be acquired.

PR:	168317


git-svn-id: svn://svn.freebsd.org/base/stable/9@236275 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r235850:
Calculate the count of per-process cow faults.  Export the count to
userspace using the obscure spare int field in struct kinfo_proc.

MFC r236136:
Fix ki_cow for compat32 binaries.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236292 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r235851:
Add 'cow' keyword to show per-process cow count.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236293 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r236149:

Pull in r157212 from upstream clang trunk:

  Revert r115805. An array type is required to have a range type,
  however, the range can be unknown for the upper bound.

  Testcase to follow.

  Part of rdar://11457152

This should fix ctfconvert producing error messages during kernel
builds, similar to:

  ERROR: scsi_all.c: die 24561: failed to retrieve array bounds

These were caused by incorrect debug information for flexible array
members of structs.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236296 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update the previous openssl fix. [12:01]

Fix a bug in crypt(3) ignoring characters of a passphrase. [12:02]

Security:	FreeBSD-SA-12:01.openssl (revised)
Security:	FreeBSD-SA-12:02.crypt
Approved by:	so (bz, simon)


git-svn-id: svn://svn.freebsd.org/base/stable/9@236304 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 234099:
Properly parse 40G media types from newer Mellanox adapters that are
40G capable.  For now, map all 40G links to 40GBase-CR4.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236316 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 234501:
The amr(4) firmware contains a rather dubious "feature" where it
assumes for small buffers (< 64k) that the OS driver is actually using
a buffer rounded up to the next power of 2.  It also assumes that the
buffer is at least 4k in size.  Furthermore, there is at least one
known instance of megarc sending a request with a 12k buffer where the
firmware writes out a 24k-ish reply.

To workaround the data corruption triggered by this "feature", ensure
that buffers for user commands use a minimum size of 32k, and that
buffers between 32k and 64k use a 64k buffer.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 235833:
Only check to see if a memory resource is a PCI ROM BAR when activating
and deactivating PCI resources.  Previously, if a device had more than
48 MSI interrupts, then activating message 48 (which has a rid == PCIR_BIOS)
would incorrectly try to enable the PCI ROM BAR.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/svn_stable_9' into svn_stable_9