]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agocryptotest.py: Actually use NIST-KAT HMAC test vectors and test the right hashes
Conrad Meyer [Thu, 21 Sep 2017 21:07:21 +0000 (21:07 +0000)]
cryptotest.py: Actually use NIST-KAT HMAC test vectors and test the right hashes

Previously, this test was entirely a no-op as no vector in the NIST-KAT file
has a precisely 20-byte key.

Additionally, not every vector in the file is SHA1.  The length field
determines the hash under test, and is now decoded correctly.

Finally, due to a limitation I didn't feel like fixing in cryptodev.py, MACs
are truncated to 16 bytes in this test.

With this change and the uncommitted D12437 (to allow key sizes other than
those used in IPSec), the SHA tests in cryptotest.py actually test something
and e.g. at least cryptosoft passes the test.

Sponsored by: Dell EMC Isilon

6 years agoFix M_GTASKQUEUE definition
Stephen Hurd [Thu, 21 Sep 2017 20:34:33 +0000 (20:34 +0000)]
Fix M_GTASKQUEUE definition

Previously had the same short and long description as taskqueues.
This could cause problems with memguard(9) and vmstat -m which use
the short description as a unique identifier.

Reviewed by: sbruno
Approved by: sbruno (mentor)
MFC after: 3 days
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12438

6 years agobnxt: Fix driver when attached to a VF
Stephen Hurd [Thu, 21 Sep 2017 20:27:43 +0000 (20:27 +0000)]
bnxt: Fix driver when attached to a VF

- Use HWRM_FUNC_VF_CFG instead of HWRM_FUNC_CFG on VFs
- Fix NPAR/VF detection
- Clean up flag definitions
- Don't allow WoL on VFs

Although the bnxt driver doesn't support SR-IOV so can create VFs yet,
the PF could be running Linux or ESCi with a VF passed through to a
FreeBSD guest.  This fixes the driver for that use case.

Submitted by: Siva Kallam <siva.kallam@@broadcom.com>
Reviewed by: shurd, sbruno
Approved by: sbruno (mentor)
Sponsored by: Broadcom Limited
Differential Revision: https://reviews.freebsd.org/D12410

6 years agoUnprotected modification of ng_iface(4) private data leads to kernel panic.
Eugene Grosbein [Thu, 21 Sep 2017 20:16:10 +0000 (20:16 +0000)]
Unprotected modification of ng_iface(4) private data leads to kernel panic.
Fix a race with per-node read-mostly lock and refcounting for a hook.

PR: 220076
Tested by: peixoto.cassiano
Approved by: avg (mentor), mav (mentor)
MFC after: 1 week
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12435

6 years agocryptotest.py: Do not run AES-CBC or AES-GCM tests on non-AES crypto(4) drivers
Conrad Meyer [Thu, 21 Sep 2017 18:06:21 +0000 (18:06 +0000)]
cryptotest.py: Do not run AES-CBC or AES-GCM tests on non-AES crypto(4) drivers

For some reason, we only skipped AES-XTS tests if a driver was not in the
aesmodules list.  Skip other AES modes as well to prevent spurious failures
in non-AES drivers.

Sponsored by: Dell EMC Isilon

6 years agoModernize calls to vm_page_unwire(). As of r288122, vm_page_unwire()
Alan Cox [Thu, 21 Sep 2017 15:32:41 +0000 (15:32 +0000)]
Modernize calls to vm_page_unwire().  As of r288122, vm_page_unwire()
accepts PQ_NONE as the specified queue and returns a Boolean indicating
whether the page's wire count transitioned to zero.  Use these features
in dev/drm2.

Reviewed by: kib, markj
MFC after: 1 week

6 years agolibefi: devicename.c cleanups
Toomas Soome [Thu, 21 Sep 2017 15:30:20 +0000 (15:30 +0000)]
libefi: devicename.c cleanups

Remove duplicated free()+return statements, default unit to 0
and improve strtol error processing.

6 years agoWe use a few different ifdef's names to check if we are using Casper or not,
Mariusz Zaborski [Thu, 21 Sep 2017 14:41:41 +0000 (14:41 +0000)]
We use a few different ifdef's names to check if we are using Casper or not,
let's standardize this. Now we are always use WITH_CASPER name.

Discussed with: emaste@
MFC after: 1 month

6 years agoAmmend bin/cat/cat.c so the output is the same aside
Sevan Janiyan [Thu, 21 Sep 2017 14:14:49 +0000 (14:14 +0000)]
Ammend bin/cat/cat.c so the output is the same aside
from blank lines being numbered or unnumbered, depending on whether cat
was invoked with -ne or -be.

At present, when cat is invoked with -be, there is an aditional
difference that the '$' on blank lines is placed on the far left of the
output.

Discussed in bug 210607.

While here, revert the workaround from r304035 which skipped the unit test for
this issue previously.

PR: 210607
Submitted by: myself
Reviewed by: bdrewery
Obtained from: NetBSD
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12432

6 years agobridge: Set module version
Kristof Provost [Thu, 21 Sep 2017 14:14:01 +0000 (14:14 +0000)]
bridge: Set module version

This ensures that the loader will not load the module if it's also built in to
the kernel.

PR: 220860
Submitted by: Eugene Grosbein <eugen@freebsd.org>
Reported by: Marie Helene Kvello-Aune <marieheleneka@gmail.com>

6 years agoCode cleanup, no functional change.
Michael Tuexen [Thu, 21 Sep 2017 11:56:31 +0000 (11:56 +0000)]
Code cleanup, no functional change.

MFC after: 1 week

6 years agoPlug memory leak in case when nvlist allocation succeeds, but nvpair
Mariusz Zaborski [Thu, 21 Sep 2017 10:28:22 +0000 (10:28 +0000)]
Plug memory leak in case when nvlist allocation succeeds, but nvpair
allocation fails.

Submitted by: pjd@
MFC after: 1 month
Sponsored by: Wheel Systems

6 years agoSimplify the code by _not_ expecting success under 'fail'.
Mariusz Zaborski [Thu, 21 Sep 2017 10:18:02 +0000 (10:18 +0000)]
Simplify the code by _not_ expecting success under 'fail'.

