]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
6 years agoMFC r319954:
gjb [Thu, 15 Jun 2017 15:50:49 +0000 (15:50 +0000)]
MFC r319954:
 Modernize FreeBSD version numbers in freebsd-update(8).
 While here, expand a contraction to make textproc/igor happy.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319979 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319852:
delphij [Thu, 15 Jun 2017 04:37:23 +0000 (04:37 +0000)]
MFC r319852:

Fix buffer lengths.

After r319369, the RPC code validates caller supplied buffer length in
taddr2uaddr.  When no -h is specified, the sizeof(ai_addr) is used,
which is always smaller than the required size and therefore uaddr
would be NULL, causing the kernel to copyin() from userland NULL
and fail with EFAULT.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319966 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318995
alc [Thu, 15 Jun 2017 03:58:23 +0000 (03:58 +0000)]
MFC r318995
  In r118390, the swap pager's approach to striping swap allocation over
  multiple devices was changed.  However, swapoff_one() was not fully and
  correctly converted.  In particular, with r118390's introduction of a per-
  device blist, the maximum swap block size, "dmmax", became irrelevant to
  swapoff_one()'s operation.  Moreover, swapoff_one() was performing out-of-
  range operations on the per-device blist that were silently ignored by
  blist_fill().

  This change corrects both of these problems with swapoff_one(), which will
  allow us to potentially increase MAX_PAGEOUT_CLUSTER.  Previously,
  swapoff_one() would panic inside of blist_fill() if you increased
  MAX_PAGEOUT_CLUSTER.

MFC r319001
  After r118390, the variable "dmmax" was neither the correct strip size
  nor the correct maximum block size.  Moreover, after r318995, it serves
  no purpose except to provide information to user space through a read-
  sysctl.

  This change eliminates the variable "dmmax" but retains the sysctl.  It
  also corrects the value returned by the sysctl.

MFC r319604
  Halve the memory being internally allocated by the blist allocator.  In
  short, half of the memory that is allocated to implement the radix tree is
  wasted because we did not change "u_daddr_t" to be a 64-bit unsigned int
  when we changed "daddr_t" to be a 64-bit (signed) int.  (See r96849 and
  r96851.)

MFC r319612
  When the function blist_fill() was added to the kernel in r107913, the swap
  pager used a different scheme for striping the allocation of swap space
  across multiple devices.  And, although blist_fill() was intended to support
  fill operations with large counts, the old striping scheme never performed a
  fill larger than the stripe size.  Consequently, the misplacement of a
  sanity check in blst_meta_fill() went undetected.  Now, moving forward in
  time to r118390, a new scheme for striping was introduced that maintained a
  blist allocator per device, but as noted in r318995, swapoff_one() was not
  fully and correctly converted to the new scheme.  This change completes what
  was started in r318995 by fixing the underlying bug in blst_meta_fill() that
  stops swapoff_one() from simply performing a single blist_fill() operation.

MFC r319627
  Starting in r118390, swaponsomething() began to reserve the blocks at the
  beginning of a swap area for a disk label.  However, neither r118390 nor
  r118544, which increased the reservation from one to two blocks, correctly
  accounted for these blocks when updating the variable "swap_pager_avail".
  This change corrects that error.

MFC r319655
  Originally, this file could be compiled as a user-space application for
  testing purposes.  However, over the years, various changes to the kernel
  have broken this feature.  This revision applies some fixes to get user-
  space compilation working again.  There are no changes in this revision
  to code that is used by the kernel.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319965 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC: 319690
dexuan [Wed, 14 Jun 2017 13:23:40 +0000 (13:23 +0000)]
MFC: 319690

r319690
hyperv/pcib: use the device serial number as PCI domain

Currently the PCI domain is initialized with the instance GUID in
vmbus_pcib_attach(). It turns out the GUID can change across VM reboot,
while some users want a persistent value for PCI domain. The solution is
that we can change to use the device serial number, which starts with 1
and is unique within a VM.

Obtained from: Haiyang Zhang
Sponsored by: Microsoft

git-svn-id: svn://svn.freebsd.org/base/stable/10@319941 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r313021, r319621:
gjb [Thu, 8 Jun 2017 16:04:13 +0000 (16:04 +0000)]
MFC r313021, r319621:

 r313021 (brd):
  Force a few variables to be uppercase when they are evaluated.

 r319621:
  Ensure ${_CW} is uppercase when passing '-c' to mk-vmimage.sh,
  otherwise with 'CLOUDWARE=vagrant-virtualbox', the path to the
  configuration file may be incorrect.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319701 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318780:
kib [Wed, 7 Jun 2017 11:43:36 +0000 (11:43 +0000)]
MFC r318780:
Use __BSD_VISIBLE test instead checking for absense of _POSIX_SOURCE.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319653 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318781:
kib [Wed, 7 Jun 2017 11:42:43 +0000 (11:42 +0000)]
MFC r318781:
Add BIT_OR2(), BIT_AND2(), BIT_NAND2(), BIT_XOR() and BIT_XOR2().

git-svn-id: svn://svn.freebsd.org/base/stable/10@319652 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318998:
cy [Tue, 6 Jun 2017 19:21:35 +0000 (19:21 +0000)]
MFC r318998:

Fix return value of ip_sync_nat. Previously, regardless of error it
always returned a return code of 0.

Obtained from: NetBSD ip_sync.c r1.5

git-svn-id: svn://svn.freebsd.org/base/stable/10@319633 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoWork around a gcc 4.2 bug on powerpc architectures, where using
dim [Tue, 6 Jun 2017 18:40:14 +0000 (18:40 +0000)]
Work around a gcc 4.2 bug on powerpc architectures, where using
-fdata-sections can cause bogus "section type conflict" errors.  See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33168 for more information.

Since the upstream fixes are under GPLv3 and non-trivial, just disable
using function and data sections, at the cost of a slightly larger
executable.

Direct commit to stable/10, since the version of clang in head and
stable/11 cannot be built by gcc 4.2 at all.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319631 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318943 (avg):
gjb [Tue, 6 Jun 2017 14:46:45 +0000 (14:46 +0000)]
MFC r318943 (avg):

 MFV r318942: 8166 zpool scrub thinks it repaired offline device

 https://www.illumos.org/issues/8166
  If we do a scrub while a leaf device is offline (via "zpool offline"),
  we will inadvertently clear the DTL (dirty time log) of the offline
  device, even though it is still damaged. When the device comes back
  online, we will incompletely resilver it, thinking that the scrub
  repaired blocks written before the scrub was started. The incomplete
  resilver can lead to data loss if there is a subsequent failure of a
  different leaf device.
  The fix is to never clear the DTL of offline devices. Note that if a
  device is onlined while a scrub is in progress, the scrub will be
  restarted.
  The problem can be worked around by running "zpool scrub" after
  "zpool online".
  See also https://github.com/zfsonlinux/zfs/issues/5806

