]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
6 years agoMFC r326315, r326330, r326331, r326412:
gjb [Mon, 4 Dec 2017 15:28:07 +0000 (15:28 +0000)]
MFC r326315, r326330, r326331, r326412:

 r326315:
  Set DISTDIR and WRKDIRPREFIX when building ports within the
  chroot(8) to avoid mtime changes within the ports checkout,
  which can cause checksum differences.

 r326330:
  Add a comment to release/release.conf.sample documenting
  EMBEDDEDPORTS. [1]

  Remove and update stale documentation from release(7) while here.

 r326331:
  Correct a comment.

 r326412:
  Fix port build flags passed to make(1) after r326315, where
  it was missed for embedded image builds.

PR: 206344 [1]
Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r326424:
kib [Mon, 4 Dec 2017 10:05:59 +0000 (10:05 +0000)]
MFC r326424:
Add comment for vm_map_find_min().

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

6 years agoMFC r325897:
hselasky [Mon, 4 Dec 2017 09:54:03 +0000 (09:54 +0000)]
MFC r325897:
Improve the library dependencies helper script in src/tools.

Implement double pass of the relevant Makefiles. First make a list of
library names and directories and then scan for all the dependencies.
Spaces in directories in the source tree are not supported.

This avoids using hardcoded mappings between the library name
and the directory containing the library Makefile.

Add support for scanning contrib/ofed .

Bail out on any errors.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r326161:
hselasky [Mon, 4 Dec 2017 09:46:08 +0000 (09:46 +0000)]
MFC r326161:
Implement atomic_fetchadd_64() for i386. This function is needed by the
atomic64 header file in the LinuxKPI for i386.

Reviewed by: kib
Sponsored by: Mellanox Technologies

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

6 years agoMFC r326392:
hselasky [Mon, 4 Dec 2017 09:27:36 +0000 (09:27 +0000)]
MFC r326392:
Properly define the VLAN_XXX() function macros to avoid miscompilation when
used inside "if" statements comparing with another value.

Detailed explanation:
"if (a ? b : c != 0)" is not the same like "if ((a ? b : c) != 0)"
which is the expected behaviour of a function macro.

Affects:
toecore, linuxkpi and ibcore.

Reviewed by: kib
Sponsored by: Mellanox Technologies

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

6 years agoMFC r326070: zfs_write: fix problem with writes appearing to succeed when over quota
avg [Fri, 1 Dec 2017 11:14:13 +0000 (11:14 +0000)]
MFC r326070: zfs_write: fix problem with writes appearing to succeed when over quota

The problem happens when the writes have offsets and sizes aligned with
a filesystem's recordsize (maximum block size).  In this scenario
dmu_tx_assign() would fail because of being over the quota, but the uio
would already be modified in the code path where we copy data from the
uio into a borrowed ARC buffer.  That makes an appearance of a partial
write, so zfs_write() would return success and the uio would be modified
consistently with writing a single block.

That bug can result in a data loss because the writes over the quota
would appear to succeed while the actual data is being discarded.

This commit fixes the bug by ensuring that the uio is not changed until
after all error checks are done.  To achieve that the code now uses
uiocopy() + uioskip() as in the original illumos design.  We can do that
now that uiocopy() has been updated in r326067 to use
vn_io_fault_uiomove().

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

6 years agoMFC r326067: make illumos uiocopy use vn_io_fault_uiomove
avg [Fri, 1 Dec 2017 11:11:25 +0000 (11:11 +0000)]
MFC r326067: make illumos uiocopy use vn_io_fault_uiomove

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

6 years agoMFC r325850: pfctl: teach route-to to deal with interfaces with multiple addresses
kp [Thu, 30 Nov 2017 21:32:28 +0000 (21:32 +0000)]
MFC r325850: pfctl: teach route-to to deal with interfaces with multiple addresses

The route_host parsing code set the interface name, but only for the first
node_host in the list. If that one happened to be the inet6 address and the
rule wanted an inet address it'd get removed by remove_invalid_hosts() later
on, and we'd have no interface name.

We must set the interface name for all node_host entries in the list, not just
the first one.

PR: 223208

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

6 years agoMFC r326122:
kib [Thu, 30 Nov 2017 14:38:07 +0000 (14:38 +0000)]
MFC r326122:
Kill all descendants of the reaper, even if they are descendants of a
subordinate reaper.  Also, mark reapers when listing pids.

PR: 223745

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

6 years agoMFC r326135: bfd: fix segfault in the ihex parser on malformed ihex file
emaste [Thu, 30 Nov 2017 00:27:49 +0000 (00:27 +0000)]
MFC r326135: bfd: fix segfault in the ihex parser on malformed ihex file

From binutils commit 0102ea8cec5fc509bba6c91df61b7ce23a799d32, made
available under GPLv2 by Nick Clifton.

PR: 198824
Security: CVE-2014-8503

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

6 years agoMFC r326136: bfd: avoid crash on corrupt binaries
emaste [Thu, 30 Nov 2017 00:25:25 +0000 (00:25 +0000)]
MFC r326136: bfd: avoid crash on corrupt binaries

From binutils commits 5a4b0ccc20ba30caef53b01bee2c0aaa5b855339 and
7e1e19887abd24aeb15066b141cdff5541e0ec8e, made available under GPLv2
by Nick Clifton.