Submitted by: pjd@ and oshogbo@
MFC after: 1 month
Sponsored by: Wheel Systems

6 years agoIMHO it is possible that failure will be treated as success because we don't
Mariusz Zaborski [Thu, 21 Sep 2017 10:16:44 +0000 (10:16 +0000)]
IMHO it is possible that failure will be treated as success because we don't
initialize nvp on every loop iteration and the code under 'fail'(!) label
detects success by checking of nvp != NULL.

Submitted by: pjd@
MFC after: 1 month
Sponsored by:   Wheel Systems

6 years agoFree 'value' only once we are done freeing all individual
Mariusz Zaborski [Thu, 21 Sep 2017 10:14:43 +0000 (10:14 +0000)]
Free 'value' only once we are done freeing all individual

Submitted by:   pjd@
MFC after: 1 month
Found by:       scan-build
Sponsored by:   Wheel Systems

6 years agoRemove an 'unused' function.
Nick Hibma [Thu, 21 Sep 2017 10:13:48 +0000 (10:13 +0000)]
Remove an 'unused' function.

This function was only set in legacy.sh and only at the very end after
the disk image had been successfully created. The only difference will be
that the message 'Error encountered. Please check...' will not appear if
nanobsd.sh exits with an error after the disk image has been created.

6 years agoBecause nvp wasn't initialized on every loop iteration once we jumped
Mariusz Zaborski [Thu, 21 Sep 2017 10:10:42 +0000 (10:10 +0000)]
Because nvp wasn't initialized on every loop iteration once we jumped
to 'fail' on error it was treated as success, because nvp!=NULL. Fix this
by not handling success under 'fail' label and by using separate variable
for parent nvpair.

If we succeeded to allocate nvlist, but failed to allocated nvpair we
would leak nvls[ii] on return. Destroy it when we cannot allocate nvpair,
before we goto fail.

Submitted by: pjd@ and oshogbo@ (minor changes)
Found by:       scan-build
MFC after: 1 month
Sponsored by: Wheel Systems

6 years agoMake the code consistent by always using 'fail' label.
Mariusz Zaborski [Thu, 21 Sep 2017 10:06:00 +0000 (10:06 +0000)]
Make the code consistent by always using 'fail' label.

Submitted by: pjd@ and oshogbo@
MFC after: 1 month
Sponsored by: Wheel Systems

6 years agoThe 'while (array != NULL) { }' suggests scan-build that array may be
Mariusz Zaborski [Thu, 21 Sep 2017 10:03:14 +0000 (10:03 +0000)]
The 'while (array != NULL) { }' suggests scan-build that array may be
initially NULL, which is not possible. Change the loop to
'do {} while (array != NULL)' to satisfy scan-build and assert that
array really cannot be NULL just in case.

Submitted by: pjd@
Found by: scan-build
MFC after: 1 month
Sponsored by: Wheel Systems

6 years agoRemove redundant initialization. Don't use variable - just return the value.
Mariusz Zaborski [Thu, 21 Sep 2017 10:00:16 +0000 (10:00 +0000)]
Remove redundant initialization. Don't use variable - just return the value.
Make scan-build happy by casting to 'void *' instead of 'void **'.

Submitted by: pjd@
MFC after: 1 month
Found by: scan-build and cppcheck
Sponsored by: Wheel Systems

6 years agoFree the control structure after using is, not before.
Michael Tuexen [Thu, 21 Sep 2017 09:47:56 +0000 (09:47 +0000)]
Free the control structure after using is, not before.
Found by Coverity while scanning the usrsctp library.
MFC after: 1 week

6 years agoFix up style for consistency.
Nick Hibma [Thu, 21 Sep 2017 09:27:44 +0000 (09:27 +0000)]
Fix up style for consistency.

6 years agoSpeling mistakes.
Nick Hibma [Thu, 21 Sep 2017 09:22:41 +0000 (09:22 +0000)]
Speling mistakes.

6 years agoNo need to wakeup, since sctp_add_to_readq() does it.
Michael Tuexen [Thu, 21 Sep 2017 09:18:05 +0000 (09:18 +0000)]
No need to wakeup, since sctp_add_to_readq() does it.

MFC after: 1 week

6 years agocryptotest.py: Add a seatbelt that we're actually testing anything
Conrad Meyer [Thu, 21 Sep 2017 05:46:28 +0000 (05:46 +0000)]
cryptotest.py: Add a seatbelt that we're actually testing anything

Without nist-kat installed, cryptotest.py is a no-op.  Showing 'success' in
that case is unhelpful.

Sponsored by: Dell EMC Isilon

6 years agoAdd a few definitions for Flex File Layout for pNFS.
Rick Macklem [Thu, 21 Sep 2017 00:41:12 +0000 (00:41 +0000)]
Add a few definitions for Flex File Layout for pNFS.

These definitions will be used by a future commit.

6 years agoRemove an ancient comment about the existence of READ(16) and WRITE(16).
Jung-uk Kim [Thu, 21 Sep 2017 00:03:59 +0000 (00:03 +0000)]
Remove an ancient comment about the existence of READ(16) and WRITE(16).

MFC after: 3 days

6 years agoUse in_localip() function instead of unlocked access to addresses hash
Andrey V. Elsukov [Wed, 20 Sep 2017 22:35:28 +0000 (22:35 +0000)]
Use in_localip() function instead of unlocked access to addresses hash
to determine that an address is our local.

PR: 220078
MFC after: 1 week

6 years agoDo not acquire IPFW_WLOCK when a named object is created and destroyed.
Andrey V. Elsukov [Wed, 20 Sep 2017 22:00:06 +0000 (22:00 +0000)]
Do not acquire IPFW_WLOCK when a named object is created and destroyed.

Acquiring of IPFW_WLOCK is requried for cases when we are going to
change some data that can be accessed during processing of packets flow.
When we create new named object, there are not yet any rules, that
references it, thus holding IPFW_UH_WLOCK is enough to safely update
needed structures. When we destroy an object, we do this only when its
reference counter becomes zero. And it is safe to not acquire IPFW_WLOCK,
because noone references it. The another case is when we failed to finish
some action and thus we are doing rollback and destroying an object, in
this case it is still not referenced by rules and no need to acquire
IPFW_WLOCK.