PR: 219537
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319625 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319369:
delphij [Tue, 6 Jun 2017 07:22:26 +0000 (07:22 +0000)]
MFC r319369:

 * limit size of buffers to RPC_MAXDATASIZE
 * don't leak memory
 * be more picky about bad parameters

From:

https://raw.githubusercontent.com/guidovranken/rpcbomb/master/libtirpc_patch.txt
https://github.com/guidovranken/rpcbomb/blob/master/rpcbind_patch.txt

via NetBSD.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319615 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r319390, cxgbetool(8) addition.
gjb [Mon, 5 Jun 2017 18:54:53 +0000 (18:54 +0000)]
Document r319390, cxgbetool(8) addition.
Document r298427, truss(1) '-H' flag.
Document r304017, ptrace(2) threaded process debugging improvements.
Document r306533, devctl(8) 'clear driver' added.
Document r309560, cxgbe(4) T6 support.
Document r309447, cxgbe(4) VF support for T4/T5 cards.
Document r309560, cxgbe(4) VF support for T6 cards.
Document r308154, cxgbe(4) additional virtual interface support.
Document r306520, PCI passthrough/bhyve improvements.
Document r306472, PCI passthrough/bhyve improvements.

Submitted by: jhb
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319606 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319413:
hselasky [Sun, 4 Jun 2017 08:47:09 +0000 (08:47 +0000)]
MFC r319413:
Free hardware queue resource after port is stopped in the mlx4en(4)
driver. Else if the port is up the resource might still be busy and
the MTT free will fail.

PR: 216493
Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@319567 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319414:
hselasky [Sun, 4 Jun 2017 08:29:17 +0000 (08:29 +0000)]
MFC r319414:
Allow communication between functions on the same host when using the
mlx4en(4) driver in SRIOV mode.

Place a copy of the destination MAC address in the send WQE only under
SRIOV/eSwitch configuration or when the device is in selftest. This
allows communication between functions on the same host.

PR: 216493
Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@319564 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316503,r316504,r316505:
ngie [Sat, 3 Jun 2017 18:25:36 +0000 (18:25 +0000)]
MFC r316503,r316504,r316505:

r316503:

Clean up trailing whitespace

r316504:

Clean up more trailing whitespace in the licensing tort that
happened to be spaces, not tabs

r316505:

Don't assume NAME_MAX is 255

Query the filesystem limit via getconf(3) instead

git-svn-id: svn://svn.freebsd.org/base/stable/10@319550 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318974: uart: add AMT SOL PCI ID
emaste [Sat, 3 Jun 2017 02:47:30 +0000 (02:47 +0000)]
MFC r318974: uart: add AMT SOL PCI ID

I adjusted the description to be similar to existing AMT entries.

PR: 219384

git-svn-id: svn://svn.freebsd.org/base/stable/10@319511 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318211:
ngie [Fri, 2 Jun 2017 00:29:23 +0000 (00:29 +0000)]
MFC r318211:

Fix up previous commit

- Apply the logic to the FreeBSD block
- Fix a typo with the getconf(1) call that I would have caught, were
  it not for the fact that I got the blocks wrong.
- Consolidate the hardcoded buffer sizes to the NetBSD block.

