]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
6 years agoMFH r324148:
mm [Sun, 8 Oct 2017 20:55:45 +0000 (20:55 +0000)]
MFH r324148:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #905: Support for Zstandard read and write filters
  PR #922: Avoid overflow when reading corrupt cpio archive
  Issue #935: heap-based buffer overflow in xml_data (CVE-2017-14166)
  OSS-Fuzz 2936: Place a limit on the mtree line length
  OSS-Fuzz 2394: Ensure that the ZIP AES extension header is large enough
  OSS-Fuzz 573: Read off-by-one error in RAR archives (CVE-2017-14502)

Security: CVE-2017-14166, CVE-2017-14502

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

6 years agoMFC note: MK_LIBSOFT doesn't apply to ^/stable/10 .
ngie [Sat, 7 Oct 2017 18:49:39 +0000 (18:49 +0000)]
MFC note: MK_LIBSOFT doesn't apply to ^/stable/10 .

MFC r322633,r324143:

r322633:

Honor NO_RTLD for rtld-elf, similar to what's done in libexec/Makefile, with
libexec/rtld-elf/... for MK_{LIB32,LIBSOFT}.

r324143:

Adjust r322633 to only apply to libexec/rtld-elf, and not usr.bin/ldd,
when running build32/install32

This unbreaks installing usr.bin/ldd as ldd32 when NO_RTLD is defined.

MFC with:       r322633

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

6 years agoMFC SVN r295342-295344
dteske [Fri, 6 Oct 2017 18:22:36 +0000 (18:22 +0000)]
MFC SVN r295342-295344

Differential Revision: https://reviews.freebsd.org/D12568
Submitted by: Vinicius Zava (egypcio at googlemail.com)
Reviewed by: allanjude

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

6 years agoMFC r324065
davidcs [Thu, 5 Oct 2017 18:58:24 +0000 (18:58 +0000)]
MFC r324065
Tx Ring Shadow Consumer Index Register needs to be cleared prior
to passing it's physical address to the FW during Tx Create Context.

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

6 years agoMFC r324026
davidcs [Thu, 5 Oct 2017 18:51:32 +0000 (18:51 +0000)]
MFC r324026
Fix delete all multicast addresses

Submitted by:Anand.Khoje@cavium.com

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

6 years agoMFC r323578,r323769: dounmount: do not release the mount point's reference
avg [Thu, 5 Oct 2017 07:16:31 +0000 (07:16 +0000)]
MFC r323578,r323769: dounmount: do not release the mount point's reference
on the covered vnode

As long as mnt_ref is not zero there can be a consumer that might try
to access mnt_vnodecovered.  For this reason the covered vnode must not
be freed until mnt_ref goes to zero.
So, move the release of the covered vnode to vfs_mount_destroy.

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

6 years agoMFC r322951:
ngie [Wed, 4 Oct 2017 16:35:58 +0000 (16:35 +0000)]
MFC r322951:

Respect MK_TCSH with build-tools and native-xtools

This helps reduce the WORLDTMP footprint slightly.

Based on a patch I submitted 5 years ago to GNATS.