This also fixes panic with INVARIANTS due to recursive IPFW_WLOCK acquiring.

MFC after: 1 week
Sponsored by: Yandex LLC

6 years agoFix queue depth for nda.
Warner Losh [Wed, 20 Sep 2017 21:42:25 +0000 (21:42 +0000)]
Fix queue depth for nda.

1/4 of the number of queues times queue entries is too limiting. It
works up to about 4k IOPS / 3.0GB/s for hardware that can do
4.4k/3.2GB/s with nvd. 3/4 works better, though it highlights issues
in the fairness of nda's choice of TRIM vs READ. That will be fixed
separately.

6 years agoProtect the address workqueue timer by a mutex.
Michael Tuexen [Wed, 20 Sep 2017 21:29:54 +0000 (21:29 +0000)]
Protect the address workqueue timer by a mutex.

MFC after: 1 week

6 years agocam iosched: Call cam_iosched_limiter_init() after ios->current is set to the default
Warner Losh [Wed, 20 Sep 2017 21:26:01 +0000 (21:26 +0000)]
cam iosched: Call cam_iosched_limiter_init() after ios->current is set to the default

Previously ios->current was set to 0 until the first
cam_iosched_cl_maybe_steer() call.

PR: 221954
Obtained from: ElectroBSD
Submitted by: Fabian Keil
Differential Revision: https://reviews.freebsd.org/D12349

6 years agocam iosched: Schedule cam_iosched_ticker() quanta times per second
Warner Losh [Wed, 20 Sep 2017 21:25:56 +0000 (21:25 +0000)]
cam iosched: Schedule cam_iosched_ticker() quanta times per second

Previously callout_reset() was called with a "ticks" value that was
off by one.  As a result cam_iosched_ticker() was called a bit too
frequently: On systems with hz=1000 a quanta value of 200 resulted in
~250 calls and a value of 100 in ~111 calls.

For the "queue_depth" and "bandwidth" limiters the difference doesn't
matter but the "iops" limiter depends on the scheduling to enforce the
correct maximum.

PR: 221956
Obtained from: ElectroBSD
Submitted by: Fabian Keil
Differential Revision: https://reviews.freebsd.org/D12350

6 years agocam iosched: Add a handler for the quanta sysctl to enforce valid values
Warner Losh [Wed, 20 Sep 2017 21:19:53 +0000 (21:19 +0000)]
cam iosched: Add a handler for the quanta sysctl to enforce valid values

Invalid values can result in devision-by-zero panics or other
undefined behaviour so lets not allow them.

PR: 221957
Obtained from: ElectroBSD
Submitted by: Fabian Keil
Differential Revision: https://reviews.freebsd.org/D12351

6 years agocam iosched: Use the write queue for BIO_ZONE commands
Warner Losh [Wed, 20 Sep 2017 21:13:20 +0000 (21:13 +0000)]
cam iosched: Use the write queue for BIO_ZONE commands

Use the write queue for BIO_ZONE commands so they can't get executed
ahead of writes that were sent after them. More generally, since they
introduce strong ordering into the list, they need to go to the write
queue (which is the only queue that BIO_ORDERED is honored for at the
moment). In fact, fix mismatch between queueing and dequeueing code by
changing this to queue all non-reads (and non-trims) to the write
queue.

As a side effect this prevents the kernel message:
kernel: Found bio_cmd = 0x9
which cam_iosched_next_bio() emits when finding commands
other than BIO_READ in the read queue.

PR: 221973
Obtained from: ElectroBSD
Submitted by: Fabian Keil
Differential Revision: https://reviews.freebsd.org/D12353

6 years agoFix iflib netmap RX
Stephen Hurd [Wed, 20 Sep 2017 20:40:49 +0000 (20:40 +0000)]
Fix iflib netmap RX

RXQ setup for netmap was broken because netmap_rxq_init was getting called
before IFDI_INIT - thus we ended up with ring tail pointer being reset to zero.

Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12140

6 years ago1. ql_hw.c:
David C Somayajulu [Wed, 20 Sep 2017 20:07:45 +0000 (20:07 +0000)]
1. ql_hw.c:
In ql_hw_send() return EINVAL when TSO framelength exceeds max
supported length by HW.(davidcs)
2. ql_os.c:
In qla_send() call bus_dmamap_unload before freeing mbuf or
recreating dmmamap.(davidcs)
In qla_fp_taskqueue() Add additional checks for IFF_DRV_RUNNING
Fix qla_clear_tx_buf() call bus_dmamap_sync() before freeing
mbuf.

Submitted by:David.Bachu@netapp.com
MFC after:5 days

6 years agoaesni(4): Fix another trivial typo (aensi -> aesni)
Conrad Meyer [Wed, 20 Sep 2017 18:31:36 +0000 (18:31 +0000)]
aesni(4): Fix another trivial typo (aensi -> aesni)

Sponsored by: Dell EMC Isilon

6 years agox86: Decode AMD "Extended Feature Extensions ID EBX" bits
Conrad Meyer [Wed, 20 Sep 2017 18:30:37 +0000 (18:30 +0000)]
x86: Decode AMD "Extended Feature Extensions ID EBX" bits

In particular, this determines CPU support for the CLZERO instruction.

(No, I am not making this name up.)

Sponsored by: Dell EMC Isilon

6 years agoaesni(4): Fix trivial typo (AQUIRE -> ACQUIRE)
Conrad Meyer [Wed, 20 Sep 2017 17:53:25 +0000 (17:53 +0000)]
aesni(4): Fix trivial typo (AQUIRE -> ACQUIRE)

Sponsored by: Dell EMC Isilon

6 years agoMFV r323789: 8473 scrub does not detect errors on active spares
Alan Somers [Wed, 20 Sep 2017 16:31:00 +0000 (16:31 +0000)]
MFV r323789:  8473 scrub does not detect errors on active spares