PR: 198824
Security: CVE-2014-8501
Security: CVE-2014-8502

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

6 years agoMFC r326082: freebsd-update: do not duplicate patchlist entries
emaste [Wed, 29 Nov 2017 20:44:40 +0000 (20:44 +0000)]
MFC r326082: freebsd-update: do not duplicate patchlist entries

PR: 221079
Submitted by: Masachika ISHIZUKA
Submitted by: ota@j.email.ne.jp
Reviewed by: cperciva

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

6 years agoDocument SA-17:06 through SA-17:11 and EN-17:07 through EN:17-10.
gjb [Wed, 29 Nov 2017 14:45:28 +0000 (14:45 +0000)]
Document SA-17:06 through SA-17:11 and EN-17:07 through EN:17-10.

Sponsored by: The FreeBSD Foundation

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

6 years agoAvoid out-of-bounds read.
delphij [Wed, 29 Nov 2017 05:35:28 +0000 (05:35 +0000)]
Avoid out-of-bounds read.

Security: CVE-2017-3735
Security: FreeBSD-SA-17:11.openssl
Obtained from: OpenSSL https://github.com/openssl/openssl/pull/4276

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

6 years agoMFC r325363:
asomers [Tue, 28 Nov 2017 19:57:16 +0000 (19:57 +0000)]
MFC r325363:

Fix mpr(4) panics caused by bad drive mapping tables