PR: 174051
Relnotes: yes (anyone who cross-builds with MK_TCSH=yes will run into
     build failures if the host doesn't have tcsh(1))
Reminded by: Fabian Keil <fk@fabiankeil.de>

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

6 years agoRevert r324132
ngie [Wed, 4 Oct 2017 16:33:22 +0000 (16:33 +0000)]
Revert r324132

I accidentally used the wrong commit message

Reported by: rgrimes

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

6 years agoMFC r323791: MFV r323790: 8567 Inconsistent return value in zpool_read_label
avg [Wed, 4 Oct 2017 07:43:23 +0000 (07:43 +0000)]
MFC r323791: MFV r323790: 8567 Inconsistent return value in zpool_read_label

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

6 years agoMFC r323483: zfsctl_snapdir_lookup should be able to handle an uncovered vnode
avg [Wed, 4 Oct 2017 07:37:57 +0000 (07:37 +0000)]
MFC r323483: zfsctl_snapdir_lookup should be able to handle an uncovered vnode

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

6 years agoMFC r323481: zfsvfs_hold: assert that the busied filesystem can not be unmounted
avg [Wed, 4 Oct 2017 07:35:49 +0000 (07:35 +0000)]
MFC r323481: zfsvfs_hold: assert that the busied filesystem can not be unmounted

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

6 years agoFix a path in a Subversion example.
gjb [Tue, 3 Oct 2017 19:08:16 +0000 (19:08 +0000)]
Fix a path in a Subversion example.
While here, recommend https.

PR: 222761
Submitted by: 1983-01-06 <at> gmx.net
Sponsored by: The FreeBSD Foundation

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

6 years agoNow that 10.4-RELEASE is out, move stable/10 back to STABLE.
marius [Tue, 3 Oct 2017 13:20:17 +0000 (13:20 +0000)]
Now that 10.4-RELEASE is out, move stable/10 back to STABLE.

Approved by: re (implicit)

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

6 years agoMFC 323994: Log signal number passed to PT_STEP requests in KTR_PTRACE traces.
jhb [Mon, 2 Oct 2017 18:03:55 +0000 (18:03 +0000)]
MFC 323994: Log signal number passed to PT_STEP requests in KTR_PTRACE traces.

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

6 years agoMFC r323918: MFV r323917: 8648 Fix range locking in ZIL commit codepath
avg [Mon, 2 Oct 2017 12:47:35 +0000 (12:47 +0000)]
MFC r323918: MFV r323917: 8648 Fix range locking in ZIL commit codepath

This fixes a problem introduced in r320496, MFC of r308782.

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

6 years agoMFC r323873, r324081: Unprotected modification of ng_iface(4)
eugen [Sun, 1 Oct 2017 19:40:29 +0000 (19:40 +0000)]
MFC r323873, r324081: 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: mav (mentor)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12435

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

6 years agoMFC r323522: slightly simplify zfs_vptocnp
avg [Sun, 1 Oct 2017 14:50:58 +0000 (14:50 +0000)]
MFC r323522: slightly simplify zfs_vptocnp

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

6 years agoMFC r322635:
ngie [Sat, 30 Sep 2017 20:50:31 +0000 (20:50 +0000)]
MFC r322635:

Fix WARNS

- Remove ad hoc inet_ntoa prototype declaration; it's already handled
  by the included headers.
- De-K&Rify the function prototypes for eachres_whoami(..),
  eachres_getfile(..), and main(..).

PR: 71667
Tested with: clang (5.0), gcc (4.2.1, 5)

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

6 years agoRegenerate src.conf(5) per r324140
ngie [Sat, 30 Sep 2017 20:48:02 +0000 (20:48 +0000)]
Regenerate src.conf(5) per r324140

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

6 years agoMFC r321952:
ngie [Sat, 30 Sep 2017 20:46:34 +0000 (20:46 +0000)]
MFC r321952:

Allowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole lot
of sense. Anchor MK_NLS_CATALOGS being enabled off of MK_NLS.

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

6 years agoMFC r322951:
ngie [Sat, 30 Sep 2017 20:44:25 +0000 (20:44 +0000)]
MFC r322951:

Respect MK_TCSH with build-tools and native-xtools

This helps reduce the WORLDTMP footprint slightly.

Based on a patch I submitted 5 years ago to GNATS.

PR: 174051
Relnotes: yes (anyone who cross-builds with MK_TCSH=yes will run into
     build failures if the host doesn't have tcsh(1))
Reminded by: Fabian Keil <fk@fabiankeil.de>

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

6 years agoMFC r314601:
ngie [Sat, 30 Sep 2017 20:31:27 +0000 (20:31 +0000)]
MFC r314601:
r314601 (by des):

Re-apply part of r311585 which was inadvertantly reverted in the upgrade
to 7.3p1.  The other part (which adds -DLIBWRAP to sshd's CFLAGS) is
still in place.

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

6 years agoMFC r322441:
ngie [Sat, 30 Sep 2017 20:07:57 +0000 (20:07 +0000)]
MFC r322441:

Delete trailing whitespace

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

6 years agoMFC r321845:
ngie [Sat, 30 Sep 2017 20:06:36 +0000 (20:06 +0000)]
MFC r321845:

Standardize on SRCTOP instead of .CURDIR-relative paths

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

6 years agoMFC 323631: Add an -a flag to getconf.
jhb [Sat, 30 Sep 2017 17:30:22 +0000 (17:30 +0000)]
MFC 323631: Add an -a flag to getconf.

When -a is specified, the name and value of all system or path
configuration values is reported to standard output.

Sponsored by: Chelsio Communications

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

6 years agoMFC r323864
kp [Sat, 30 Sep 2017 10:16:15 +0000 (10:16 +0000)]
MFC r323864

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>

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

6 years agoMFC r323824
davidcs [Tue, 26 Sep 2017 21:18:43 +0000 (21:18 +0000)]
MFC r323824
    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

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

6 years agoMFC r323782
davidcs [Tue, 26 Sep 2017 21:16:10 +0000 (21:16 +0000)]
MFC r323782
Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval

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

6 years agoMFC r323781
davidcs [Tue, 26 Sep 2017 21:13:58 +0000 (21:13 +0000)]
MFC r323781
Update minidump template for version 5.4.66

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

6 years agoMFC r323480: zfs_get_vfs: reference a requested filesystem instead of vfs_busy-ing it
avg [Tue, 26 Sep 2017 09:32:29 +0000 (09:32 +0000)]
MFC r323480: zfs_get_vfs: reference a requested filesystem instead of vfs_busy-ing it

Sponsored by: Panzura

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

6 years agoMFC r323479,r323491: zfs: tighten debug versions of ZTOV and VTOZ
avg [Tue, 26 Sep 2017 08:45:11 +0000 (08:45 +0000)]
MFC r323479,r323491: zfs: tighten debug versions of ZTOV and VTOZ

Sponsored by: Panzura

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

6 years agoMFC: r323840
jkim [Mon, 25 Sep 2017 18:26:31 +0000 (18:26 +0000)]
MFC: r323840

Remove an ancient comment about the existence of READ(16)/WRITE(16) for MMC.

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

6 years agoMFC r323924:
gjb [Fri, 22 Sep 2017 14:40:04 +0000 (14:40 +0000)]
MFC r323924:
 Revert r323812 from release/tools/arm.subr, which has broken the
 build on arm/armv6 images.

Pointyhat: gjb (myself)
MFC note: releng/10.4 has broken because of this
Sponsored by: The FreeBSD Foundation

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

6 years ago- Akin r302691 in head, synchronize the build stripping for the disc1
marius [Fri, 22 Sep 2017 04:57:42 +0000 (04:57 +0000)]
- Akin r302691 in head, synchronize the build stripping for the disc1
  image with that of the bootonly image (but similarly modulo games
  and groff(1)) as the amd64 disc1 image is overflowing. This also
  removes the defunct WITHOUT_ATF.
- Remove the misspelled WITHOUT_INSTALLIB (also in place with correct
  spelling, i. e. WITHOUT_INSTALLLIB) from the bootonly image build
  stripping.

This is a direct commit to stable/10 as the corresponding knobs have
different names in head and counterparts to e. g. MK_DEBUG_FILES and
MK_TESTS default to off in stable/10 in the first place.

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

6 years agoMFC 323025: Read max_stack_flags from correct object.
jhb [Thu, 21 Sep 2017 20:59:36 +0000 (20:59 +0000)]
MFC 323025: Read max_stack_flags from correct object.

'obj' is not initialized here.

Sponsored by: DARPA / AFRL

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

6 years agoMFC: r285215
marius [Thu, 21 Sep 2017 19:30:32 +0000 (19:30 +0000)]
MFC: r285215

remove _NORMAL flag which isn't suppose to be used w/ _alloc_ctx...

MFC: r285289

address an issue where consumers, like IPsec, can reuse the same
session in multiple threads w/o locking..  There was a single fpu
context shared per session, if multiple threads were using the session,
and both migrated away, they could corrupt each other's fpu context...

MFC: r285297

upon further examination, it turns out that _unregister_all already
provides the guarantee that no threads will be in the _newsession code..

MFC: r298332

aesni(4): Initialize error before use [1]

Reported by: Coverity [1]
CID: 1331554 [1]

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

6 years agoMFC: r275751
marius [Thu, 21 Sep 2017 19:24:11 +0000 (19:24 +0000)]
MFC: r275751

Add _NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9).
A _NEW flag passed to _init_flags() to avoid check for double-init.

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

6 years agoMFC r323715:
cy [Thu, 21 Sep 2017 03:18:11 +0000 (03:18 +0000)]
MFC r323715:

Don't use an apostrophe in a possesive pronoun.

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

6 years agoMFC: r320916
marius [Wed, 20 Sep 2017 21:51:10 +0000 (21:51 +0000)]
MFC: r320916

Reset unsupported SFP tuneable back to original entry name.

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

6 years agoUnbreak netmap(4) support in ixgbe(4) after r315333:
marius [Wed, 20 Sep 2017 21:22:20 +0000 (21:22 +0000)]
Unbreak netmap(4) support in ixgbe(4) after r315333:
- Both ixgbe_netmap.c and ixv_netmap.c assumed a netmap(4) driver
  newer than what's actually in stable/10.
- Additionally, at the bottom line ixv_netmap.c did exactly the same
  as ixgbe_netmap.c, i. e. used IXGBE_TDH() as appropriate for PFs
  only instead of IXGBE_VFTDH() and tried to configure CRC stripping
  although the corresponding registers aren't available to VFs in the
  first place.

With these changes, the netmap(4) support in ixgbe(4) is in line
again with the code in sys/dev/netmap/ixgbe_netmap.h as of r295008.
Breakage reported by: Slawa Olhovchenkov

Just like r315333 that never existed in head, this is a direct commit
to stable/10. However, ixgbe(4) in head has a related bug in that it
assumes a netmap(4) driver API older than what's in head and also
does the wrong things for VFs as it uses the PF-only ixgbe_netmap.c
for both PFs and VFs in the first place.

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

6 years agoMFC 322270: Fix a NULL pointer dereference in mly_user_command().
jhb [Wed, 20 Sep 2017 20:48:21 +0000 (20:48 +0000)]
MFC 322270: Fix a NULL pointer dereference in mly_user_command().

If mly_user_command fails to allocate a command slot it jumps to an 'out'
label used for error handling.  The error handling code checks for a data
buffer in 'mc->mc_data' to free before checking if 'mc' is NULL.  Fix by
just returning directly if we fail to allocate a command and only using
the 'out' label for subsequent errors when there is actual cleanup to
perform.

PR: 217747
Reported by: PVS-Studio

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

6 years agoMFC r323812:
gjb [Wed, 20 Sep 2017 17:09:04 +0000 (17:09 +0000)]
MFC r323812:
 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
 a new installation.

Approved by: re (marius, insta-MFC)
Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r322530 and r323220:
hselasky [Wed, 20 Sep 2017 14:43:55 +0000 (14:43 +0000)]
MFC r322530 and r323220:
Add new USB quirk(s).

PR: 221775
PR: 221328
Sponsored by: Mellanox Technologies

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

6 years agoMFC r323540: jedec_ts: add many more devices from various vendors
avg [Wed, 20 Sep 2017 06:29:11 +0000 (06:29 +0000)]
MFC r323540: jedec_ts: add many more devices from various vendors

The new IDs are taken from the hardware to which I have access
and from open datasheets.

Also, the hardware probing is moved to the device probe method.

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

6 years agoMFC r323482: zfs_ctldir: remove obsolete / bogus ARGSUSED lint directives
avg [Tue, 19 Sep 2017 12:43:47 +0000 (12:43 +0000)]
MFC r323482: zfs_ctldir: remove obsolete / bogus ARGSUSED lint directives

None of the tagged functions had unused parameters.

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

6 years agoMFC r322241: MFV r322240: 8491 uberblock on-disk padding to reserve space for smoothl...
avg [Tue, 19 Sep 2017 09:26:13 +0000 (09:26 +0000)]
MFC r322241: MFV r322240: 8491 uberblock on-disk padding to reserve space for smoothly merging zpool checkpoint & MMP in ZFS

illumos/illumos-gate@79c2b812ee2010ebf20fdd92dc5f06b59000a94c
https://github.com/illumos/illumos-gate/commit/79c2b812ee2010ebf20fdd92dc5f06b59000a94c

https://www.illumos.org/issues/8491
  The zpool checkpoint feature in DxOS added a new field in the uberblock.
  The Multi-Modifier Protection Pull Request from ZoL adds two new fields in the
  uberblock (Reference: https://github.com/zfsonlinux/zfs/pull/6279).
  As these two changes come from two different sources and once upstreamed and
  deployed will introduce an incompatibility with each other we want
  to upstream a change that will reserve the padding for both of them so
  integration goes smoothly and everyone gets both features.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Olaf Faaland <faaland1@llnl.gov>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Serapheim Dimitropoulos <serapheim@delphix.com>

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

6 years agoMFC r322228: MFV r322227: 8377 Panic in bookmark deletion
avg [Tue, 19 Sep 2017 09:15:07 +0000 (09:15 +0000)]
MFC r322228: MFV r322227: 8377 Panic in bookmark deletion

illumos/illumos-gate@42418f9e73f0d007aa87675ecc206c26fc8e073e
https://github.com/illumos/illumos-gate/commit/42418f9e73f0d007aa87675ecc206c26fc8e073e

https://www.illumos.org/issues/8377
  The problem is that when dsl_bookmark_destroy_check() is executed from open
  context (the pre-check), it fills in dbda_success based on the existence of the
  bookmark.
  But the bookmark (or containing filesystem as in this case) can be destroyed
  before we get to syncing context. When we re-run dsl_bookmark_destroy_check()
  in syncing
  context, it will not add the deleted bookmark to dbda_success, intending for
  dsl_bookmark_destroy_sync() to not process it. But because the bookmark is
  still in dbda_success
  from the open-context call, we do try to destroy it.
  The fix is that dsl_bookmark_destroy_check() should not modify dbda_success
  when called from open context.

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

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

6 years agoMFC r321471: spa_import_rootpool should be able to handle an imported root pool
avg [Tue, 19 Sep 2017 08:43:45 +0000 (08:43 +0000)]
MFC r321471: spa_import_rootpool should be able to handle an imported root pool

That is required to support reboot -r with a new root filesystem being
on an already imported pool.

PR: 210721

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

6 years agoMFC r320352: zfs: port vdev_file part of illumos change 3306
avg [Tue, 19 Sep 2017 08:39:54 +0000 (08:39 +0000)]
MFC r320352: zfs: port vdev_file part of illumos change 3306

3306 zdb should be able to issue reads in parallel
illumos/illumos-gate/31d7e8fa33fae995f558673adb22641b5aa8b6e1
https://www.illumos.org/issues/3306

The upstream change was made before we started to import upstream commits
individually.  It was imported into the illumos vendor area as r242733.
That commit was MFV-ed in r260138, but as the commit message says
vdev_file.c was left intact.

This commit actually implements the parallel I/O for vdev_file using a
taskqueue with multiple thread.  This implementation does not depend on
the illumos or FreeBSD bio interface at all, but uses zio_t to pass
around all the relevent data.  So, the code looks a bit different from
the upstream.

This commit also incorporates ZoL commit
zfsonlinux/zfs/bc25c9325b0e5ced897b9820dad239539d561ec9 that fixed
https://github.com/zfsonlinux/zfs/issues/2270
We need to use a dedicated taskqueue for exactly the same reason as ZoL
as we do not implement TASKQ_DYNAMIC.

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

6 years agoMFC r320151: remove bogus declaration of malloc from tcp_wrappers
avg [Tue, 19 Sep 2017 08:34:13 +0000 (08:34 +0000)]
MFC r320151: remove bogus declaration of malloc from tcp_wrappers

The declaration was already inactive when INET6 was enabled
and it causes a build error in the other case because of
a conflict with the correct definition in stdlib.h.

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

6 years agoMFC r320266: jedec_ts: add support for devices manufactured by IDT
avg [Tue, 19 Sep 2017 08:29:53 +0000 (08:29 +0000)]
MFC r320266: jedec_ts: add support for devices manufactured by IDT

Full manufacturer name is Integrated Device Technology, Inc.
Supported devices include TSE2002B3C and TS3000B3A.

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

6 years agoMFV r320195: bhyveload: correctly query size of disks
avg [Tue, 19 Sep 2017 08:19:20 +0000 (08:19 +0000)]
MFV r320195: bhyveload: correctly query size of disks

On FreeBSD fstat(2) works fine for querying sizes of plain files,
but not so much for character devices.
So, use DIOCGMEDIASIZE to try to get the correct size for disks
and disk-like devices (e.g. zvols).

PR: 220186

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

6 years agoMFV r318962: Allow PROBE_SPINUP to fail in CAM ATA transport
avg [Tue, 19 Sep 2017 07:39:39 +0000 (07:39 +0000)]
MFV r318962: Allow PROBE_SPINUP to fail in CAM ATA transport

The motivation for this is two-fold.

1. Some old WD SATA disks may appear as if they need to be spun up
when they are already spinning.  Those disks would respond with
an error to the spin-up request.

2. Even if we really fail to spin up the disk, we still can try to
proceed to the subsequent phases.  If we fail later on, then no
difference.  Otherwise we get a chance to communicate with the
disk which is better than completely ignoring it, because a user
can try to recover the disk.

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

6 years agoMFC r319746,r319747,r319769: 8269 dtrace stddev aggregation is normalized incorrectly
avg [Tue, 19 Sep 2017 07:31:53 +0000 (07:31 +0000)]
MFC r319746,r319747,r319769: 8269 dtrace stddev aggregation is normalized incorrectly

illumos/illumos-gate@79809f9cf402f130667349b2d4007ecd65d63c6f
https://github.com/illumos/illumos-gate/commit/79809f9cf402f130667349b2d4007ecd65d63c6f

https://www.illumos.org/issues/8269
  It seems that currently normalization of stddev aggregation is done
  incorrectly.
  We divide both the sum of values and the sum of their squares by the
  normalization factor. But we should divide the sum of squares by the
  normalization factor squared to scale the original values properly.

FreeBSD note: the actual change was committed in r316853, this commit
adds the test files and record merge information.

Reviewed by: Bryan Cantrill <bryan@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andriy Gapon <avg@FreeBSD.org>

Sponsored by: Panzura

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

6 years agoMFC r319212: fix indentation
avg [Tue, 19 Sep 2017 07:19:27 +0000 (07:19 +0000)]
MFC r319212: fix indentation

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

6 years ago- Prune stale entries from 10.3-RELEASE.
gjb [Mon, 18 Sep 2017 15:17:07 +0000 (15:17 +0000)]
- Prune stale entries from 10.3-RELEASE.
- Prune entries from errata.xml and security.xml.
- Update versions to reflect 10.4-RELEASE.

Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r323478:
cy [Mon, 18 Sep 2017 00:17:53 +0000 (00:17 +0000)]
MFC r323478:

Improve the wording of a comment describing why EAGAIN is the error code.

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

6 years agoMFC r322112:
cy [Mon, 18 Sep 2017 00:13:48 +0000 (00:13 +0000)]
MFC r322112:

krb5_err.h is generated from a .et file in kerberos5/lib/libkrb5.
As kerberos5/lib/krb5 include files are already referenced it makes
no sense to generate it again here.

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

6 years agoMFC r323160:
bapt [Sun, 17 Sep 2017 06:35:33 +0000 (06:35 +0000)]
MFC r323160:

Update pci_vendors to 2017-09-01

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

6 years agoMFC: r322669
marius [Sun, 17 Sep 2017 01:32:45 +0000 (01:32 +0000)]
MFC: r322669

In fetch_resolve() if the port number or service name is included
in the host argument (e. g. "www.freebsd.org:443"), correctly set
the service pointer accordingly.  Previously, the service pointer
was set to the separator instead, causing getaddrinfo(3) to fail.

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

6 years ago- Reset stable/10 back to -PRERELEASE status now that releng/10.4
marius [Fri, 15 Sep 2017 00:32:22 +0000 (00:32 +0000)]
- Reset stable/10 back to -PRERELEASE status now that releng/10.4
  has been branched.
- Update __FreeBSD_version to reflect the new -STABLE branch.
- Switch the pkg(8) configuration for the default installation and the
  DVD image creation back to the latest set, i. e. revert r322737.

Approved by: re (implicit)

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

6 years agoDocument r301772, Dummynet AQM imported to the base system.
gjb [Thu, 14 Sep 2017 22:19:56 +0000 (22:19 +0000)]
Document r301772, Dummynet AQM imported to the base system.

Submitted by: truckman
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r316348, pw(8) respecting pw.conf(5).
gjb [Thu, 14 Sep 2017 18:07:30 +0000 (18:07 +0000)]
Document r316348, pw(8) respecting pw.conf(5).
Document r322793, GEOM_JOURNAL flush_queue handling fixed.

Submitted by: eugen
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

6 years agoFix an indentation mistake that snuck in with r323590.
gjb [Thu, 14 Sep 2017 16:58:26 +0000 (16:58 +0000)]
Fix an indentation mistake that snuck in with r323590.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r320772, syslogd(8) logging retry after restarting
gjb [Thu, 14 Sep 2017 16:54:05 +0000 (16:54 +0000)]
Document r320772, syslogd(8) logging retry after restarting
unexpectedly.

Submitted by: eugen
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r320312 and r321074, cancel-safe support in stdio(3) and
gjb [Thu, 14 Sep 2017 16:49:43 +0000 (16:49 +0000)]
Document r320312 and r321074, cancel-safe support in stdio(3) and
syslog(3).

Submitted by: eugen
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r323448: bsdinstall: Ignore error return from newaliases(1)
emaste [Thu, 14 Sep 2017 01:24:17 +0000 (01:24 +0000)]
MFC r323448: bsdinstall: Ignore error return from newaliases(1)

This was originally added as "exit $SUCCESS" but with nothing to set the
SUCCESS variable. Thus it became an exit with no argument, which just
exits with the status of the preceding command.

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

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

6 years agoMFC: r323382, MFV: r323381
marius [Wed, 13 Sep 2017 21:56:49 +0000 (21:56 +0000)]
MFC: r323382, MFV: r323381

Permit a deflateParams() parameter change as soon as possible.

This change fixes compression errors seen when the embedded Tomcat
web server of a UniFi Controller zlib compresses responses. Given
that Tomcat just uses Java/OpenJDK which in turn employs zlib for
its compression/decompression support, this bug might very well
affect other applications, too.

PR: 222136
Approved by: re (gjb)

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

6 years agoMFC r320069: Add ZFS to Linux statfs ftype
emaste [Sat, 9 Sep 2017 14:30:16 +0000 (14:30 +0000)]
MFC r320069: Add ZFS to Linux statfs ftype

PR: 220086
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r322374: bsdinstall: record DHCP config after obtaining lease
emaste [Sat, 9 Sep 2017 01:23:30 +0000 (01:23 +0000)]
MFC r322374: bsdinstall: record DHCP config after obtaining lease

Previously we added an ifconfig_$INTERFACE line to rc.conf for each
unsuccessful DCHP attempt.

PR: 219515
Approved by: re (marius)
Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r322677: pw usermod: handle empty secondary group lists (-G '')
emaste [Fri, 8 Sep 2017 21:16:23 +0000 (21:16 +0000)]
MFC r322677: pw usermod: handle empty secondary group lists (-G '')

"pw usermod someuser -G ''" is supposed make sure that someuser
doesn't have any secondary group memberships.

Previouly it was a nop because split_groups() only intitialised
"groups" if at least one group was specified. As a result the
existing secondary group memberships were kept.

PR: 221417
Submitted by: Fabian Keil
Approved by: re (kib)
Obtained from: ElectroBSD
Relnotes: yes

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

6 years agoMFC r322678: pw useradd: Validate the user name before creating the entry
emaste [Fri, 8 Sep 2017 21:02:15 +0000 (21:02 +0000)]
MFC r322678: pw useradd: Validate the user name before creating the entry

Previouly it was possible to create users with spaces in the name with:
pw useradd -u 1234 -g 1234 -n 'test user'

The "-g 1234" is relevant, without it the name was already rejected
as expected:

[fk@test ~]$ sudo pw useradd -u 1234 -n 'test user'
pw: invalid character ` ' at position 4 in userid/group name

Bug unintentionally found with a salt config without explicit name entry:

test user:
  user.present:
    - uid: 1234
    - gid: 1234
    - fullname: Test user
    - shell: /usr/local/bin/bash
    - home: /home/test
    - groups:
      - wheel
      - salt

"Luckily" salt modules rarely bother with input validation either ...

PR: 221416
Submitted by: Fabian Keil
Approved by: re (kib)
Obtained from: ElectroBSD

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

6 years agoMFC r323002: zfs: do not advertise unsupported hash algorithms
emaste [Fri, 8 Sep 2017 20:41:49 +0000 (20:41 +0000)]
MFC r323002: zfs: do not advertise unsupported hash algorithms

illumos 4185 ("add new cryptographic checksums to ZFS: SHA-512, Skein,
Edon-R") was intentionally merged only partially in r289422, without
adding support for skein, sha512 and edonr on FreeBSD.

Support for skein and sha512 was added later on (in head), but none of
these are supported in stable/10. Prior to this commit zfs(8) correctly
rejected these algorithms, but with an error message that claimed
support:

fk@r500 ~ $zfs set checksum=edonr tank
cannot set property for 'tank': 'checksum' must be one of 'on | off |
  fletcher2 | fletcher4 | sha256 | sha512 | skein | edonr'

(This commit removes sha512 and skein in addition to edonr from the
merge of head's r323002.)

PR: 204055
Submitted by: Fabian Keil
Approved by: re (kib)
Obtained from: ElectroBSD

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

6 years agoUpdate stable/10 to BETA4 in preparation for 10.4-BETA4 builds.
marius [Fri, 8 Sep 2017 00:11:58 +0000 (00:11 +0000)]
Update stable/10 to BETA4 in preparation for 10.4-BETA4 builds.

Approved by: re (implicit)

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

6 years ago- Ever since the workaround for the silicon bug of TSO4 causing MAC hangs
marius [Fri, 8 Sep 2017 00:11:35 +0000 (00:11 +0000)]
- Ever since the workaround for the silicon bug of TSO4 causing MAC hangs
  was committed in r295133 (MFCed to stable/10 in r295287), CSUM_TSO gets
  always disabled by em(4) on the first invocation of em_init_locked() as
  at that point no link is established, yet. In turn, this causes CSUM_TSO
  also to be off when em(4) is used as a parent device for vlan(4), i. e.
  besides IFCAP_TSO4, IFCAP_VLAN_HWTSO effectively doesn't work either.

  In head an attempt to fix this was made with r308345, but that revision
  had several problems on its own. One of which was that r308345 caused
  IFCAP_TSO4 to also be cleared from both the interface capability and
  capability enable bits. Thus, once a link switched from gigabit to a
  lower speed, TSO no longer could be enabled, even not via ifconfig(8).
  So this change moves the aforementioned WAR to em_update_link_status()
  like r308345 did, but only alters the hardware assist bits accordingly,
  leaving IFCAP_TSO4 flags alone.

  Still, this isn't the only problem r308345 had. Another one is that there
  just is no way to atomically flush TSO-using descriptors already queued
  at the point in time a link speed switch to below GbE occurs. Thus, such
  in-flight descriptors still may hang the MAC. Moreover, at least currently
  there also is no way of triggering a reconfiguration of vlan(4) when the
  state of IFCAP_VLAN_HWTSO support changes at runtime, causing vlan(4) to
  continue employing TSO. Last but not least, testing shows that - despite
  all the WARs for TSO-related silicon bugs in em(4) - at least 82579 still
  may hang at gigabit speed with IFCAP_TSO4 enabled. Therefore, this change
  further removes IFCAP_TSO4 and IFCAP_VLAN_HWTSO from interface capability
  enable bits as set by em(4). While at it, the use of CSUM_TCP is replaced
  with CSUM_IP_TSO as em(4) only implements support for IFCAP_TSO4 but not
  IFCAP_TSO6 (although in principle available with a subset of the supported
  MACs).

  At the bottom line, this change allows IFCAP_TSO4 and IFCAP_VLAN_HWTSO to
  be used again with em(4), but these hardware offloading capabilities now
  need to be explicitly enabled via ifconfig(8). Beware that it's only
  considered safe to do so (and also only may work) in environments where
  the link speed is not to be expected to change from GbE. Moreover, em(4)
  appears to still be missing some more TSO workarounds for at least some
  models, specifically the 82579 (I could not find an errata sheet and
  "specification update" respectively for these latter, though, and the
  generic ICH8 one doesn't list any TSO related bugs).

- Let igb_tso_setup() handle EtherType protocols that are unsupported or
  for which support hasn't been compiled in gracefully instead of calling
  panic(9).

- Make em_allocate_{legacy,msix}() and lem_allocate_irq() match their
  prototypes WRT static.

This is a direct commit to stable/10 as corresponding code is no longer
present in head.

Approved by: re (gjb, kib)

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

6 years agoMFC: r321293
marius [Thu, 7 Sep 2017 23:28:35 +0000 (23:28 +0000)]
MFC: r321293

date: avoid crash on invalid time

PR: 220828
Approved by: re (kib)

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

6 years agoMFC r323278: Fix an incorrectly used conditional causing buffer overflow.
gordon [Thu, 7 Sep 2017 19:23:08 +0000 (19:23 +0000)]
MFC r323278: Fix an incorrectly used conditional causing buffer overflow.

Reported by: Thomas Jarosch of Intra2net AG
Reviewed by: emaste, jhb
Approved by: re (marius)
Security: CVE-2017-1000249

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

6 years agoMFC r322073:
cy [Wed, 6 Sep 2017 20:01:19 +0000 (20:01 +0000)]
MFC r322073:

Fix matchcing of NATed ICMP queries (resolving NATed MTU discovery).

Approved by: re (kib)

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

6 years agoMFC r322810 and r322830:
hselasky [Wed, 6 Sep 2017 15:33:23 +0000 (15:33 +0000)]
MFC r322810 and r322830:
Add new mlx5ib(4) driver to the kernel source tree which supports
Remote DMA over Converged Ethernet, RoCE, for the ConnectX-4 series of
PCI express network cards.

There is currently no user-space support and this driver only supports
kernel side non-routable RoCE V1. The krping kernel module can be used
to test this driver. Full user-space support including RoCE V2 will be
added as part of the ongoing upgrade to ibcore from Linux 4.9. Otherwise
this driver is feature equivalent to mlx4ib(4). The mlx5ib(4) kernel
module will only be built when WITH_OFED=YES is specified.

Approved by: re (marius)
Sponsored by: Mellanox Technologies

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

6 years agoMFC r323001:
dim [Tue, 5 Sep 2017 17:32:14 +0000 (17:32 +0000)]
MFC r323001:

In compiler-rt, a few assembler implementations for i386 floating point
conversion functions use SSE2 instructions, but these are not guarded by
#ifdef __SSE2__, and there is no implementation using general purpose
registers.  For these functions, use the generic C variants instead,
otherwise they will cause SIGILL on older processors.

Approved by: re (kib)
Reported by: bsdpr@phoe.frmug.org
PR: 221733

MFC r323014:

Follow-up to r323001: if the actually selected CPUTYPE is capable of
SSE2 instructions, we can use them.

Suggested by: jkim
PR: 221733

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

6 years agoUpgrade OpenSSH to 7.3p1.
des [Fri, 1 Sep 2017 22:52:18 +0000 (22:52 +0000)]
Upgrade OpenSSH to 7.3p1.

This is the last version of OpenSSH which does not break compatibility
more than we can live with in a stable branch.  Further commits will
follow to backport some bug fixes from newer versions.

The sshd breakage in the previous attempt was due to an upstream bug
(a 0 was changed to a 1 while refactoring send_rexec_state() in sshd.c)
which only manifested itself when sshd was built with SSH 1 support.

Approved by: re@

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

6 years agoRevert OpenSSH 7.3p1; something went wrong between testing and committing.
des [Fri, 1 Sep 2017 21:48:36 +0000 (21:48 +0000)]
Revert OpenSSH 7.3p1; something went wrong between testing and committing.

Approved by: re@

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

6 years agoUpgrade OpenSSH to 7.3p1.
des [Fri, 1 Sep 2017 21:24:32 +0000 (21:24 +0000)]
Upgrade OpenSSH to 7.3p1.

This is the last version of OpenSSH which does not break compatibility
more than we can live with in a stable branch.  Further commits will
follow to backport some bug fixes from newer versions.

Approved by: re@

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

6 years agoFix a typo in the hard link creation for a WANDBOARD DTB file. Just
marius [Fri, 1 Sep 2017 19:11:47 +0000 (19:11 +0000)]
Fix a typo in the hard link creation for a WANDBOARD DTB file. Just
like r322666 which introduced this bug, this is a direct commit to
stable/10.

Approved by: re (kib)

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

6 years agoUpdate stable/10 to BETA3 in preparation for 10.4-BETA3 builds.
marius [Fri, 1 Sep 2017 00:16:03 +0000 (00:16 +0000)]
Update stable/10 to BETA3 in preparation for 10.4-BETA3 builds.

Approved by: re (implicit)

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

6 years agoMFC: r308643, r312427, r312641, r322986
marius [Thu, 31 Aug 2017 23:59:46 +0000 (23:59 +0000)]
MFC: r308643, r312427, r312641, r322986

- Update WOL support for newer em(4) devices. [1]
- Add support for Kaby Lake generation i219 (4) and i219 (5) devices.
- Enable WOL features also for the igb(4) class of devices. [1]
- Don't set any WOL enabling hardware bits if WOL isn't requested
  according to the enabled interface capability bits.

PR: 208343 [1]
Submitted by: Kaho Tashikazu <kaho@elam.kais.kyoto-u.ac.jp> [1]
Approved by: re (kib)

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

6 years agoMFC r322852
davidcs [Thu, 31 Aug 2017 21:56:17 +0000 (21:56 +0000)]
MFC r322852
Fix qlnx_tso_check() so that every window of
(ETH_TX_LSO_WINDOW_BDS_NUM - nbds_in_hdr) has atleast
ETH_TX_LSO_WINDOW_MIN_LEN bytes

Approved by:re(marius)

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

6 years agoMFC r322628: Fix BSD label partition end sector calculation.
oleg [Thu, 31 Aug 2017 13:32:01 +0000 (13:32 +0000)]
MFC r322628: Fix BSD label partition end sector calculation.

Approved by: re (marius)
Differential Revision: https://reviews.freebsd.org/D12066

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

6 years agoMFC r321806:
cy [Thu, 31 Aug 2017 00:56:10 +0000 (00:56 +0000)]
MFC r321806:

Remove redundant include directories which expand to a noop,
"-I/lib/krb5 -I -I".

Reviewed by:    ngie@, markm@
Approved by: re@ (marius@)
Differential Revision:  D11769

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

6 years agoMFC 322771
davidcs [Mon, 28 Aug 2017 19:17:28 +0000 (19:17 +0000)]
MFC 322771

Upgrade FW to 5.4.66
sysctls to display stats, stats polled every 2 seconds
Modify QLA_LOCK()/QLA_UNLOCK() to not sleep after acquiring mtx_lock
Add support to turn OFF/ON error recovery following heartbeat failure for
debug purposes.
Set default max values to 32 Tx/Rx/SDS rings

Approved by: re(gjb)

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

6 years agoUpdate stable/10 to BETA2 in preparation for 10.4-BETA2 builds.
marius [Fri, 25 Aug 2017 00:11:29 +0000 (00:11 +0000)]
Update stable/10 to BETA2 in preparation for 10.4-BETA2 builds.

Approved by: re (implicit)

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

6 years agoMFC r322408
davidcs [Thu, 24 Aug 2017 22:33:42 +0000 (22:33 +0000)]
MFC r322408
Performance enhancements to reduce CPU utililization for large number of
TCP connections (order of tens of thousands), with predominantly Transmits.

Submitted by: Vaishali.Kulkarni@cavium.com
Approved by: re(marius)

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

6 years agoNote change brought on by 322860 MFC.
mckusick [Thu, 24 Aug 2017 21:49:44 +0000 (21:49 +0000)]
Note change brought on by 322860 MFC.

Discussed with: kib, imp
Differential Revision: https://reviews.freebsd.org/D11589
Approved by: re (kib)

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

6 years agoMFC of 276737, 322200, 322201, 322271, and 322297
mckusick [Thu, 24 Aug 2017 21:44:23 +0000 (21:44 +0000)]
MFC of 276737, 322200, 322201, 322271, and 322297

276737: Remove old ioctl use and support
322200: Remove (broken) search for alternate superblocks
322201: Show differences when alternate superblock fails to match
322271: Cleanup for 322200.
322297: Restore fsck_ffs ability to find alternate superblocks

Discussed with: kib, imp
Differential Revision: https://reviews.freebsd.org/D11589
Approved by: re (kib)

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

6 years agoMFC: r322726
marius [Thu, 24 Aug 2017 20:52:28 +0000 (20:52 +0000)]
MFC: r322726

Bring back the much more readable unified format for differences in
/etc/{group,master.passwd}. This was originally turned on for all of
/etc/{aliases,group,master.passwd} in r55196, but then backed out
only for the latter two in r56697, as the adaption of the sed(1)ing
done in r56308 was incorrect. This left us with inconsistent diff(1)
formats in the daily output of periodic(8) ever since, despite in
r56697 having been promised to be revisited. So properly adapt the
password hash filtering to the unified format and turn the later on
again for /etc/{group,master.passwd}, too.

Approved by: re (kib)

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

6 years agoMFC r322331
davidcs [Thu, 24 Aug 2017 18:01:17 +0000 (18:01 +0000)]
MFC r322331
  Provide compile option to choose receive processing in either Ithread or
  Taskqueue Thread.

Approved by: re(marius)

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

6 years agoMFC r278479,278494,278525,278545,278592,279237,280410:
will [Thu, 24 Aug 2017 17:25:16 +0000 (17:25 +0000)]
MFC r278479,278494,278525,278545,278592,279237,280410:

This change merges devctl notification for userland coredumps.

r278479 (rpaulo):

  Notify devd(8) when a process crashed.

  This change implements a notification (via devctl) to userland when
  the kernel produces coredumps after a process has crashed.
  devd can then run a specific command to produce a human readable crash
  report.  The command is most usually a helper that runs gdb/lldb
  commands on the file/coredump pair.  It's possible to use this
  functionality for implementing automatic generation of crash reports.

  devd(8) will be notified of the full path of the binary that crashed and
  the full path of the coredump file.

r278494 (rpaulo):

  Sanitise the coredump file names sent to devd.

  While there, add a sysctl to turn this feature off as requested by kib@.

r278525 (rpaulo):

  Remove a printf and an strlen() from the coredump code.

r278545 (rpaulo):

  Restore the data array in coredump(), but use a different style to
  calculate the length.

r278592 (rpaulo):

  Remove check against NULL after M_WAITOK.

r279237 (kib):

  Keep a reference on the coredump vnode for vn_fullpath() call.  Do it
  by moving vn_close() after the point where notification is sent.

r280410 (rpaulo):

  Disable coredump_devctl because it could lead to leaking paths to jails.

Approved by: re

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

6 years agoMFC r322770, r322796:
gjb [Thu, 24 Aug 2017 13:39:24 +0000 (13:39 +0000)]
MFC r322770, r322796:

 r322770:
  Apply changes from bin/chmod/tests/chmod_test.sh, adding
  atf_expect_fail() before chflags(8) is invoked if the filesystem
  is ZFS, which does not support UF_IMMUTABLE.

 r322796:
  Revert part of r322770 in usr.sbin/chown/tests/chown_test.sh,
  which incorrectly adds atf_expect_fail() where there is no
  failure case.

Approved by: re (marius)
Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r322544:
gjb [Wed, 23 Aug 2017 17:47:57 +0000 (17:47 +0000)]
MFC r322544:
 Always expand the full path to the configuration file specified
 with the '-c' flag.  This fixes an issue where the configuration
 file would not properly be located intermittently.

Approved by: re (kib, marius)
Sponsored by: The FreeBSD Foundation

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

6 years agoMFC of 269692, 322179, 322463, and 322464:
mckusick [Tue, 22 Aug 2017 15:26:47 +0000 (15:26 +0000)]
MFC of 269692, 322179, 322463, and 322464:

269692: cswitch is unsigned, so don't compare it < 0
322179: Correct ordering of bio's in gjournal queue
322463: Eliminate a variable that is set-only in g_journal.c
322464: Correct check for reads in gjournal

Submitted by: Dr. Andreas Longwitz <longwitz@incore.de>
Discussed with: kib
Approved by: re (marius)

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