illumos/illumos-gate@554675eee75dd2d7398d960aa5c81083ceb8505a
https://github.com/illumos/illumos-gate/commit/554675eee75dd2d7398d960aa5c81083ceb8505a

https://www.illumos.org/issues/8473
Scrubbing is supposed to detect and repair all errors in the pool. However,
it wrongly ignores active spare devices. The problem can easily be
reproduced in OpenZFS at git rev 0ef125d with these commands:

truncate -s 64m /tmp/a /tmp/b /tmp/c
sudo zpool create testpool mirror /tmp/a /tmp/b spare /tmp/c
sudo zpool replace testpool /tmp/a /tmp/c
/bin/dd if=/dev/zero bs=1024k count=63 oseek=1 conv=notrunc of=/tmp/c
sync
sudo zpool scrub testpool
zpool status testpool # Will show 0 errors, which is wrong
sudo zpool offline testpool /tmp/a
sudo zpool scrub testpool
zpool status testpool # Will show errors on /tmp/c,
      # which should've already been fixed

FreeBSD head is partially affected: the first scrub will detect some errors, but the second scrub will detect more.

Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

MFC after: 1 week
Sponsored by: Spectra Logic Corp

6 years agoBootstrap etcupdate(8) and mergemaster(8) databases when creating
Glen Barber [Wed, 20 Sep 2017 15:49:12 +0000 (15:49 +0000)]
Bootstrap etcupdate(8) and mergemaster(8) databases when creating
virtual machine images and embedded images, similar to what is
done when extracting base.txz to the target root filesystem in
an new installation.

Noticed by: marius
Tested with: head@r323729
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

6 years agoRegenerate usb.conf .
Hans Petter Selasky [Wed, 20 Sep 2017 15:00:00 +0000 (15:00 +0000)]
Regenerate usb.conf .

MFC after: 1 week

6 years agoadd vfs_zfs.abd_chunk_size tunable
Andriy Gapon [Wed, 20 Sep 2017 08:36:31 +0000 (08:36 +0000)]
add vfs_zfs.abd_chunk_size tunable

It is reported that the default value of 4KB results in a substantial
memory use overhead (at least, on some configurations).  Using 1KB seems
to reduce the overhead significantly.

PR: 222377
Reported by: Sean Chittenden <sean@chittenden.org>
MFC after: 1 week

6 years agofix memory leak in g_bio zone introduced in r320452, another ABD fallout
Andriy Gapon [Wed, 20 Sep 2017 08:27:21 +0000 (08:27 +0000)]
fix memory leak in g_bio zone introduced in r320452, another ABD fallout

I overlooked the fact that that ZIO_IOCTL_PIPELINE does not include
ZIO_STAGE_VDEV_IO_DONE stage.  We do allocate a struct bio for an ioctl
zio (a disk cache flush), but we never freed it.

This change splits bio handling into two groups, one for normal
read/write i/o that passes data around and, thus, needs the abd data
tranform; the other group is for "data-less" i/o such as trim and cache
flush.

PR: 222288
Reported by: Dan Nelson <dnelson@allantgroup.com>
Tested by: Borja Marcos <borjam@sarenet.es>
MFC after: 10 days

6 years agoMFV r323792: 8602 remove unused "dp_early_sync_tasks" field from "dsl_pool" structure
Andriy Gapon [Wed, 20 Sep 2017 07:26:52 +0000 (07:26 +0000)]
MFV r323792: 8602 remove unused "dp_early_sync_tasks" field from "dsl_pool" structure

illumos/illumos-gate@2bcb5458541cc6e8bf7dc541303da29297b82e8b
https://github.com/illumos/illumos-gate/commit/2bcb5458541cc6e8bf7dc541303da29297b82e8b

https://www.illumos.org/issues/8602
  When I landed the fix for 8558, I incorrectly added the "dp_early_sync_tasks"
  field to the "dsl_pool" structure. This field is used in DelphixOS, but not in
  illumos. It was incorrectly pulled into illumos, so this bug is to remove it
  from the structure.

Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

MFC after: 1 week

6 years ago8602 remove unused "dp_early_sync_tasks" field from "dsl_pool" structure
Andriy Gapon [Wed, 20 Sep 2017 07:24:57 +0000 (07:24 +0000)]
8602 remove unused "dp_early_sync_tasks" field from "dsl_pool" structure

illumos/illumos-gate@2bcb5458541cc6e8bf7dc541303da29297b82e8b
https://github.com/illumos/illumos-gate/commit/2bcb5458541cc6e8bf7dc541303da29297b82e8b

https://www.illumos.org/issues/8602
  When I landed the fix for 8558, I incorrectly added the "dp_early_sync_tasks"
  field to the "dsl_pool" structure. This field is used in DelphixOS, but not in
  illumos. It was incorrectly pulled into illumos, so this bug is to remove it
  from the structure.

Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

6 years agoMFV r323790: 8567 Inconsistent return value in zpool_read_label
Andriy Gapon [Wed, 20 Sep 2017 07:23:50 +0000 (07:23 +0000)]
MFV r323790: 8567 Inconsistent return value in zpool_read_label

illumos/illumos-gate@c861bfbd77c4ae780a0341e9cb6926d8b74341cf
https://github.com/illumos/illumos-gate/commit/c861bfbd77c4ae780a0341e9cb6926d8b74341cf

https://www.illumos.org/issues/8567
  If fstat64 fails, pread64 fails, or the label is unintelligible,
  zpool_read_label will return 0. But if malloc fails, it will return -1. For
  consistency, it should always return -1 on failure or 0 on success.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alan Somers <asomers@gmail.com>

MFC after: 2 weeks

6 years ago8567 Inconsistent return value in zpool_read_label
Andriy Gapon [Wed, 20 Sep 2017 07:18:09 +0000 (07:18 +0000)]
8567 Inconsistent return value in zpool_read_label

illumos/illumos-gate@c861bfbd77c4ae780a0341e9cb6926d8b74341cf
https://github.com/illumos/illumos-gate/commit/c861bfbd77c4ae780a0341e9cb6926d8b74341cf