sys/dev/mpr/mpr_mapping.c
If _mapping_process_dpm_pg0 detects inconsistencies in the drive
mapping table (stored in the HBA's NVRAM), abort reading it and
continue to boot as if the mapping table were blank.  I observed
such inconsistencies in several HBAs after upgrading firmware from
14.0.0.0 to 15.0.0.0.

Reviewed by: slm
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D12901

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

6 years agoMFC r324805:
asomers [Tue, 28 Nov 2017 19:46:48 +0000 (19:46 +0000)]
MFC r324805:

Fix the mps(4) HISTORY section.

Looks like a copy/paste error from r302673.

Sponsored by: Spectra Logic Corp

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

6 years agoMFC r324221:
asomers [Tue, 28 Nov 2017 18:44:58 +0000 (18:44 +0000)]
MFC r324221:

MFV r316861: 6866 zdb -l should return non-zero if it fails to find any label

illumos/illumos-gate@64723e361134b2a2c45341334174f9d34002f8d0
https://github.com/illumos/illumos-gate/commit/64723e361134b2a2c45341334174f9d34002f8d0

https://www.illumos.org/issues/6866
  Need this for #6865.
  To be generally more scripting-friendly, overload this issue with adding '-q'
  option which should skip printing any label information.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

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

6 years agoMFC r324220:
asomers [Tue, 28 Nov 2017 18:35:58 +0000 (18:35 +0000)]
MFC r324220:

MFC r316858 7280 Allow changing global libzpool variables in zdb

7280 Allow changing global libzpool variables in zdb and ztest through command line

illumos/illumos-gate@0e60744c982adecd0a1f146f5637475d07ab1069
https://github.com/illumos/illumos-gate/commit/0e60744c982adecd0a1f146f5637475d07ab1069

https://www.illumos.org/issues/7280
  zdb is very handy for diagnosing problems with a pool in a safe and
  quick way. When a pool is in a bad shape, we often want to disable some
  fail-safes, or adjust some tunables in order to open them. In the
  kernel, this is done by changing public variables in mdb. The goal of
  this feature is to add the same capability to zdb and ztest, so that
  they can change libzpool tuneables from the command line.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>

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

6 years agoMFC r323813:
asomers [Tue, 28 Nov 2017 18:27:25 +0000 (18:27 +0000)]
MFC r323813:

MFV r323789:  8473 scrub does not detect errors on active spares

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

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

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

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

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

Sponsored by: Spectra Logic Corp

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

6 years agoMFC r323275, r324112
asomers [Tue, 28 Nov 2017 18:18:39 +0000 (18:18 +0000)]
MFC r323275, r324112

r323275:
Add basic tests for chflags, mkdir, rcp, and rmdir

Add basic command line parsing test coverage for these utilities.  The tests
were automatically generated based on their man pages.  These tests can be
expanded by hand for more thorough coverage.  The aim is to generate very
basic amount of test coverage for all the utilities in the base system.

Submitted by: shivansh
Reviewed by: asomers, brooks
Sponsored by: Google, Inc (GSoC 2017)
Differential Revision: https://reviews.freebsd.org/D12036

r324112:
Fix Makefile entries from r323275

Reported by: Vladimir Zakharov <zakharov.vv@gmail.com>
Reviewed by: ngie
X-MFC-With: 323275

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

6 years agoMFC r323194:
asomers [Tue, 28 Nov 2017 17:33:10 +0000 (17:33 +0000)]
MFC r323194:

Fix remounting ZFS filesystem with "zfs mount"

"zfs mount -o" passes a list of mount options directly to nmount(2) after
sanity checking them. In particular, zfs(8) will refuse to mount an already
existing file system unless "remount" is specified in the option list.
However, the "remount" option only exists in Illumos. FreeBSD's equivalent is
"update".

PR: 221985
Reviewed by: avg
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D12233

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

6 years agoMFC r323193:
asomers [Tue, 28 Nov 2017 17:30:25 +0000 (17:30 +0000)]
MFC r323193:

Honor all options of "zfs mount -o"

The existing code in zmount incorrectly parses the comma-delimited option
string. The result is that nmount only honors the last option. AFAICT the
parsing has been broken ever since ZFS's initial import in change 168404.

PR: 222078
Reviewed by: avg
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D12232

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

6 years agoMFC r322868:
asomers [Tue, 28 Nov 2017 17:27:00 +0000 (17:27 +0000)]
MFC r322868:

Fix 100.chksetuid and 110.neggrpperm for mountpoints with spaces

Also, fix them for mountpoints with tabs.

PR: 48325
Reported by: pguyot@kallisys.net, aaron@baugher.biz

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

6 years agoMFC r322546:
asomers [Tue, 28 Nov 2017 17:25:24 +0000 (17:25 +0000)]
MFC r322546:

Fix some ZFS debugging messages

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Be more careful about the use of provider names vs vdev names in
ZFS_LOG statements.

Sponsored by: Spectra Logic Corp

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

6 years agoMFC r301679 (partial), r309626, r326307
brooks [Tue, 28 Nov 2017 17:20:53 +0000 (17:20 +0000)]
MFC r301679 (partial), r309626, r326307

r301679:
Update to a June 8th snapshot of (un)vis form NetBSD.

This adds stravis() and some new encoding flags VIS_SHELL, VIS_META,
and VIS_NOLOCALE.

Assorted cleanups and fixes includeing a manpage typo[0].

NOTE: The symbol for stravis() is not exported in this merge.

r309626:
strvis(3): Avoid internal state of multibyte functions being tainted.

The mbtoc(3) and wctomb(3) functions use internal state which may be
tainted before the call to strvis(3).  In this context we can just use
the thread-safe versions mbrtoc(3) and wcrtomb(3) which allow passing
our own state from our stack.

r326307:
Update vis(3) the latest from NetBSD.

This adds VIS_DQ for compatiblity with OpenBSD.

Correct by an off-by-one error and a read buffer overflow detected using
asan.

PR: 210013 [0]
Submitted by: pi [0]

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

6 years agoMFC r326068:
gjb [Mon, 27 Nov 2017 15:12:14 +0000 (15:12 +0000)]
MFC r326068:
 Remove /etc/resolv.conf from virtual machine images, which is
 copied from the build host.  It is renamed to /etc/resolv.conf.bak
 on boot, so never used anyway.

Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r325755: Be more careful when doing calculation with request from
delphij [Mon, 27 Nov 2017 03:49:51 +0000 (03:49 +0000)]
MFC r325755: Be more careful when doing calculation with request from
userland.

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

6 years agoMFC r326028:
pfg [Mon, 27 Nov 2017 02:44:36 +0000 (02:44 +0000)]
MFC r326028:
iconv: Fix a pointer mismatch.

Catch NULL pointer earlier, check for empty string later.
Apparently this fixes a GCC8 warning.

Obtained from: NetBSD (CVS Rev. 1.21, 1.22) through DragonFlyBSD

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

6 years agoMFC r326098:
kib [Sat, 25 Nov 2017 14:51:40 +0000 (14:51 +0000)]
MFC r326098:
Return different error code for the guard page layout violation.

PR: 223732

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

6 years agoMFC r325552: s/NgSendMsgReply/NgSendReplyMsg/ in man to match the code.
mav [Wed, 22 Nov 2017 21:24:47 +0000 (21:24 +0000)]
MFC r325552: s/NgSendMsgReply/NgSendReplyMsg/ in man to match the code.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

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

6 years agoMFC r325532: Update arcmsr(4) to 1.40.00.01:
delphij [Wed, 22 Nov 2017 06:36:55 +0000 (06:36 +0000)]
MFC r325532: Update arcmsr(4) to 1.40.00.01:

 - Fix clear doorbell queue buffer for ADAPTER_TYPE_B
 - Fix release memory resource when detach device
 - Add support for ARC-1216, 1226 SAS 12Gb controllers
 - Declare some functions as static
 - Change checking dword read/write for IOP rqbuffer.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 <ching2048 areca com tw>

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

6 years agoMFC r299674 and r299931:
hselasky [Tue, 21 Nov 2017 10:19:33 +0000 (10:19 +0000)]
MFC r299674 and r299931:
Handle case of class being set, but not parent when calling
device_register() in the LinuxKPI.

Requested by: Chelsio
Sponsored by: Mellanox Technologies

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

6 years agoMFC r325373, r325861:
gjb [Mon, 20 Nov 2017 19:05:53 +0000 (19:05 +0000)]
MFC r325373, r325861:
 r325373 (manu):
  release/arm: Do not install ubldr

 r325861 (manu):
  release: Update u-boot and firmware file for RPI-B target.

Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r325950, r325953:
gjb [Mon, 20 Nov 2017 15:57:56 +0000 (15:57 +0000)]
MFC r325950, r325953:
 r325950:
  Sort variables for consistency.

 r325953:
  Add general configuration files used by release/release.sh for
  big-iron installation images.

Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r325863:
gjb [Mon, 20 Nov 2017 15:46:23 +0000 (15:46 +0000)]
MFC r325863:
 Only copy /etc/resolv.conf to ${CHROOTDIR} if /etc/resolv.conf does
 not already exist within ${CHROOTDIR}.  This allows re-using a build
 chroot with CHROOTBUILD_SKIP set to a non-empty value and CHROOTDIR
 set to '/' in release.conf.

Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r325436: RTF_PINNED for an interface
eugen [Mon, 20 Nov 2017 09:24:01 +0000 (09:24 +0000)]
MFC r325436: RTF_PINNED for an interface

  Allow a process to assign an IP address to local ppp interface
  even if kernel routing table already has a route to the address in question
  installed by some routing daemon (PR 223129).

  Also, allow loopback route deletion when stopping a VIMAGE jail (PR 222647).

PR: 222647, 223129
Reviewed by: gnn
Approved by: mav (mentor)
Differential Revision: https://reviews.freebsd.org/D12747

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

6 years agoMFC r325383:
delphij [Mon, 20 Nov 2017 06:49:05 +0000 (06:49 +0000)]
MFC r325383:

Avoid calling get_controller_count() until attaching, this would avoid
costly PCI config space operations that slows down systems without the
hardware.

Many thanks to HighPoint for continued support of FreeBSD!

Submitted by: Steve Chang
Reported by: cperciva

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

6 years agoMFC r325616:
hselasky [Fri, 17 Nov 2017 15:49:01 +0000 (15:49 +0000)]
MFC r325616:
Make sure sin_zero is zero in ibcore. Else socket address maching using
bcmp() might fail.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r325615:
hselasky [Fri, 17 Nov 2017 15:46:45 +0000 (15:46 +0000)]
MFC r325615:
Make sure the IPv6 scope ID gets zeroed when exchanging CMA messages in ibcore.
Else the IPv6 address matching might fail. This change adds support for both
embedded and non-embedded IPv6 scope IDs when passing a IPv6 link-local socket
address to RDMA. Prior to this change only global IPv6 addresses would work
with RDMA.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r325614:
hselasky [Fri, 17 Nov 2017 15:43:29 +0000 (15:43 +0000)]
MFC r325614:
Multiple fixes for using IPv6 link-local addresses with RDMA.

1) Fail to resolve RDMA address if rtalloc1() returns the loopback
device, lo0, as the gateway interface.