This would have been discovered had I run the test on a system where
PATH_MAX != 1024 (I don't have that at my disposal right at this moment).

MFC with: r318210

git-svn-id: svn://svn.freebsd.org/base/stable/10@319484 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318210:
ngie [Fri, 2 Jun 2017 00:27:08 +0000 (00:27 +0000)]
MFC r318210:

ssp_test:read:: query the value of MAXPATHLEN via getconf(1)

In the event the value of PATH_MAX was changed, the assumption that
MAXPATHLEN is 1024 (and hence the buffer length required to trigger
SSP to fail for read(2)) would be invalidated. Query getconf(1) for
the actual value of MAXPATHLEN via _XOPEN_PATH_MAX instead, and
increment the value by 1 to ensure that the SSP support tests the
stack smashing support properly.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319483 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318676
davidcs [Thu, 1 Jun 2017 18:37:08 +0000 (18:37 +0000)]
MFC r318676
  Check for IPV6 TCP/UDP CSUM offload in pkt header during transmits.

Submitted by:Shminderjit.Singh@cavium.com

git-svn-id: svn://svn.freebsd.org/base/stable/10@319451 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318895: Fix several problems with mapping code in mps(4).
slm [Thu, 1 Jun 2017 16:54:10 +0000 (16:54 +0000)]
MFC r318895: Fix several problems with mapping code in mps(4).
MFC r318896: Fix several problems with mapping code in mpr(4).

-Add several comments describing what the mapping code is doing.
-Added a callout timer to improve check for missing devices when discovery has
 completed so that missing counts are incremented correctly.
-Fix problems with missing counts not being saved to the HBA.
-Update man pages mps(4) and mpr(4) to include a description of the use
 use_phy_num sysctl variable.
-Remove channel field in the mapping structure because it's not used.
-Improve logging by using mps_dprint or mpr_dprint instead of printf and adding
 more logging where appropriate.
-Add check for a bad index before writing mapping entries to controller.
-The high missing count check in the mapping table was using the incorrect
 initial value, which could lead to a bad result.
-The usage of the IN_USE flag for volume mapping was changed to be more
 intuitive, and was not being used correctly.
-The check for a free DPM entry was changed, as this was completely wrong.
-Updates to the missing count for volumes were not being done correctly, so this
 function was completely rewritten.
-_mapping_add_to_removal_table() was overly complicated and incorrectly used, so
 this function was rewritten.
-Missing counts for all devices were not being incremented properly, so this
 functionality was added.
-The search for space in the mapping table for missing enclosures was not
 calculating the found space correctly due to not breaking out of a loop when
 required, and the num_found variable was not being reset when needed.
-Retries when a device fails to get added due to a full mapping table were
 removed because this is unneccessary.
-mps_mapping_is_reinit_required() and mpr_mapping_is_reinit_required() were
 removed because they were not being used.
-Some functions were renamed to avoid confusion between Target IDs and SAS IDs.
-_mapping_check_update_ir_mt_idx() was removed because it was overly
 complicating volume mapping.
-The setting of the maxtargets variable was changed to include max volumes.
-The setting of the initiator_id variable was changed to be the invalid target
 ID after all targets, including volumes. Previously, this was set to the last
 valid target ID.
-Don't exclude target IDs of RAID components or check for a reuse of a target ID
 for RAID components.
-Some endienness was added.

Approved by: ken, mav

git-svn-id: svn://svn.freebsd.org/base/stable/10@319445 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r319436, mpr(4) tri-mode support.
gjb [Thu, 1 Jun 2017 15:58:21 +0000 (15:58 +0000)]
Document r319436, mpr(4) tri-mode support.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319441 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r286567, r286568, r289426, r289429, r295113, r295286, r299367, r299369,
slm [Thu, 1 Jun 2017 15:43:24 +0000 (15:43 +0000)]
MFC r286567, r286568, r289426, r289429, r295113, r295286, r299367, r299369,
    r308217, r308301, r311958, r312437, r318188, r318427, r318679

r286567:
Remove some unused code.

Obtained from: Netflix, Inx.

r286568:
Remove mps_request_polled(), it's redundant to mps_wait_command()

Obtained from: Netflix, Inc.

r289426:
Remove _FreeBSD_version check for something that was only an issue with
9-CURRENT.

Obtained from:  Netlfix, Inc
MFC after:      3 days

r289429:
Revert an extra hunk that crept into the last commit.

Submitted by: emax
Obtained from: Netflix, Inc.
MFC after: 3 days

r295113:
Clean up unused-but-set-variable spotted by gcc-4.9.

Reviewed by: mav, slm
Approved by: rodrigc (mentor)
MFC after: 2 weeks
Sponsored by: gandi.net

r295286:
Add sysctls for dumping out the device mapping tables.  I'm finding this
useful for debugging device-target translation bugs.

MFC after: 3 days
Sponsored by: Netflix

r299367:
Remove NULL checks after M_WAITOK allocations from mps(4).

Reviewed by: asomers@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6296

r299369:
Remove NULL checks after M_WAITOK allocations from mpr(4).

Reviewed by: asomers@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6297

r308217:
Add a fallback to the device mapper logic.  We've seen systems in the field
that are apparently misconfigured by the manufacturer and cause the mapping
logic to fail.  The fallback allows drive numbers to be assigned based on the
PHY number that they're attached to.  Add sysctls and tunables to overrid
this new behavior, but they should be considered only necessary for debugging.

Reviewed by:  imp, smh
Obtained from: Netflix
MFC after: 3 days
Sponsored by: D8403

r308301:
Record the LogInfo field when reporting the IOCStatus.  Helps in
debugging errors.

Submitted by: slm
Obtained from: Netflix
MFC after: 3 days

r311958:
Print out the number of queues/MSIx vectors.

Sponsored by: Netflix

r312437:
Rework the debug print API. Event printing no longer gets special handling.
All of the printing from the tables file now has wrappers so that the
handling is cleaner and it's possible to print something out (say, during
development) without having to fight the global debug flags. This re-org
will also make it easier to have the tables be compiled out at build time
if desired.

Other than fixing some minor bugs, there are no user-visible changes from
this change

Sponsored by: Netflix, Inc.
Differential Revision: D9238

r318188:
Improve error messages during command timeout for the mpr and mps
drivers.

Sponsored by: Netflix

r318427:
Add tri-mode support (SAS/SATA/PCIe).

This includes NVMe device support and adds support for the following adapters:
    SAS 3408
    SAS 3416
    SAS 3508
    SAS 3516
    SAS 3616
    SAS 3708
    SAS 3716

Reviewed by:    ken, scottl, asomers, mav
Approved by: ken, scottl, mav
MFC after:      2 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D10095

r318679:
Fix powerpc compiler error.

Approved by: ken

git-svn-id: svn://svn.freebsd.org/base/stable/10@319436 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318832: MFV r316923: 8026 retire zfs_throttle_delay and zfs_throttle_resolution
avg [Thu, 1 Jun 2017 14:07:40 +0000 (14:07 +0000)]
MFC r318832: MFV r316923: 8026 retire zfs_throttle_delay and zfs_throttle_resolution

git-svn-id: svn://svn.freebsd.org/base/stable/10@319423 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318830: MFV r316921: 8027 tighten up dsl_pool_dirty_delta
avg [Thu, 1 Jun 2017 14:05:54 +0000 (14:05 +0000)]
MFC r318830: MFV r316921: 8027 tighten up dsl_pool_dirty_delta

git-svn-id: svn://svn.freebsd.org/base/stable/10@319421 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318450:
kib [Thu, 1 Jun 2017 13:22:04 +0000 (13:22 +0000)]
MFC r318450:
Add tests for some cases in r318298.

PR: 219154

git-svn-id: svn://svn.freebsd.org/base/stable/10@319419 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319096: zfs_lookup: fix bogus arguments to lookup of "snapshot" directory
avg [Thu, 1 Jun 2017 11:48:01 +0000 (11:48 +0000)]
MFC r319096: zfs_lookup: fix bogus arguments to lookup of "snapshot" directory

git-svn-id: svn://svn.freebsd.org/base/stable/10@319416 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoRegenerate src.conf(5)
ngie [Thu, 1 Jun 2017 07:10:40 +0000 (07:10 +0000)]
Regenerate src.conf(5)

git-svn-id: svn://svn.freebsd.org/base/stable/10@319391 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r314579,r314785:
ngie [Thu, 1 Jun 2017 07:08:26 +0000 (07:08 +0000)]
MFC r314579,r314785:

r314579 (by np):

Add cxgbetool(8) to the base system.

Move cxgbetool from tools/tools to usr.sbin. Compile and install it on
platforms where cxgbe(4) is built by default.  Knobs (WITH_CXGBETOOL and
WITHOUT_CXGBETOOL) have been added so that the user can override the
default setting.

r314785:

Fix some trivial manlint warnings

Sentences should begin on new lines, per manlint.

Bump .Dd for the change

git-svn-id: svn://svn.freebsd.org/base/stable/10@319390 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318437:
ngie [Thu, 1 Jun 2017 06:42:20 +0000 (06:42 +0000)]
MFC r318437:

Revert local changes to find_progenv accidentally committed in r318436

MFC with: r318436

git-svn-id: svn://svn.freebsd.org/base/stable/10@319386 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318436:
ngie [Thu, 1 Jun 2017 06:41:27 +0000 (06:41 +0000)]
MFC r318436:

usr.bin/getconf: add some initial tests

Items tested via this commit are:
- Some basic POSIX constants.
- Some valid programming environments with -v.
- Some invalid programming environments via -v.

NOTE: this test makes assumptions about ILP32/LP32 vs LP64 that are
currently not true on all architectures to avoid hardcoding some
architectures in the tests. I'm working on improving getconf(1) to be
more sane about handling ILP32/LP32 vs LP64. Future commits are coming
soon to address this.

Tested with: amd64, i386

git-svn-id: svn://svn.freebsd.org/base/stable/10@319385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318434:
ngie [Thu, 1 Jun 2017 06:39:55 +0000 (06:39 +0000)]
MFC r318434:

Make the `.gperf.c` suffix rule depend on fake-gperf.awk

Parameterize out fake-gperf.awk to avoid duplicating the path

git-svn-id: svn://svn.freebsd.org/base/stable/10@319382 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318177:
ngie [Thu, 1 Jun 2017 06:37:53 +0000 (06:37 +0000)]
MFC r318177:

Unconditionally install udp(4) and udplite(4) again

I added this to the MK_USB != no block in error in r278202.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319381 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319157:
ngie [Thu, 1 Jun 2017 06:35:40 +0000 (06:35 +0000)]
MFC r319157:

fma_test: mute a warning about unreachable code on amd64 by restructuring
the #ifdef block to only handle the rest of the logic in the loop in the
#else case.

CID: 1346844

git-svn-id: svn://svn.freebsd.org/base/stable/10@319379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319158:
ngie [Thu, 1 Jun 2017 06:34:14 +0000 (06:34 +0000)]
MFC r319158:

logarithm_test: assert that feclearexcept succeeds

This helps ensure that test preconditons are fulfilled.

CID: 1346572

git-svn-id: svn://svn.freebsd.org/base/stable/10@319376 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318179:
ngie [Thu, 1 Jun 2017 06:31:25 +0000 (06:31 +0000)]
MFC r318179:

procstat(1): also reference icmp(4) and sctp(4)

This was missed in the previous commit by accident.

MFC with: r318178

git-svn-id: svn://svn.freebsd.org/base/stable/10@319375 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318175:
ngie [Thu, 1 Jun 2017 06:30:22 +0000 (06:30 +0000)]
MFC r318175:

procstat(1): clarify the Signal Disposition section

- Fix a typo (SIGIGN -> SIG_IGN). Use .Dv when referencing SIG_IGN.
- Use semi-colons as soft breaks when separating sentences for
  the FLAGS section.
- Tweak wording for C slightly to flow better and to be a bit
  more technically correct (signals with handlers installed will
  be caught by the target program).
- Reference signal(3) in the SEE ALSO section.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319374 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318178:
ngie [Thu, 1 Jun 2017 06:27:15 +0000 (06:27 +0000)]
MFC r318178:

procstat(1): document all possible `PRO` (network protocol) values

Reference the appropriate section 4 manpages for networking
protocols.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319373 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319156,r319159:
ngie [Thu, 1 Jun 2017 06:16:57 +0000 (06:16 +0000)]
MFC r319156,r319159:

r319156:

:nvlist_unpack__duplicate_key : check the result of nvlist_pack(3)

This fixes a potential NULL pointer dereference.

CID: 1362051

r319159:

:dnvlist_get_string__default_value: fix a bogus string comparison test

Check actual_value vs "5", not "5" vs itself.

CID: 1362021

git-svn-id: svn://svn.freebsd.org/base/stable/10@319370 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoBump copyright years after previous commit.
gjb [Wed, 31 May 2017 17:42:07 +0000 (17:42 +0000)]
Bump copyright years after previous commit.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319348 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoWhitespace fixes to conform to FDP style.
gjb [Wed, 31 May 2017 17:42:06 +0000 (17:42 +0000)]
Whitespace fixes to conform to FDP style.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319347 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r318675, fix the client side krpc from doing TCP
gjb [Wed, 31 May 2017 17:42:05 +0000 (17:42 +0000)]
Document r318675, fix the client side krpc from doing TCP
reconnects for ERESTART from sosend().

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319346 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r309258, max_align_t for C11 compliance.
gjb [Wed, 31 May 2017 17:42:04 +0000 (17:42 +0000)]
Document r309258, max_align_t for C11 compliance.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319345 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318593:
asomers [Wed, 31 May 2017 17:20:55 +0000 (17:20 +0000)]
MFC r318593:

Fix build of AIO tests with -DDEBUG

Also, redefine some constants for clarity.  No functional change.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319344 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r313558, garbage IP addresses in UDP log_in_vain messages
gjb [Wed, 31 May 2017 13:44:54 +0000 (13:44 +0000)]
Document r313558, garbage IP addresses in UDP log_in_vain messages
fix.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319335 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r316040, kvm_close(3) return error fix.
gjb [Wed, 31 May 2017 13:44:53 +0000 (13:44 +0000)]
Document r316040, kvm_close(3) return error fix.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319334 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r317375, RTT used for receive buffer auto resizing.
gjb [Wed, 31 May 2017 13:44:53 +0000 (13:44 +0000)]
Document r317375, RTT used for receive buffer auto resizing.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319333 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r319243, rpcbind(8) warmstart support knob.
gjb [Wed, 31 May 2017 13:33:15 +0000 (13:33 +0000)]
Document r319243, rpcbind(8) warmstart support knob.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319332 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r319270, cxgbe(4) firmware update.
gjb [Wed, 31 May 2017 13:33:14 +0000 (13:33 +0000)]
Document r319270, cxgbe(4) firmware update.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319331 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r317434, ipf(4) 'keep frags' no longer implicit with
gjb [Wed, 31 May 2017 13:33:13 +0000 (13:33 +0000)]
Document r317434, ipf(4) 'keep frags' no longer implicit with
'keep state'

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319330 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r308915, zfsbootcfg(8).
gjb [Wed, 31 May 2017 13:33:13 +0000 (13:33 +0000)]
Document r308915, zfsbootcfg(8).

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319329 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r316046, WITHOUT_LIBTHR properly removes optional files.
gjb [Wed, 31 May 2017 13:33:12 +0000 (13:33 +0000)]
Document r316046, WITHOUT_LIBTHR properly removes optional files.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319328 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r313206, inetd(8) buildable without libwrap(3).
gjb [Wed, 31 May 2017 13:33:11 +0000 (13:33 +0000)]
Document r313206, inetd(8) buildable without libwrap(3).

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319327 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r309340, GARP retransmit capability.
gjb [Wed, 31 May 2017 13:33:10 +0000 (13:33 +0000)]
Document r309340, GARP retransmit capability.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319326 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r312359, r314019: alc(4) Killer E2400/E2500 support.
gjb [Wed, 31 May 2017 13:33:09 +0000 (13:33 +0000)]
Document r312359, r314019: alc(4) Killer E2400/E2500 support.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319325 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r311507, cxgbe(4) firmware 1.16.26.0.
gjb [Wed, 31 May 2017 13:33:08 +0000 (13:33 +0000)]
Document r311507, cxgbe(4) firmware 1.16.26.0.
Document r316485, qlnx(4) addition.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319324 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319086:
kib [Wed, 31 May 2017 09:25:47 +0000 (09:25 +0000)]
MFC r319086:
Mention that the basep argument to getdirentries(2) can be NULL.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319311 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r317632:
ngie [Wed, 31 May 2017 08:47:09 +0000 (08:47 +0000)]
MFC r317632:

Fix "make cscope-clean" when .OBJDIR already exists

The cscope generated files are always put in .CURDIR .

git-svn-id: svn://svn.freebsd.org/base/stable/10@319309 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316742:
ngie [Wed, 31 May 2017 08:43:45 +0000 (08:43 +0000)]
MFC r316742:

Clarify units for mediasize and sectorsize in DoFile(..)

They're byte quantities.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319306 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316740:
ngie [Wed, 31 May 2017 08:42:44 +0000 (08:42 +0000)]
MFC r316740:

Clarify `minfree` warning message in check_space(..)

- State that the units are kB.
- Be more complete/concise in terms of what is required (in this case
  `minfree` must be at least `X`kB)

git-svn-id: svn://svn.freebsd.org/base/stable/10@319305 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r317311,r317312,r319019:
ngie [Wed, 31 May 2017 08:40:46 +0000 (08:40 +0000)]
MFC r317311,r317312,r319019:

r317311:

Check for failures from getpagesize(3)

Return errno on failure, similar to the open(2) call above it.

CID: 1193753

r317312:

Fix type for `pagesize` to match the return type for getpagesize(3)
to fix the build

Pointyhat to: ngie

r319019:

Remove getpagesize(3) error checking added in r317312

getpagesize(3) no longer fails as of r317436.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319303 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319056,r319058,r319059,r319060,r319061,r319078:
ngie [Wed, 31 May 2017 08:36:47 +0000 (08:36 +0000)]
MFC r319056,r319058,r319059,r319060,r319061,r319078:

r319056:

tests/sys/file/ftruncate_test: use an exit code of 1 instead
of -1 with err*(3).

An exit code of -1 is implementation defined -- it's best to stick
with something well-defined (1).

r319058:

Create a deterministic file in the kyua sandbox, instead of a
temporary file outside the kyua sandbox

This helps ensure that the file is removed at test exit, and as
a side effect, cures a warning about umasks with Coverity.

r319059:

Use an exit code of 1 instead of -1 for reasons noted in r319056

r319060:

Use main(void) instead of main(argc __unused, argv __unused)

r319061:

Don't leak accept_fd on thread completion

CID: 1296068

r319078:

Tweak r319058 slightly

- Specify an explicit mode when using O_CREAT per open(2).
- Fix the error message (add missing enclosing parentheses).

MFC with: r319058

git-svn-id: svn://svn.freebsd.org/base/stable/10@319301 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319027,r319028,r319029,r319030,r319031,r319033,r319034,r319035,r319036,r319037...
ngie [Wed, 31 May 2017 08:30:37 +0000 (08:30 +0000)]
MFC r319027,r319028,r319029,r319030,r319031,r319033,r319034,r319035,r319036,r319037,r319038,r319039,r319040,r319041,r319042,r319043,r319044,r319045,r319046:

r319027:

lib/libc/tests/nss: use calloc appropriately

The pattern used prior to this commit was `calloc(1, n * sizeof(type))`;
the pattern that should be used however is `calloc(n, sizeof(type))`.

r319028:

Sort make variables to suit style.Makefile(5)

This is being done prior to functional changes.

r319029:

Staticize functions and remove unused variables to aid with bumping WARNS

r319030:

Fix -Wsign-compare warnings

r319031:

getusershell_test: staticize run_tests(..) to fix warnings

r319033:

getserv_test: fix -Wsign-compare and -Wmissing-prototypes warnings

r319034:

getaddrinfo_test: fix -Wsign-compare warnings

r319035:

getrpc_test: fix -Wmissing-prototypes and -Wsign-compare warnings

r319036:

getproto_test: fix -Wmissing-prototypes and -Wsign-compare warnings

r319037:

getaddrinfo_test: mark unused function parameters __unused to fix -Wunused
warnings

r319038:

getusershell_test: mark mdata parameter in compare_usershell __unused

r319039:

getserv_test: mark unused parameters __unused to fix corresponding
warnings

r319040:

getrpc_test: fix -Wunused warnings

- Mark unused function parameters unused.
- Remove an unused function prototype.

r319041:

getproto_test: fix -Wunused warnings

Mark unused parameters __unused in functions.

r319042:

gethostby_test: fix multiple warning types

- Fix -Wmissing-declaration warning by staticizing run_tests.
- Fix -Wsign-compare warnings by casting size_t types to int
  for comparisons.

Reindent some of the code in sdump_hostent(..) to accomodate the
overall changes.

r319043:

getpw_test: fix -Wunused warnings

- Mark unused parameters __unused.
- Put dump_passwd under DEBUG as it's only used in that case.

r319044:

getgr_test: fix -Wunused warnings

r319045:

Fix -Wunused and -Wshadow warnings

r319046:

Fix a -Wunused-but-set-variable warning reported by gcc 6.3.0

git-svn-id: svn://svn.freebsd.org/base/stable/10@319298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318514-r318515, r318517, r318917
delphij [Wed, 31 May 2017 06:26:37 +0000 (06:26 +0000)]
MFC r318514-r318515, r318517, r318917

r318514:
Use size_t.

Inspired by: OpenBSD src/lib/libc/stdlib/qsort.c,v 1.11

r318515:
The current qsort(3) implementation ignores the sizes of partitions, and
always perform recursion on the left partition, then use a tail call to
handle the right partition.  In the worst case this could require O(N)
levels of recursions.

Reduce the possible recursion level to log2(N) by always recursing on the
smaller partition instead.

Obtained from: PostgreSQL 9d6077abf9d6efd992a59f05ef5aba981ea32096