https://www.illumos.org/issues/8567
  If fstat64 fails, pread64 fails, or the label is unintelligible,
  zpool_read_label will return 0. But if malloc fails, it will return -1. For
  consistency, it should always return -1 on failure or 0 on success.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alan Somers <asomers@gmail.com>

6 years ago8473 scrub does not detect errors on active spares
Andriy Gapon [Wed, 20 Sep 2017 06:34:48 +0000 (06:34 +0000)]
8473 scrub does not detect errors on active spares

illumos/illumos-gate@554675eee75dd2d7398d960aa5c81083ceb8505a
https://github.com/illumos/illumos-gate/commit/554675eee75dd2d7398d960aa5c81083ceb8505a

https://www.illumos.org/issues/8473
  Scrubbing is supposed to detect and repair all errors in the pool. However, it
  wrongly ignores active spare devices. The problem can easily be reproduced in
  OpenZFS at git rev 0ef125d with these commands:

  truncate -s 64m /tmp/a /tmp/b /tmp/c
  sudo zpool create testpool mirror /tmp/a /tmp/b spare /tmp/c
  sudo zpool replace testpool /tmp/a /tmp/c
  /bin/dd if=/dev/zero bs=1024k count=63 oseek=1 conv=notrunc of=/tmp/c
  sync
  sudo zpool scrub testpool
  zpool status testpool # Will show 0 errors, which is wrong
  sudo zpool offline testpool /tmp/a
  sudo zpool scrub testpool
  zpool status testpool # Will show errors on /tmp/c, which should've already been fixed

  FreeBSD head is partially affected: the first scrub will detect some errors,
  but the second scrub will detect more.

Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Alan Somers <asomers@gmail.com>

6 years agoIn r288122, we changed vm_page_unwire() so that it returns a Boolean
Alan Cox [Wed, 20 Sep 2017 04:59:52 +0000 (04:59 +0000)]
In r288122, we changed vm_page_unwire() so that it returns a Boolean
indicating whether the page's wire count transitioned to zero.  Use that
return value in zbuf_page_free() rather than checking the wire count.

MFC after: 1 week

6 years agoSync with amd64/arm/arm64/i386/mips pmap change r288256:
Alan Cox [Wed, 20 Sep 2017 04:19:49 +0000 (04:19 +0000)]
Sync with amd64/arm/arm64/i386/mips pmap change r288256:

Exploit r288122 to address a cosmetic issue.  Since PV chunk pages don't
belong to a vm object, they can't be paged out.  Since they can't be paged
out, they are never enqueued in a paging queue.  Nonetheless, passing
PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages
are being enqueued in the inactive queue.  As of r288122, we can avoid
this false impression by passing PQ_NONE.

MFC after: 1 week

6 years agoDefine CPU_XSCALE_CORE3 when relevant.
Olivier Houchard [Tue, 19 Sep 2017 23:41:55 +0000 (23:41 +0000)]
Define CPU_XSCALE_CORE3 when relevant.
It was lost when cpuconf.h was deobirted.

6 years agoMake the nfsrpc_layoutget() function a static.
Rick Macklem [Tue, 19 Sep 2017 23:28:22 +0000 (23:28 +0000)]
Make the nfsrpc_layoutget() function a static.

Make the NFSv4 pNFS client function nfsrpc_layoutget() a static, since it
is only used in sys/fs/nfsclient/nfs_clrpcops.c.
This prepares the code for future patches that add Flex File layout
support.

6 years agoAdd sysctl "enable_minidump" to turn on/off automatic minidump retrieval
David C Somayajulu [Tue, 19 Sep 2017 23:26:27 +0000 (23:26 +0000)]
Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval

MFC after:5 days

6 years agoUpdate minidump template for version 5.4.66
David C Somayajulu [Tue, 19 Sep 2017 22:17:30 +0000 (22:17 +0000)]
Update minidump template for version 5.4.66

MFC after:5 days

6 years agoAdd a new function called nfsm_uiombuflist(), similar to nfsm_uiombuf().
Rick Macklem [Tue, 19 Sep 2017 21:31:36 +0000 (21:31 +0000)]
Add a new function called nfsm_uiombuflist(), similar to nfsm_uiombuf().

This patch adds a new function called nfsm_uiombuflist(), which is
similar to nfsm_uiombuf(), but doesn't not use the fields in
struct nfsrv_descript. This new function will be used by the pNFS client
for writing to mirrors using Flex Files layout.
The function is not yet called anywhere.
Also, get rid of #ifndef APPLE, which is ancient cruft left over from
the Mac OSX port of the NFSv4 client.

6 years agoSimplify nfsrpc_layoutreturn() args.
Rick Macklem [Tue, 19 Sep 2017 20:45:25 +0000 (20:45 +0000)]
Simplify nfsrpc_layoutreturn() args.

Simplify nfsrpc_layoutreturn() args. in preparation for the addition
of Flex File layout support, since File layout uses a 0 length field.
Flex Files does use a longer field, but that will be added in a
subsequent commit.

6 years agoFix indentation for r323068
Josh Paetzel [Tue, 19 Sep 2017 20:40:05 +0000 (20:40 +0000)]
Fix indentation for r323068

PR: 220170
Reported by: lidl
MFC after: 3 days
Pointyhat to: jpaetzel

6 years agoi81342 is little endian, not big endian.
Olivier Houchard [Tue, 19 Sep 2017 20:33:22 +0000 (20:33 +0000)]
i81342 is little endian, not big endian.

6 years agoFix a warning.
Michael Tuexen [Tue, 19 Sep 2017 20:24:13 +0000 (20:24 +0000)]
Fix a warning.

MFC after: 1 week

6 years agoSimplify nfsrpc_layoutcommit() args.
Rick Macklem [Tue, 19 Sep 2017 20:18:41 +0000 (20:18 +0000)]
Simplify nfsrpc_layoutcommit() args.

Simplify nfsrpc_layoutcommit() args. in preparation for the addition
of Flex File layout support, since it also uses a 0 length field.