2) Use ip_dev_find() and ip6_dev_find() to lookup network interfaces
with matching IPv4 and IPv6 addresses, respectivly.

3) In addr_resolve() make sure the "ifa" pointer is always set, also when
the "ifp" is NULL. Else a NULL pointer access might happen trying to
read from the "ifa" pointer later on.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r325533:
hselasky [Fri, 17 Nov 2017 15:30:36 +0000 (15:30 +0000)]
MFC r325533:
Make the dma_alloc_coherent() function in the LinuxKPI NULL safe with regard
to the "dev" argument.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

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

6 years agoMFC r325610: MFV r325609: 7531 Assign correct flags to prefetched buffers
avg [Fri, 17 Nov 2017 10:13:24 +0000 (10:13 +0000)]
MFC r325610: MFV r325609: 7531 Assign correct flags to prefetched buffers

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

6 years agoMFC r325035: MFV r325013,r325034: 640 number_to_scaled_string is duplicated in severa...
avg [Thu, 16 Nov 2017 23:36:19 +0000 (23:36 +0000)]
MFC r325035: MFV r325013,r325034: 640 number_to_scaled_string is duplicated in several commands

FreeBSD note: of all libcmdutils functionality ZFS (and other illumos
contrib code) currently uses only nicenum() function (which is similar
to humanize_number but has some formatting differences).  For this
reason I decided to not port the whole library.  As a result, nicenum.c
from libcmdutils is compiled into libzfs and libzpool.  This is a bit
ugly, but works.  If one day we are forced to create libillumos, then
the file should be moved to that library.

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

6 years agoMFC r325228: vdev_geom_close: close errored consumer even if vdev_reopening is set
avg [Thu, 16 Nov 2017 23:02:04 +0000 (23:02 +0000)]
MFC r325228: vdev_geom_close: close errored consumer even if vdev_reopening is set

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

6 years agoMFC r325606: MFV r325605: 8713 Buffer overflow in dsl_dataset_name()
avg [Thu, 16 Nov 2017 22:47:41 +0000 (22:47 +0000)]
MFC r325606: MFV r325605: 8713 Buffer overflow in dsl_dataset_name()

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

6 years agoMFC r325227,r325272: geom_slice: do not destroy softc until providers are gone
avg [Thu, 16 Nov 2017 22:37:03 +0000 (22:37 +0000)]
MFC r325227,r325272: geom_slice: do not destroy softc until providers are gone

Note: there was a merge conflict, likely because of a missing MFC of an
earlier change.

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

6 years agoMFC 325039: Rework pass through changes in r305485 to be safer.
jhb [Thu, 16 Nov 2017 18:22:03 +0000 (18:22 +0000)]
MFC 325039: Rework pass through changes in r305485 to be safer.

Specifically, devices that do not support PCI-e FLR and were not
gracefully shutdown by the guest OS could continue to issue DMA
requests after the VM was terminated.  The changes in r305485 meant
that those DMA requests were completed against the host's memory which
could result in random memory corruption.  Instead, leave ppt devices
that are not attached to a VM disabled in the IOMMU and only restore
the devices to the host domain if the ppt(4) driver is detached from a
device.