r318517:
Sync qsort.c with userland r318515.

(Note that MIN macro is removed in favor of sys/param.h's version).

PR: 213922

r318917:
Disconnect heimdal version of qsort.c from build because we are already
using libc's version of qsort.

PR: bin/213922

git-svn-id: svn://svn.freebsd.org/base/stable/10@319291 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoPartial MFC r288030 (rodrigc):
delphij [Wed, 31 May 2017 06:19:12 +0000 (06:19 +0000)]
Partial MFC r288030 (rodrigc):

Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319290 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r279663,r279666 (pfg):
delphij [Wed, 31 May 2017 06:13:33 +0000 (06:13 +0000)]
MFC r279663,r279666 (pfg):

r279663:

qsort(3): enhance to handle 32-bit aligned data on 64-bit systems

Implement a small enhancement to the original qsort implementation:
If the data is 32 bit aligned we can side-step the long type
version and use int instead.

The change brings a modest but significant improvement in
32 bit workloads.

r279666:

qsort(3): small style(9) cleanups.

Basically spaces vs. tabs.
No functional change.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319289 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316649:
delphij [Wed, 31 May 2017 06:08:11 +0000 (06:08 +0000)]
MFC r316649:

Add missing double quote to fix r316635 commit.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319288 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r311989 (cem):
delphij [Wed, 31 May 2017 06:00:14 +0000 (06:00 +0000)]
MFC r311989 (cem):

libkern: Remove obsolete 'register' keyword

git-svn-id: svn://svn.freebsd.org/base/stable/10@319286 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316635:
delphij [Wed, 31 May 2017 05:38:57 +0000 (05:38 +0000)]
MFC r316635:

Enable 16-bit longest_match for x86.

This gives a ~2% improvement in compression tests.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319283 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r313327:
delphij [Wed, 31 May 2017 05:33:32 +0000 (05:33 +0000)]
MFC r313327:

Reflect actual NetBSD revision we already have.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r315272, r315370
delphij [Wed, 31 May 2017 05:11:28 +0000 (05:11 +0000)]
MFC r315272, r315370

r315272:
Implement INHERIT_ZERO for minherit(2).

INHERIT_ZERO is an OpenBSD feature.

When a page is marked as such, it would be zeroed
upon fork().

This would be used in new arc4random(3) functions.

PR: 182610
Reviewed by: kib (earlier version)
Differential Revision: https://reviews.freebsd.org/D427

r315370:
The adj_free and max_free values of new_entry will be calculated and
assigned by subsequent vm_map_entry_link(), therefore, remove the
pointless copying.

Submitted by: alc

git-svn-id: svn://svn.freebsd.org/base/stable/10@319278 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318774:
np [Wed, 31 May 2017 00:43:52 +0000 (00:43 +0000)]
MFC r318774:

cxgbe/iw_cxgbe: sodisconnect failures are harmless and should not be
treated as fatal errors.

Sponsored by: Chelsio Communications

git-svn-id: svn://svn.freebsd.org/base/stable/10@319272 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318762:
np [Wed, 31 May 2017 00:16:43 +0000 (00:16 +0000)]
MFC r318762:

cxgbe(4): Update the T4, T5, and T6 firmwares to 1.16.45.0.

The latest firmware has a number of link related fixes, support for a
new custom card, and the fix for a bug that affected rate limiting on
FreeBSD.

Relnotes: Yes
Sponsored by: Chelsio Communications

git-svn-id: svn://svn.freebsd.org/base/stable/10@319270 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318189:
asomers [Tue, 30 May 2017 22:54:52 +0000 (22:54 +0000)]
MFC r318189:

vdev_geom may associate multiple vdevs per g_consumer

vdev_geom.c currently uses the g_consumer's private field to point to a
vdev_t. That way, a GEOM event can cause a change to a ZFS vdev. For
example, when you remove a disk, the vdev's status will change to REMOVED.
However, vdev_geom will sometimes attach multiple vdevs to the same GEOM
consumer. If this happens, then geom events will only be propagated to one
of the vdevs.

Fix this by storing a linked list of vdevs in g_consumer's private field.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

* g_consumer.private now stores a linked list of vdev pointers associated
  with the consumer instead of just a single vdev pointer.

* Change vdev_geom_set_physpath's signature to more closely match
  vdev_geom_set_rotation_rate

* Don't bother calling g_access in vdev_geom_set_physpath. It's guaranteed
  that we've already accessed the consumer by the time we get here.

* Don't call vdev_geom_set_physpath in vdev_geom_attach. Instead, call it
  in vdev_geom_open, after we know that the open has succeeded.

PR: 218634
Reviewed by: gibbs
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10391

git-svn-id: svn://svn.freebsd.org/base/stable/10@319268 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318141, r318143-r318144
asomers [Tue, 30 May 2017 22:48:17 +0000 (22:48 +0000)]
MFC r318141, r318143-r318144

r318141:
strcpy => strlcpy

Reported by: Coverity
CID: 1352771
Sponsored by: Spectra Logic Corp

r318143:
strcpy => strlcpy

Reported by: Coverity
CID: 1006715
Sponsored by: Spectra Logic Corp

r318144:
Don't depend on assert(3) getting evaluated

Reported by: imp
X-MFC-With: 318141, 318143
Sponsored by: Spectra Logic Corp

git-svn-id: svn://svn.freebsd.org/base/stable/10@319267 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r317759:
asomers [Tue, 30 May 2017 22:46:00 +0000 (22:46 +0000)]
MFC r317759:

Fix memory leaks in camcontrol

Reported by: Coverity
CID: 13316741331675
Reviewed by: ken
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10588

git-svn-id: svn://svn.freebsd.org/base/stable/10@319266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r317755, r317758
asomers [Tue, 30 May 2017 22:45:01 +0000 (22:45 +0000)]
MFC r317755, r317758

r317755:
Various Coverity fixes in ifconfig(8)

* Exit early if kldload(2) fails (1011259). This is the only change that
  affects ifconfig's behavior.
* Close memory and resource leaks (130562413052051007100)
* Mark usage() as _Noreturn (13058061305750)
* Fix some dereference after null checks (1011474, 270774)

Reported by: Coverity
CID: 130562413052051007100130580613057501011474,
CID: 270774, 1011259
Reviewed by: cem
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10587

r317758:
Unbreak ifconfig for mlx4en(4) after r317755

ifconfig doesn't correctly infer mlx interfaces' module names, so it will
attempt to load the mlx(4) module even when not necessary.

Reported by: rstone
X-MFC-With: 317755
Sponsored by: Spectra Logic Corp

git-svn-id: svn://svn.freebsd.org/base/stable/10@319265 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r317715:
asomers [Tue, 30 May 2017 22:44:05 +0000 (22:44 +0000)]
MFC r317715:

ifconfig displays ND6_IFF_NO_DAD as "IGNORELOOP"

PR: 218958
Reviewed by: kristof
Differential Revision: https://reviews.freebsd.org/D10543

git-svn-id: svn://svn.freebsd.org/base/stable/10@319264 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316856:
asomers [Tue, 30 May 2017 22:43:08 +0000 (22:43 +0000)]
MFC r316856:

MFV 316855

7900 zdb shouldn't print the path of a znode at verbosity < 5

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Alan Somers <asomers@freebsd.org>

illumos/illumos-gate@e548d2fa41d1baa06662ed9abbb8bcec86e27dd9
https://www.illumos.org/issues/7900

Sponsored by: Spectra Logic Corp

git-svn-id: svn://svn.freebsd.org/base/stable/10@319263 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316760:
asomers [Tue, 30 May 2017 22:41:19 +0000 (22:41 +0000)]
MFC r316760:

Fix vdev_geom_attach_by_guids for partitioned disks

When opening a vdev whose path is unknown, vdev_geom must find a geom
provider with a label whose guids match the desired vdev. However, due to
partitioning, it is possible that two non-synonomous providers will share
some labels. For example, if the first partition starts at the beginning of
the drive, then ada0 and ada0p1 will share the first label. More troubling,
if the last partition runs to the end of the drive, then ada0p3 and ada0
will share the last label. If vdev_geom opens ada0 when it should've opened
ada0p3, then the pool won't be readable. If it opens ada0 when it should've
opened ada0p1, then it will corrupt some other partition when it writes the
3rd and 4th labels.

The easiest way to reproduce this problem is to install a mirrored root pool
with the default partition layout, then swap the positions of the two boot
drives and reboot.  Whether the bug manifests depends on the order in which
geom lists its providers, which is arbitrary.

Fix this situation by modifying the search algorithm to prefer geom
providers that have all four labels intact. If no such provider exists, then
open whichever provider has the most.

Reviewed by: mav
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10365

git-svn-id: svn://svn.freebsd.org/base/stable/10@319262 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316611:
asomers [Tue, 30 May 2017 22:36:24 +0000 (22:36 +0000)]
MFC r316611:

sbin/mount: strcpy -> strlcpy

Reported by: Coverity
CID: 10111731011174
Sponsored by: Spectra Logic Corp

git-svn-id: svn://svn.freebsd.org/base/stable/10@319261 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316610:
asomers [Tue, 30 May 2017 22:35:36 +0000 (22:35 +0000)]
MFC r316610:

usr.bin/netstat: strcpy -> strlcpy

Reported by: Coverity
CID: 10067411006744
Sponsored by: Spectra Logic Corp

git-svn-id: svn://svn.freebsd.org/base/stable/10@319260 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316548:
asomers [Tue, 30 May 2017 22:34:43 +0000 (22:34 +0000)]
MFC r316548:

Quiet 450.status-security when *_inline="YES"

Previously, 450.status-security would always set rc=3 in inline mode,
because it doesn't know whether "periodic security" is going to find
anything interesting. But this annoyingly results in daily reports that
simply say "Security check: \n\n-- End of daily output --".

This change fixes that by testing whether "periodic security" printed
anything, and setting 450.status-security's exit status to 3 if it did. An
alternative would be to change the exit status of periodic(8) to be the
worst of its scripts' exit statuses, but that would be a more intrusive
change.

Reviewed by: brian
Differential Revision: https://reviews.freebsd.org/D10267

git-svn-id: svn://svn.freebsd.org/base/stable/10@319259 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316535:
asomers [Tue, 30 May 2017 22:33:24 +0000 (22:33 +0000)]
MFC r316535:

Fix memory leak in "gpart bootcode"

Also, annotate that gpart_issue never returns

Reported by: Coverity
CID: 1007105
Sponsored by: Spectra Logic Corp

git-svn-id: svn://svn.freebsd.org/base/stable/10@319258 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316501, r316523
asomers [Tue, 30 May 2017 22:02:55 +0000 (22:02 +0000)]
MFC r316501, r316523

r316501:
Fix file descriptor and memory leaks in pr(1)

Also, hook NetBSD's pr test into the build, and add three more test cases.

Reported by: Coverity, Valgrind
CID: 271650 271651 271652 271653 271654 271655 271656 271656
CID: 271657 271658 271659 1006939 1006940 1006941 1006942 1009098
Reviewed by: ngie
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9137

r316523:
Remove a duplicate fclose() that snuck into r316501

Reported by: Coverity
CID: 1373338
X-MFC-With: 316501
Sponsored by: Spectra Logic Corp

git-svn-id: svn://svn.freebsd.org/base/stable/10@319257 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r316500 (except the part to usr.bin/fortune)
asomers [Tue, 30 May 2017 21:58:53 +0000 (21:58 +0000)]
MFC r316500 (except the part to usr.bin/fortune)

strcpy => strlcpy, strcat => strlcat

Reported by: Coverity
CID: 1006703 978863 1006745 1347163
Reviewed by: cem
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10192

git-svn-id: svn://svn.freebsd.org/base/stable/10@319256 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r314176 and r318973.
np [Tue, 30 May 2017 21:57:25 +0000 (21:57 +0000)]
MFC r314176 and r318973.

r314176:
Add support for RDMA from userspace with T6 cards.

r318973:
libcxgb4: Use memcpy instead of copying WRs 8B at a time in the userspace
RDMA library for cxgbe(4).

Sponsored by: Chelsio Communications

git-svn-id: svn://svn.freebsd.org/base/stable/10@319255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r315032-r315036, r315039, r315041
asomers [Tue, 30 May 2017 21:03:44 +0000 (21:03 +0000)]
MFC r315032-r315036, r315039, r315041

r315032:
Increase WARNS for iconv tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by: ngie
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933

r315033:
Increase WARNS for nss tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

r315034:
Document that the msun tests require WARNS=0

ATF tests have a default WARNS of 0, unlike other usermode programs.  This
change is technically a noop, but it documents that the msun tests don't
work with any warnings enabled, at least not on all architectures.

Reviewed by:  ngie
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

r315035:
Increase WARNS for libcrypt tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

r315036:
Increase WARNS for libmp tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

r315039:
Increase WARNS for libutil tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

r315041:
Increase WARNS for pw tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

git-svn-id: svn://svn.freebsd.org/base/stable/10@319252 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoRegenerate src.conf(5) after adding MK_RPCBIND_WARMSTART_SUPPORT
ngie [Tue, 30 May 2017 17:48:41 +0000 (17:48 +0000)]
Regenerate src.conf(5) after adding MK_RPCBIND_WARMSTART_SUPPORT

git-svn-id: svn://svn.freebsd.org/base/stable/10@319245 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r317168:
ngie [Tue, 30 May 2017 17:46:19 +0000 (17:46 +0000)]
MFC r317168:

Add a knob, WITH*_RPCBIND_WARMSTART_SUPPORT, to allow the end-user to build
rpcbind(8) with/without warmstart support.

The knob defaults to off to preserve POLA for the feature.

See rpcbind(8) for more details about the warmstart feature.

Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/stable/10@319243 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r317154,r317155,r317162,r317163,r317164:
ngie [Tue, 30 May 2017 17:42:48 +0000 (17:42 +0000)]
MFC r317154,r317155,r317162,r317163,r317164:

r317154:

Print out the signal number on exit in terminate(..) if WARMSTART is compiled
into rpcbind.

The signal number can provide helpful diagnostic info.

Obtained from: Isilon OneFS

r317155:

rpcbind(8): wordsmith -h description and mention -W in the SYNOPSIS section

-W was already documented in the OPTIONS section.

r317162:

rpcbind(8): add a description for /var/run/rpcbind.sock under the FILES section

r317163:

rpcbind(8): post-humously document -w (warmstart) support added in r74462

warmstart support saves portmap/rpcbind(8) registration state on exit and
restores the saved registration state on restart.

r317164:

Fix indentation per style.Makefile(5)

git-svn-id: svn://svn.freebsd.org/base/stable/10@319242 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoDocument r315433, libarchive 3.3.1.
gjb [Tue, 30 May 2017 16:46:25 +0000 (16:46 +0000)]
Document r315433, libarchive 3.3.1.
Document r316958, tcsh 6.20.00.
Document r310490, amd(8) 6.2.
Document r316350, tzdata 2017b.
Document r309848, file(1) 5.29.
Document r309512, Subversion 1.9.5.
Document r312516, xz(1) 5.2.3.
Prune comments.
Bump copyright year.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@319225 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r314341:
asomers [Tue, 30 May 2017 16:17:00 +0000 (16:17 +0000)]
MFC r314341:

Update devd.conf for ports change 421360

Ports change 421360 changed the name and UID of the postgres user

Reviewed by: trasz, imp, girgen
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9746

git-svn-id: svn://svn.freebsd.org/base/stable/10@319223 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r314148, r314150
asomers [Tue, 30 May 2017 16:15:52 +0000 (16:15 +0000)]
MFC r314148, r314150

r314148:
Misc Coverity fixes in xnb(4)

Most of these are null pointer dereferences or missing error checks in the
unit tests. One is a missing error check in xnb_attach_failed. None can
cause real problems in running systems.

Reported by: Coverity
CIDs: 1092469 1092468 1092467 2092466 1092465 1092512 1092511 1092510
CIDs: 1092510 1092509 1092508 1092507
Reviewed by: royger
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9234

r314150:
Fix the xnb(4) unit tests

One test was inadvertently expecting a bug in the kernel's sscanf
implementation circa 2012. I don't know when that bug got fixed.

Reported by: royger
Reviewed by: royger
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9766

git-svn-id: svn://svn.freebsd.org/base/stable/10@319222 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r313069:
asomers [Tue, 30 May 2017 16:09:54 +0000 (16:09 +0000)]
MFC r313069:

Allow 999.local to run scripts in any language

If one of the scripts listed in (daily|weekly|monthly)_local is executable,
999.local should simply execute it. Only if the script isn't executable
should 999.local assume it needs /bin/sh.

Reviewed by: brian
Sponsored by: Spectra Logic Corp

git-svn-id: svn://svn.freebsd.org/base/stable/10@319221 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r301207:
asomers [Tue, 30 May 2017 16:05:11 +0000 (16:05 +0000)]
MFC r301207:

Fix exit status of "service routing start <af> <iface>"

etc/rc.d/routing
Ignore the exit status of options_{inet,inet6,atm}. It's
meaningless.

Reviewed by: hrs
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D6687

git-svn-id: svn://svn.freebsd.org/base/stable/10@319220 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318606:
cy [Tue, 30 May 2017 03:33:48 +0000 (03:33 +0000)]
MFC r318606:

Refactor & compact struct i6addr_t #ifdef: remove redundant structure
definintion when USE_INET6 is false.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319179 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318588:
cy [Tue, 30 May 2017 03:30:53 +0000 (03:30 +0000)]
MFC r318588:

Fix up two assertions following malloc(). vangyzen@ notified me of
the second one. The first one is fixed as well.

Reported by: vangyzen@

git-svn-id: svn://svn.freebsd.org/base/stable/10@319178 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318578:
cy [Tue, 30 May 2017 03:27:59 +0000 (03:27 +0000)]
MFC r318578:

Fix non-recoverable name resolution failures due to negative cache
entries never expiring. This patch honours the negative cache timeout.

To test/experience the failure do the following:

1. Edit /etc/ncd.conf to adjust the cache timeouts as follows:

positive-time-to-live hosts 30
negative-time-to-live hosts 1

2. Ensure that nsswitch.conf hosts line contains something like:

hosts: files cache dns

Note that cache must be specified before dns.

3. Start nscd.

4. Run the following command:

while true; do nc -z -w 3 www.google.com 80; sleep 5; done

5. While running the command, remove or comment out all nameserver
   statements in /etc/resolv.conf. After a short while you will notice
   non-recoverable name rsolution failures.

6. Uncomment or replace all nameserver statements back into
   /etc/resolv.conf. Take note that name resolution never recovers.
   To recover nscd must be restarted. This patch fixes this.

PR: 207804
Submitted by: Jov <amutu@amutu.com>

git-svn-id: svn://svn.freebsd.org/base/stable/10@319177 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r318745:
cy [Tue, 30 May 2017 03:25:05 +0000 (03:25 +0000)]
MFC r318745:

Remove redundant variable declaration.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319176 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

6 years agoMFC r319015:
ngie [Tue, 30 May 2017 02:56:37 +0000 (02:56 +0000)]
MFC r319015:

Use calloc instead of malloc + memset

git-svn-id: svn://svn.freebsd.org/base/stable/10@319170 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f