6 years agoAvoid an overflow when computing the staleness.
Michael Tuexen [Tue, 19 Sep 2017 20:09:58 +0000 (20:09 +0000)]
Avoid an overflow when computing the staleness.
This issue was found by running libfuzz on the userland stack.

MFC after: 1 week

6 years agoDo not do torn writes to active LDTs.
Konstantin Belousov [Tue, 19 Sep 2017 17:57:04 +0000 (17:57 +0000)]
Do not do torn writes to active LDTs.

Care must be taken when updating the active LDT, since parallel
threads might try to load a segment descriptor which is currently
updated. Since the results are undefined, this cannot be ignored by
claiming to be an application race.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D12413

6 years agoDo not vrele() covered vnode under the mp mutex.
Konstantin Belousov [Tue, 19 Sep 2017 16:49:45 +0000 (16:49 +0000)]
Do not vrele() covered vnode under the mp mutex.

If vrele() changes the hold count to zero, it needs to acquire the
vnode lock.

Sponsored by: The FreeBSD Foundation
Discussed with: avg
X-MFC with: r323578

6 years agoFor unlinked files, do not msync(2) or sync on the vnode deactivation.
Konstantin Belousov [Tue, 19 Sep 2017 16:46:37 +0000 (16:46 +0000)]
For unlinked files, do not msync(2) or sync on the vnode deactivation.

One consequence of the patch is that msyncing unlinked file mappings
no longer reduces the amount of the dirty memory in the system, but I
do not think that there are users of msync(2) that utilize it for such
side-effect.

Reported and tested by: tjil
PR: 222356
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D12411

6 years agoAdd myself and mentorship status to committers files.
Eugene Grosbein [Tue, 19 Sep 2017 16:38:54 +0000 (16:38 +0000)]
Add myself and mentorship status to committers files.
This was not done right when I got my ports bit, so do them both in one commit:

my ports mentors were az@ and vsevolod@ and my src mentors are avg@ and mav@

Approved by: avg (mentor)

6 years agoProvide an articulate example of how to properly delete partitions and
Alexey Dokuchaev [Tue, 19 Sep 2017 15:08:31 +0000 (15:08 +0000)]
Provide an articulate example of how to properly delete partitions and
partitioning scheme.

Users often get confused and frustrated when trying to delete partition
table and getting ``Device busy'' error because they forgot (or did not
ever know that they have) to delete all its partitions first, and while
the manual page mentions this briefly, it does not stress it out enough.

Approved by: ae, manpages (bjk)
PR (as inspiration): 196102
Differential Revision: https://reviews.freebsd.org/D12336

6 years agoRemove a no longer used variable.
Michael Tuexen [Tue, 19 Sep 2017 15:00:19 +0000 (15:00 +0000)]
Remove a no longer used variable.

Reported by: Felix Weinrank
MFC after: 1 week

6 years agohyperv/hn: Incease max supported MTU
Sepherosa Ziehau [Tue, 19 Sep 2017 06:46:00 +0000 (06:46 +0000)]
hyperv/hn: Incease max supported MTU

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D12365

6 years agohyperv/hn: Fix MTU setting
Sepherosa Ziehau [Tue, 19 Sep 2017 06:38:57 +0000 (06:38 +0000)]
hyperv/hn: Fix MTU setting

- Add size of an ethernet header to the value configured to NVS.  This
  does not seem to have any effects if MTU is 1500, but fix hypervisor
  side's setting if MTU > 1500.
- Override the MTU setting according to the view from the hypervisor
  side.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D12352

6 years agohyperv/hn: Apply VF's RSS setting
Sepherosa Ziehau [Tue, 19 Sep 2017 06:29:38 +0000 (06:29 +0000)]
hyperv/hn: Apply VF's RSS setting

Since in Azure SYN and SYN|ACK go through the synthetic parts while the
rest of the same TCP flow goes through the VF, apply VF's RSS settings
to synthetic parts to have a consistent hash value/type for the same TCP
flow.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D12333

6 years agoEnable support for lookaside crypto operations by default.
John Baldwin [Mon, 18 Sep 2017 23:50:34 +0000 (23:50 +0000)]
Enable support for lookaside crypto operations by default.

This permits ccr(4) to be used with the default firmware configuration
file.

Discussed with: np
Sponsored by: Chelsio Communications

6 years agoAdd UFS_LINK_MAX for the UFS-specific limit on link counts.
John Baldwin [Mon, 18 Sep 2017 23:30:39 +0000 (23:30 +0000)]
Add UFS_LINK_MAX for the UFS-specific limit on link counts.

ino64 expanded nlink_t to 64 bits, but the on-disk format for UFS is still
limited to 16 bits.  This is a nop currently but will matter if LINK_MAX is
increased in the future.

Reviewed by: kib
Sponsored by: Chelsio Communications

6 years agoFix handling of the segment registers on i386.
Konstantin Belousov [Mon, 18 Sep 2017 20:22:42 +0000 (20:22 +0000)]
Fix handling of the segment registers on i386.

Suppose that userspace is executing with the non-standard segment
descriptors.  Then, until exception or interrupt handler executed
SET_KERNEL_SEGS, kernel is still executing with user %ds, %es and %fs.
If an interrupt occurs in this window, the interrupt handler is
executed unsafely, relying on usability of the usermode registers.  If
the interrupt results in the context switch on return, the
contamination of the kernel state spreads to the thread we switched
to.  As result, kernel data accesses might fault or, if only the base
is changed, completely messed up.

More, if the user segment was allocated in LDT, another thread might
mark the descriptor as invalid before doreti code tried to reload
them.  In this case kernel panics.

The issue exists for all exception entry points which use trap gate,
and thus do not automatically disable interrupts on entry, and for
lcall_handler.

Fix is two-fold: first, we need to disable interrupts for all kernel
entries, changing the IDT descriptor types from trap gate to interrupt
gate.  Interrupts are re-enabled not earlier than the kernel segments
are loaded into the segment registers.  Second, we only load the
segment registers from the trap frame when returning to usermode.  For
the later, all interrupt return paths must happen through the doreti
common code.