As an added safety belt, disable busmastering for a pass-through device
when before adding it to the host domain during ppt(4) detach.

PR: 222937

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

6 years agoMFC r320252, r320686, r325769:
gjb [Thu, 16 Nov 2017 16:00:01 +0000 (16:00 +0000)]
MFC r320252, r320686, r325769:
 r320252:
  In release/release.sh:
  - Rename chroot_arm_armv6_build_release() to chroot_arm_build_release()
    and make it hardware agnostic (such as armv6 -vs- armv7 -vs- arm64).
  - Evaluate EMBEDDED_TARGET differently so release/tools/arm.subr can
    be used for arm/armv6 and arm64/aarch64.
  - Update comments and copyright.

  In release/tools/arm.subr:
  - In arm_create_disk(), change the default alignment from 63 to 512k,
    fixing a boot issue on arm64 and EFI. [1]
  - Update comments and copyright.

 r320686:
  Fix the ftp-stage target by loosening the constraints on the TARGET
  and TARGET_ARCH variables.

 r325769:
  Update the GUMSTIX image build to use arm/arm TARGET/TARGET_ARCH.
  Update the TARGET/TARGET_ARCH matching in release/release.sh and
  release/Makefile.mirrors for simplification.

Note: The RPI3.conf addition from r320252 is not included, as it is
not supported on 10-STABLE.  Additionally, arm64/aarch64 changes are
also excluded from this commit.

Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r325865
gordon [Wed, 15 Nov 2017 22:35:16 +0000 (22:35 +0000)]
MFC r325865

Properly bzero kldstat structure to prevent kernel information leak.

Security: FreeBSD-SA-17:10.kldstat
Security: CVE-2017-1088

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

6 years agoMFC r325737:
bapt [Wed, 15 Nov 2017 12:23:01 +0000 (12:23 +0000)]
MFC r325737:

Update to 2017.10.21

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

6 years agoMFC r325717:
bapt [Wed, 15 Nov 2017 12:21:06 +0000 (12:21 +0000)]
MFC r325717:

Remove __unused attributed on arguments that are actually used

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

6 years agoMFC r325716:
bapt [Wed, 15 Nov 2017 12:19:11 +0000 (12:19 +0000)]
MFC r325716:

Fix some nroff style issue

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

6 years agoFix breakage in r325799 that removed a bit of code by my mistake.
eugen [Tue, 14 Nov 2017 11:02:46 +0000 (11:02 +0000)]
Fix breakage in r325799 that removed a bit of code by my mistake.

Approved by: avg (mentor)

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

6 years agoMFH (r325010): don't bother verifying a password that we know is too long.
des [Tue, 14 Nov 2017 10:49:07 +0000 (10:49 +0000)]
MFH (r325010): don't bother verifying a password that we know is too long.

Reported by: jkim@
Security: CVE-2016-6210

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

6 years agoMFC r325559: ifconfig_<interface>_descr
eugen [Tue, 14 Nov 2017 09:31:56 +0000 (09:31 +0000)]
MFC r325559: ifconfig_<interface>_descr

Add suitable knob ifconfig_<interface>_descr for static interface description.
Document availability of interface descriptions within rc.conf(5).

Approved by: avg (mentor)

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

6 years agoMFC r297935:
jamie [Mon, 13 Nov 2017 23:21:17 +0000 (23:21 +0000)]
MFC r297935:

  Separate POSIX sem/shm objects in jails, by prepending the jail's path
  name to the object's "path".  While the objects don't have real path
  names, it's a filesystem-like namespace, which allows jails to be
  kept to their own space, but still allows the system / jail parent to
  access a jail's IPC.

MFC r297936:

  Separate POSIX mqueue objects in jails; actually, separate them by the
  jail's root, so jails that don't have their own filesystem directory
  also won't have their own mqueue namespace.

MFC r297976:

  Clean up some style(9) violations.

MFC r298567:

   Use the new PR_METHOD_REMOVE to clean up jail handling in POSIX
   message queues.

PR: 208082
Submitted by: delphij

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

6 years agoMFC r325671:
kib [Mon, 13 Nov 2017 09:10:17 +0000 (09:10 +0000)]
MFC r325671:
Check that the pmc index is less than the number of hardware PMCs,
instead of asserting the condition.

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

6 years agoMFC r324962 (by fsu@):
pfg [Mon, 13 Nov 2017 02:31:25 +0000 (02:31 +0000)]
MFC r324962 (by fsu@):

Set doreallocblks sysctl value to zero by default because of
possibility of filesystem corruption.

Fedor has found some weird behavior in his tests.

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

6 years agoMFC r325008
truckman [Sun, 12 Nov 2017 01:28:20 +0000 (01:28 +0000)]
MFC r325008

Fix Dummynet AQM packet marking function ecn_mark() and fq_codel /
fq_pie schedulers packet classification functions in layer2 (bridge mode).