There is no way to disable interrupts on call gate, which is the
supposed mode of servicing for lcall $7,$0 syscalls.  Change the LDT
descriptor 0 into a code segment type and point it to the userspace
trampoline which redirects the syscall to int $0x80.

All the measures make the segment register handling similar to that of
amd64.  We do not apply amd64 optimizations of not reloading segment
registers on return from the syscall.

Reported by: Maxime Villard <max@m00nbsd.net>
Tested by: pho (the non-lcall part)
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D12402

6 years agoAdd kern.features flag for MMCCAM
Ilya Bakulin [Mon, 18 Sep 2017 20:17:08 +0000 (20:17 +0000)]
Add kern.features flag for MMCCAM

kern.features.mmcam will be present and equal to 1 if the kernel has been
compiled with option MMCCAM.
This will help sdio-related userland tools to fail-fast if running on the kernel
without MMCCAM enabled.

Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D12386

6 years agoMake basic Broadcom I/O space reading functions work
Ilya Bakulin [Mon, 18 Sep 2017 20:01:01 +0000 (20:01 +0000)]
Make basic Broadcom I/O space reading functions work

It's now possible to use Broadcom functions to read the I/O registers of
SDIO card. The functions were copied from the BSD-licensed Broadcom Linux driver
as-is. To make it possible, a small Linux compatibility layer was introduced.

Currently the card responds with the correct version number ("magic")
when reading the corresponding address.

Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D12111

6 years agoDon't use an apostrophe in a possesive pronoun.
Cy Schubert [Mon, 18 Sep 2017 19:16:41 +0000 (19:16 +0000)]
Don't use an apostrophe in a possesive pronoun.

MFC after: 3 days

6 years agolinsysfs: quiet gcc -Wformat after r323692
Ryan Libby [Mon, 18 Sep 2017 19:09:40 +0000 (19:09 +0000)]
linsysfs: quiet gcc -Wformat after r323692

Reviewed by: cem
Sponsored by: Dell EMC Isilon

6 years agoHide a normal probe warning message under bootverbose, similar to atkbdc
Scott Long [Mon, 18 Sep 2017 18:42:28 +0000 (18:42 +0000)]
Hide a normal probe warning message under bootverbose, similar to atkbdc

Sponsored by: Netflix

6 years agolinsysfs(5): Fix two unrelated issues
Conrad Meyer [Mon, 18 Sep 2017 17:14:13 +0000 (17:14 +0000)]
linsysfs(5): Fix two unrelated issues

1. Swap the order of device_get_ivars with device_get_devclass and devclass
   name validation.  This bug was introduced in r323692.

2. Error check device_get_children and free the returned list.  This bug was
   introduced in the original linsysfs commit.

Reported by: Oleg V. Nauman <oleg AT theweb.org.ua>, hselasky (1); hselasky (2)
Reviewed by: hselasky
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12407

6 years agoRevert tcpdump to using the source manpage instead of having a copy here.
Gordon Tetlow [Mon, 18 Sep 2017 16:42:13 +0000 (16:42 +0000)]
Revert tcpdump to using the source manpage instead of having a copy here.

This helps future maintainability of tcpdump so we don't forget to update
the manpage (like we have previously).

Stolen from: usr.bin/file/Makefile
Reviewed by: jilles
Approved by: delphij (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D12403

6 years agoloader: biosmem allocate heap just below 4GB
Toomas Soome [Mon, 18 Sep 2017 15:17:01 +0000 (15:17 +0000)]
loader: biosmem allocate heap just below 4GB

The current biosmem code is walking bios smap entries and looking for smap
entry just below 4GB line, if there is such entry, its base and size is set
for heap base and size. Instead of entry base, we should use last HEAP_MIN
(currently 64MB) bytes just below 4GB, to make maximum space for kernel and
modules.

The problem was revealed on ASUS B350M-A system board, an AMD Ryzen 3 1200 CPU

memory map:

SMAP type=01 base=0000000000000000 len=000000000009d400 attr=01
SMAP type=02 base=000000000009d400 len=0000000000002c00 attr=01
SMAP type=02 base=00000000000e0000 len=0000000000020000 attr=01
SMAP type=01 base=0000000000100000 len=0000000009c00000 attr=01
SMAP type=02 base=0000000009d00000 len=0000000000300000 attr=01
SMAP type=01 base=000000000a000000 len=00000000be69b000 attr=01
SMAP type=03 base=00000000c869b000 len=0000000000016000 attr=01
SMAP type=01 base=00000000c86b1000 len=00000000124e7000 attr=01
SMAP type=02 base=00000000dab98000 len=0000000000138000 attr=01
SMAP type=03 base=00000000dacd0000 len=0000000000008000 attr=01
SMAP type=01 base=00000000dacd8000 len=0000000000100000 attr=01
SMAP type=04 base=00000000dadd8000 len=00000000003b3000 attr=01
SMAP type=02 base=00000000db18b000 len=0000000000d42000 attr=01
SMAP type=01 base=00000000dbecd000 len=0000000002133000 attr=01
SMAP type=01 base=0000000100000000 len=000000011f380000 attr=01
SMAP type=02 base=00000000de000000 len=0000000002000000 attr=01
SMAP type=02 base=00000000f8000000 len=0000000004000000 attr=01
SMAP type=02 base=00000000fdf00000 len=0000000000100000 attr=01
SMAP type=02 base=00000000fea00000 len=0000000000010000 attr=01
SMAP type=02 base=00000000feb80000 len=0000000000082000 attr=01
SMAP type=02 base=00000000fec10000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fec30000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fed00000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fed40000 len=0000000000005000 attr=01
SMAP type=02 base=00000000fed80000 len=0000000000010000 attr=01
SMAP type=02 base=00000000fedc2000 len=000000000000e000 attr=01
SMAP type=02 base=00000000fedd4000 len=0000000000002000 attr=01
SMAP type=02 base=00000000fee00000 len=0000000000100000 attr=01
SMAP type=02 base=00000000ff000000 len=0000000001000000 attr=01

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D12368

6 years agoBump the __FreeBSD_version after recent LinuxKPI changes.
Hans Petter Selasky [Mon, 18 Sep 2017 13:39:51 +0000 (13:39 +0000)]
Bump the __FreeBSD_version after recent LinuxKPI changes.

MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agoThe LinuxKPI atomics do not have acquire nor release semantics unless
Hans Petter Selasky [Mon, 18 Sep 2017 13:37:14 +0000 (13:37 +0000)]
The LinuxKPI atomics do not have acquire nor release semantics unless
specified. Fix code to use READ_ONCE() and WRITE_ONCE() where appropriate.

Suggested by: kib @
MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agoOnly wire pages in the LinuxKPI instead of holding and wiring them.
Hans Petter Selasky [Mon, 18 Sep 2017 13:23:59 +0000 (13:23 +0000)]
Only wire pages in the LinuxKPI instead of holding and wiring them.
This prevents the page daemon from regularly scanning the held pages.

Suggested by: kib @
MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agoAdd support for shared memory functions to the LinuxKPI.
Hans Petter Selasky [Mon, 18 Sep 2017 13:17:23 +0000 (13:17 +0000)]
Add support for shared memory functions to the LinuxKPI.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agolinsysfs(5): Add support for recent libdrm
Conrad Meyer [Sun, 17 Sep 2017 23:40:16 +0000 (23:40 +0000)]
linsysfs(5): Add support for recent libdrm

Expose more information about PCI devices (and GPUs in particular) via
linsysfs to libdrm.

This allows unmodified modern 64-bit Linux libdrm to work, which allows
modern Linux Mesa to work.  The submitter reports that he tested the change
with an Ubuntu 16.04 chroot + amdgpu from graphics/drm-next-kmod.

PR: 222375
Submitted by: Greg V <greg AT unrelenting.technology>

6 years agoGive icee(4) a detach() method so it can be used as a module. Add a
Ian Lepore [Sun, 17 Sep 2017 22:58:13 +0000 (22:58 +0000)]
Give icee(4) a detach() method so it can be used as a module.  Add a
module makefile for it.

6 years agoMCA: Expand AMD Thresholding support to cover all banks
Conrad Meyer [Sun, 17 Sep 2017 22:58:13 +0000 (22:58 +0000)]
MCA: Expand AMD Thresholding support to cover all banks

When it was added in r314636, AMD Thresholding was hardcoded to only
bank 4 (Northbridge) for some reason.  However, even on family 10h the
MCAx_MISC register Valid/Present bits determine whether thresholding is
supported on that bank.

Expand thresholding support to monitor all monitorable banks.  This
simplifies some of the logic and makes it more consistent with our Intel
CMCI support.

Reviewed by: markj (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12321

6 years agoFix bogus FREAD with NFSV4OPEN_ACCESSREAD. No functional change.
Rick Macklem [Sun, 17 Sep 2017 22:18:01 +0000 (22:18 +0000)]
Fix bogus FREAD with NFSV4OPEN_ACCESSREAD. No functional change.

The code in nfscl_doflayoutio() bogusly used FREAD instead of
NFSV4OPEN_ACCESSREAD. Since both happen to be defined as "1", this
worked and the patch doesn't result in a functional change.
Found by inspection during development of Flex File Layout support.

MFC after: 2 weeks

6 years agoDon't use a non-zero argument for __builtin_frame_address
Justin Hibbits [Sun, 17 Sep 2017 20:07:20 +0000 (20:07 +0000)]
Don't use a non-zero argument for __builtin_frame_address

__builtin_frame_address with a non-zero argument is unsafe and rejected by
newer gcc.  Since it doesn't seem to impact the stacktrace, don't bother
with gymnastics to unwind to a different frame for starting.

PR: kern/220118
MFC after: 2 weeks

6 years agoPrint the correct bitmask for the running Book-E CPU
Justin Hibbits [Sun, 17 Sep 2017 19:40:17 +0000 (19:40 +0000)]
Print the correct bitmask for the running Book-E CPU

All the Book-E world is no longer e500v{1,2}.  e500mc the 64-bit derivatives do
not use the DOZE/NAP bits with MSR[WE], instead using the `wait' instruction to
wait for interrupts, and SoC plane controls (via CCSR) for power management.

MFC after: 1 week

6 years agoMFV r323678: file 5.32
Gordon Tetlow [Sun, 17 Sep 2017 19:14:38 +0000 (19:14 +0000)]
MFV r323678: file 5.32

Approved by: emaste (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12400

6 years agoVendor import of file 5.32.
Gordon Tetlow [Sun, 17 Sep 2017 15:57:06 +0000 (15:57 +0000)]
Vendor import of file 5.32.

6 years agoImplement mmu_page_init for AIM platforms.
Mark Johnston [Sun, 17 Sep 2017 15:40:12 +0000 (15:40 +0000)]
Implement mmu_page_init for AIM platforms.

As of r323290 we cannot rely on the vm_page array being
zero-initialized.

Reported and tested by: andreast
MFC after: 1 week

6 years agolibsysdecode: report invalid cap_rights_t
Ed Maste [Sun, 17 Sep 2017 14:03:54 +0000 (14:03 +0000)]
libsysdecode: report invalid cap_rights_t

Previously we'd have an assertion failure in cap_rights_is_set if
sysdecode_cap_rights is called with an invalid cap_rights_t, so test for
validity first.

PR: 222258
Reviewed by: cem
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D12391

6 years agoFix language used in the r322923.
Mariusz Zaborski [Sun, 17 Sep 2017 10:28:45 +0000 (10:28 +0000)]
Fix language used in the r322923.

Pointed out by: wblock@
MFC after:      1 week
X-MFC-with:     r322923

6 years agoFix an accounting bug and use sctp_timer_start to start a timer.
Michael Tuexen [Sun, 17 Sep 2017 09:27:27 +0000 (09:27 +0000)]
Fix an accounting bug and use sctp_timer_start to start a timer.

MFC after: 1 week

6 years agoRemove code not used on any platform currently supported.
Michael Tuexen [Sat, 16 Sep 2017 21:26:06 +0000 (21:26 +0000)]
Remove code not used on any platform currently supported.

MFC after: 1 week