Dummynet AQM packet marking function ecn_mark() and fq_codel/fq_pie
schedulers packet classification functions (fq_codel_classify_flow()
and fq_pie_classify_flow()) assume mbuf is pointing at L3 (IP)
packet. However, this assumption is incorrect if ipfw/dummynet is
used to manage layer2 traffic (bridge mode) since mbuf will point
at L2 frame.  This patch solves this problem by identifying the
source of the frame/packet (L2 or L3) and adding ETHER_HDR_LEN
offset when converting an mbuf pointer to ip pointer if the traffic
is from layer2.  More specifically, in dummynet packet tagging
function, tag_mbuf(), iphdr_off is set to ETHER_HDR_LEN if the
traffic is from layer2 and set to zero otherwise. Whenever an access
to IP header is required, mtodo(m, dn_tag_get(m)->iphdr_off) is
used instead of mtod(m, struct ip *) to correctly convert mbuf
pointer to ip pointer in both L2 and L3 traffic.

Submitted by: lstewart
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12506

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

6 years agoMFC r325567:
kib [Fri, 10 Nov 2017 12:31:58 +0000 (12:31 +0000)]
MFC r325567:
Zero whole struct ptrace_lwpinfo to not leak kernel stack data.

Security: CVE-2017-1086

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

6 years agoRemove the now obsolete "unify_tcp_port_space" ibcore module parameter.
hselasky [Thu, 9 Nov 2017 19:46:40 +0000 (19:46 +0000)]
Remove the now obsolete "unify_tcp_port_space" ibcore module parameter.
Missed as part of the MFC of r324792 in r325611.

This is a direct commit.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r325278:
hselasky [Thu, 9 Nov 2017 19:15:28 +0000 (19:15 +0000)]
MFC r325278:
Unconditionally include "opt_inet6.h" in the LinuxKPI.
This makes sure the INET6 macro gets properly defined,
also for kernel module builds.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r324792:
hselasky [Thu, 9 Nov 2017 19:00:11 +0000 (19:00 +0000)]
MFC r324792:
The remote DMA TCP portspace selector, RDMA_PS_TCP, is used for both
iWarp and RoCE in ibcore. The selection of RDMA_PS_TCP can not be used
to indicate iWarp protocol use. Backport the proper IB device
capabilities from Linux upstream to distinguish between iWarp and
RoCE. Only allocate the additional socket required for iWarp for RDMA
IDs when at least one iWarp device present. This resolves
interopability issues between iWarp and RoCE in ibcore

Reviewed by: np @
Differential Revision: https://reviews.freebsd.org/D12563
Sponsored by: Mellanox Technologies

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

6 years agoMFC r324490:
hselasky [Thu, 9 Nov 2017 17:51:55 +0000 (17:51 +0000)]
MFC r324490:
Add support for parsing and using IPv6 addresses in krping.

Sponsored by: Mellanox Technologies

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

6 years agoUse MAC-based GID format for the GID table entries in mlx5ib(4) to be
hselasky [Thu, 9 Nov 2017 17:02:20 +0000 (17:02 +0000)]
Use MAC-based GID format for the GID table entries in mlx5ib(4) to be
compatible with the ibcore module in FreeBSD 10-stable.

This fixes RDMA over VLAN, because the MAC-based GID format embeds
the VLAN ID into the GID itself and this is what ibcore expects when
requesting GID indexes from the GID cache.

RoCE V1.5 and V2 is not supported in 10-stable by mlx5ib(4).
This is a direct commit.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r325270:
kib [Wed, 8 Nov 2017 11:39:42 +0000 (11:39 +0000)]
MFC r325270:
Consistently ensure that we do not load MXCSR with reserved bits set.

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

6 years agoMFC r324757: remove spa_sync_on assert from spa_async_thread_vd
avg [Wed, 8 Nov 2017 09:35:06 +0000 (09:35 +0000)]
MFC r324757: remove spa_sync_on assert from spa_async_thread_vd

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

6 years agoMFC r325397:
pfg [Tue, 7 Nov 2017 14:28:10 +0000 (14:28 +0000)]
MFC r325397:
ANSI-fy exec_shell_imgact().

Fix a stray space while here.

PR: 223317

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

6 years agoMFC r325371
ken [Mon, 6 Nov 2017 20:08:02 +0000 (20:08 +0000)]
MFC r325371
  ------------------------------------------------------------------------
  r325371 | ken | 2017-11-03 15:04:22 -0600 (Fri, 03 Nov 2017) | 19 lines

  Add the LTO-8 Type M density code (0x5d, LTO-8M) to libmt and the
  mt(1) man page.

  LTO-8 Type M (also known as M8) is a pristine LTO-7 cartridge
  formatted in a LTO-8 drive in a new, higher density format.  It
  has a separate density code, and is only readable in an LTO-8
  drive.

  lib/libmt/mtlib.c:
   Add the LTO-8 Type M density code to the density table
   in libmt.

  usr.bin/mt/mt.1:
   Add the LTO-8 Type M density code to the density
   table in the mt(1) man page.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------

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

6 years agoMFC r325156:
gjb [Mon, 6 Nov 2017 18:07:23 +0000 (18:07 +0000)]
MFC r325156:
 Set a default hostname for virtual machine images.

Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r324212:
eugen [Mon, 6 Nov 2017 12:45:51 +0000 (12:45 +0000)]
MFC r324212:

  rsh: introduce new option -N disabling shutdown of socket sending path.

PR: 205144
Approved by: mav (mentor)

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

6 years agoMFC r324364: ftpd(8): fix user context handling
eugen [Mon, 6 Nov 2017 11:11:44 +0000 (11:11 +0000)]
MFC r324364: ftpd(8): fix user context handling

Apply authenticated user context after update of wtmp(5) at start of session,
so that ftpd process is not killed by kernel with SIGXFSZ when user has
"filesize" limit lower than size of system wtmp file. Same applies
to session finalization: revert to super-user context before update of wtmp.

If ftpd hits limit while writing a file at user request,
do not get killed with SIGXFSZ instantly but apparently ignore the signal,
process error and report it to the user, and continue with the session.

PR: 143570
Approved by: mav (mentor)

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

6 years agoMFC r324928:
ngie [Sun, 5 Nov 2017 22:36:32 +0000 (22:36 +0000)]
MFC r324928:

Remove dead stores

The return value of various snprintf calls was stored in `len` and not used
in many functions.

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

6 years agoMFC r324862:
ngie [Sun, 5 Nov 2017 22:34:27 +0000 (22:34 +0000)]
MFC r324862:

Clean up trailing whitespace in kdb_thr_ctx(..)

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

6 years agoMFC: r324639
rmacklem [Sun, 5 Nov 2017 20:28:28 +0000 (20:28 +0000)]
MFC: r324639
Fix the client IP address reported by nfsdumpstate for 64bit arch and NFSv4.1.

The client IP address was not being reported for some NFSv4 mounts by
nfsdumpstate. Upon investigation, two problems were found for mounts
using IPv4. One was that the code (originally written and tested on i386)
assumed that a "u_long" was a "uint32_t" and would exactly store an
IPv4 host address. Not correct for 64bit arches.
Also, for NFSv4.1 mounts, the field was not being filled in. This was
basically correct, because NFSv4.1 does not use a callback address.
However, it meant that nfsdumpstate could not report the client IP addr.
This patch should fix both of these issues.
For IPv6, the address will still not be reported. The original NFSv4 RFC
only specified IPv4 callback addresses. I think this has changed and, if so,
a future commit to fix reporting of IPv6 addresses will be needed.

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

6 years agoMFC: r324506
rmacklem [Sat, 4 Nov 2017 21:30:27 +0000 (21:30 +0000)]
MFC: r324506
Fix forced dismount when a pNFS mount is hung on a DS.

When a "pnfs" NFSv4.1 mount is hung because of an unresponsive DS,
a forced dismount wouldn't work, because the RPC socket for the DS
was not being closed. This patch fixes this.
This will only affect "pnfs" mounts where the pNFS server's DS
is unresponsive (crashed or network partitioned or...).
Found during testing of the pNFS server.

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

6 years agoMFC r325067:
pfg [Sat, 4 Nov 2017 14:56:58 +0000 (14:56 +0000)]
MFC r325067:
bsnmpd: Only refresh devtree if devd event is a new or removed device.

It makes sense to refresh the tree only when a device is inserted or
removed, otherwise bsnmpd needlessly wastes lots of CPU.

PR: 209368

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

6 years agoMFC r325066:
pfg [Sat, 4 Nov 2017 14:45:36 +0000 (14:45 +0000)]
MFC r325066:
Fix out-of-bounds read in libc/regex.

The bug is an out-of-bounds read detected with address sanitizer that
happens when 'sp' in p_b_coll_elems() includes NUL byte[s], e.g. if it's
equal to "GS\x00". In that case len will be equal to 4, and the
strncmp(cp->name, sp, len) call will succeed when cp->name is "GS" but the
cp->name[len] == '\0' comparison will cause the read to go out-of-bounds.

Checking the length using strlen() instead eliminates the issue.

The bug was found in LLVM with oss-fuzz:
https://reviews.llvm.org/D39380

Obtained from: Vlad Tsyrklevich through posting on openbsd-tech

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

6 years agoMFC r325030:
cy [Sat, 4 Nov 2017 05:17:03 +0000 (05:17 +0000)]
MFC r325030:

Remove redundant sys/cdefs.h include.

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

6 years agoMFC r324947:
ae [Tue, 31 Oct 2017 11:09:39 +0000 (11:09 +0000)]
MFC r324947:
  Add IPv6 support for O_TCPDATALEN opcode.

  PR: 222746

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

6 years agoMFC r324957: iscsi_shutdown_post: do nothing if panic-ing
avg [Tue, 31 Oct 2017 09:58:51 +0000 (09:58 +0000)]
MFC r324957: iscsi_shutdown_post: do nothing if panic-ing

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

6 years agoMFC r324694: never retry oustanding requests when terminating iscsi session
avg [Tue, 31 Oct 2017 09:57:10 +0000 (09:57 +0000)]
MFC r324694: never retry oustanding requests when terminating iscsi session

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

6 years agoMFC r324689: iscsi: do not hold the global lock while tearing down a session
avg [Tue, 31 Oct 2017 09:55:22 +0000 (09:55 +0000)]
MFC r324689: iscsi: do not hold the global lock while tearing down a session

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

6 years agoMFC r324620 (by fsu@):
pfg [Mon, 30 Oct 2017 20:31:48 +0000 (20:31 +0000)]
MFC r324620 (by fsu@):
Add extended attributes support to fuse kernel module.

Author:         ken
Reviewed by:    cem, pfg (mentor)
Approved by:    pfg (mentor)

Differential Revision: https://reviews.freebsd.org/D12485

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

6 years agoMFC r325059: import tzdata 2017c
philip [Mon, 30 Oct 2017 15:57:48 +0000 (15:57 +0000)]
MFC r325059: import tzdata 2017c

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

6 years agoMFC r324348: MFV r316934: 7340 receive manual origin should override automatic origin
avg [Mon, 30 Oct 2017 10:35:45 +0000 (10:35 +0000)]
MFC r324348: MFV r316934: 7340 receive manual origin should override automatic origin

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

6 years agoMFC r324347: MFV r316933: 5142 libzfs support raidz root pool (loader project)
avg [Mon, 30 Oct 2017 10:33:05 +0000 (10:33 +0000)]
MFC r324347: MFV r316933: 5142 libzfs support raidz root pool (loader project)

FreeBSD note: we have long supported this feature, this commit only
removes a small difference in libzfs.

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

6 years agoMFC r324346: MFV r316931: 6268 zfs diff confused by moving a file to another directory
avg [Mon, 30 Oct 2017 10:29:31 +0000 (10:29 +0000)]
MFC r324346: MFV r316931: 6268 zfs diff confused by moving a file to another directory

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

6 years agoMFC r324345: MFV r316877: 7571 non-present readonly numeric ZFS props do not have...
avg [Mon, 30 Oct 2017 09:01:52 +0000 (09:01 +0000)]
MFC r324345: MFV r316877: 7571 non-present readonly numeric ZFS props do not have default valu

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

6 years agoMFC r324853:
kib [Sun, 29 Oct 2017 09:48:28 +0000 (09:48 +0000)]
MFC r324853:
Remove the support for mknod(S_IFMT), which created dummy vnodes with
VBAD type.

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

6 years agoSync (make same) the offsetof macro definition in include/ with the
cy [Sun, 29 Oct 2017 04:33:50 +0000 (04:33 +0000)]
Sync (make same) the offsetof macro definition in include/ with the
definition of the same in sys/sys/. The problem was discovered while
working on implementing a new C11 gets_s() for libc. (The new gets_s()
requires rsize_t found in include/stddef.h.) The solution to sync the two
definitions was suggested by ed@ while discussing D12667.

Suggested by: ed

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

6 years agoMFC 324721: Add references to sysrc(8) to SEE ALSO.
se [Sat, 28 Oct 2017 07:06:57 +0000 (07:06 +0000)]
MFC 324721: Add references to sysrc(8) to SEE ALSO.
MFC 324823: Mention sysrc(8) as scripting interface for config files.

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

6 years agoMFC r324809:
markj [Fri, 27 Oct 2017 14:23:53 +0000 (14:23 +0000)]
MFC r324809:
Free the right address range if kmem_back() fails in memguard_alloc().

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

6 years agoMFC r324704:
markj [Wed, 25 Oct 2017 01:07:12 +0000 (01:07 +0000)]
MFC r324704:
Fix a racy VI_DOOMED check in MNT_VNODE_FOREACH_ALL().

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

6 years agoInstall missing test input file missed in r324418
ngie [Sun, 22 Oct 2017 21:11:59 +0000 (21:11 +0000)]
Install missing test input file missed in r324418

While here, remove an unnecessary PACKAGE variable definition (only applies to
^/stable/11+).

This is a direct commit to ^/stable/10

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

6 years agoMFC r324672:
avos [Sat, 21 Oct 2017 10:48:06 +0000 (10:48 +0000)]
MFC r324672:
ifnet(9): split ifc_alloc_unit() (should simplify code flow)

Allocate smallest unit number from pool via ifc_alloc_unit_next()
and exact unit number (if available) via ifc_alloc_unit_specific().

While here, address possible deadlock (mentioned in PR).

PR: 217401
Differential Revision: https://reviews.freebsd.org/D12551

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

6 years agoMFC r324445:
hselasky [Fri, 20 Oct 2017 10:06:02 +0000 (10:06 +0000)]
MFC r324445:
When showing the sleepqueues from the in-kernel debugger,
properly dump all the sleepqueues and not just the first one

History:
It appears that in the commit which introduced the code,
r165272, the array indexes of "sq_blocked[0]" and "td_name[i]"
were interchanged. In r180927 "td_name[i]" was corrected to
"td_name[0]", but "sq_blocked[0]" was left unchanged.

PR: 222624
Discussed with: kmacy @
Sponsored by: Mellanox Technologies

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

6 years agoMFC r323916:
hselasky [Fri, 20 Oct 2017 10:01:21 +0000 (10:01 +0000)]
MFC r323916:
Extend sysctl description for hw.usb.disable_enumeration .

PR: 222505
Submitted by: Julian H. Stacey <jhs@berklix.com>
Sponsored by: Mellanox Technologies

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

6 years agoMFC r324595: ANSIfy vm_kern.c
emaste [Fri, 20 Oct 2017 00:38:01 +0000 (00:38 +0000)]
MFC r324595: ANSIfy vm_kern.c

PR: 222673
Submitted by: ota@j.email.ne.jp

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

6 years agoMFC r324594: truss: mention 'H' in usage
emaste [Fri, 20 Oct 2017 00:33:49 +0000 (00:33 +0000)]
MFC r324594: truss: mention 'H' in usage

r298427 (MFC of r295930) introduced the 'H' option to display thread
IDs, but did not add the option to usage().

PR: 222837
Submitted by: Oliver Kiddle <okiddle@yahoo.co.uk>

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