]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r308197: MFV r308196:
delphij [Wed, 2 Nov 2016 06:58:47 +0000 (06:58 +0000)]
MFC r308197: MFV r308196:

Fix OpenSSH remote Denial of Service vulnerability.

Security: CVE-2016-8858

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

7 years agoMFC 291665,291685,291856,297467,302110,302263: Add support for VIs.
jhb [Mon, 31 Oct 2016 22:45:11 +0000 (22:45 +0000)]
MFC 291665,291685,291856,297467,302110,302263: Add support for VIs.

291665:
Add support for configuring additional virtual interfaces (VIs) on a port.

Each virtual interface has its own MAC address, queues, and statistics.
The dedicated netmap interfaces (ncxgbeX / ncxlX) were already implemented
as additional VIs on each port.  This change allows additional non-netmap
interfaces to be configured on each port.  Additional virtual interfaces
use the naming scheme vcxgbeX or vcxlX.

Additional VIs are enabled by setting the hw.cxgbe.num_vis tunable to a
value greater than 1 before loading the cxgbe(4) or cxl(4) driver.
NB: The first VI on each port is the "main" interface (cxgbeX or cxlX).

T4/T5 NICs provide a limited number of MAC addresses for each physical port.
As a result, a maximum of six VIs can be configured on each port (including
the "main" interface and the netmap interface when netmap is enabled).

One user-visible result is that when netmap is enabled, packets received
or transmitted via the netmap interface are no longer counted in the stats
for the "main" interface, but are not accounted to the netmap interface.

The netmap interfaces now also have a new-bus device and export various
information sysctl nodes via dev.n(cxgbe|cxl).X.

The cxgbetool 'clearstats' command clears the stats for all VIs on the
specified port along with the port's stats.  There is currently no way to
clear the stats of an individual VI.

291685:
Fix build for !TCP_OFFLOAD case.

291856:
Fix RSS build.

297467:
Remove #ifdef's from various structures used in the cxgbe/cxl driver.

This provides a constant ABI and layout for these structures (especially
struct adapter) avoiding some foot shooting.

302110:
cxgbe(4): Merge netmap support from the ncxgbe/ncxl interfaces to the
vcxgbe/vcxl interfaces and retire the 'n' interfaces.  The main
cxgbe/cxl interfaces and tunables related to them are not affected by
any of this and will continue to operate as usual.

The driver used to create an additional 'n' interface for every
cxgbe/cxl interface if "device netmap" was in the kernel.  The 'n'
interface shared the wire with the main interface but was otherwise
autonomous (with its own MAC address, etc.).  It did not have normal
tx/rx but had a specialized netmap-only data path.  r291665 added
another set of virtual interfaces (the 'v' interfaces) to the driver.
These had normal tx/rx but no netmap support.

This revision consolidates the features of both the interfaces into the
'v' interface which now has a normal data path, TOE support, and native
netmap support.  The 'v' interfaces need to be created explicitly with
the hw.cxgbe.num_vis tunable.  This means "device netmap" will not
result in the automatic creation of any virtual interfaces.

The following tunables can be used to override the default number of
queues allocated for each 'v' interface.  nofld* = 0 will disable TOE on
the virtual interface and nnm* = 0 to will disable native netmap
support.

# number of normal NIC queues
hw.cxgbe.ntxq_vi
hw.cxgbe.nrxq_vi

# number of TOE queues
hw.cxgbe.nofldtxq_vi
hw.cxgbe.nofldrxq_vi

# number of netmap queues
hw.cxgbe.nnmtxq_vi
hw.cxgbe.nnmrxq_vi

hw.cxgbe.nnm{t,r}xq{10,1}g tunables have been removed.

--- tl;dr version ---
The workflow for netmap on cxgbe starting with FreeBSD 11 is:
1) "device netmap" in the kernel config.
2) "hw.cxgbe.num_vis=2" in loader.conf.  num_vis > 2 is ok too, you'll
end up with multiple autonomous netmap-capable interfaces for every
port.
3) "dmesg | grep vcxl | grep netmap" to verify that the interface has
netmap queues.
4) Use any of the 'v' interfaces for netmap.  pkt-gen -i vcxl<n>... .
One major improvement is that the netmap interface has a normal data
path as expected.
5) Just ignore the cxl interfaces if you want to use netmap only.  No
need to bring them up.  The vcxl interfaces are completely independent
and everything should just work.
---------------------

302263:
cxgbe(4):  Do not bring up an interface when IFCAP_TOE is enabled on it.
The interface's queues are functional after VI_INIT_DONE (which is short
of interface-up) and that's all that's needed for t4_tom to communicate
with the chip.

Relnotes: yes
Sponsored by: Chelsio Communications

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

7 years agoMFC 289401: cxgbe(4): support for the kernel RSS option.
jhb [Mon, 31 Oct 2016 22:03:44 +0000 (22:03 +0000)]
MFC 289401: cxgbe(4): support for the kernel RSS option.

You need PCBGROUP and RSS in the kernel config to use this.

Note: Since RSS is not present in 10.x this is mostly a no-op and is
stubbed out by removing the #include of opt_rss.h.  This is merged
primarily to reduce conflicts in future merges, however it does add a
couple of diagnostic messages related to RSS buckets vs RX queue
counts.

Discussed with: np
Sponsored by: Chelsio Communications

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

7 years agoMFC r307861:
mm [Mon, 31 Oct 2016 21:57:43 +0000 (21:57 +0000)]
MFC r307861:
Update libarchive to 3.2.2

Most of the post-3.2.1 fixes have already been merged. This update contains
just the version bump and some fixes to the test framework.

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

7 years agoPull in r228705 from upstream libc++ trunk (by Eric Fiselier):
dim [Mon, 31 Oct 2016 18:37:44 +0000 (18:37 +0000)]
Pull in r228705 from upstream libc++ trunk (by Eric Fiselier):

  [libcxx] Fix PR 22468 - std::function<void()> does not accept
  non-void-returning functions

  Summary:
  The bug can be found here: https://llvm.org/bugs/show_bug.cgi?id=22468

  `__invoke_void_return_wrapper` is needed to properly handle calling a
  function that returns a value but where the std::function return type
  is void. Without this '-Wsystem-headers' will cause
  `function::operator()(...)` to not compile.

  Reviewers: eugenis, K-ballo, mclow.lists

  Reviewed By: mclow.lists

  Subscribers: cfe-commits

  Differential Revision: https://reviews.llvm.org/D7444

This should allow newer versions of the graphics/aseprite port to
compile without modification.

Direct commit to stable/10, since stable/11 and head already have this
change.

Reported by: yuri@rawbw.com
PR: 213773

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

7 years agoMFC r307785:
bapt [Mon, 31 Oct 2016 18:29:16 +0000 (18:29 +0000)]
MFC r307785:

Import pci_vendors 2016.10.20

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

7 years agoMFC 282039: Don't use ifm_data. It was used only for self checking debug.
jhb [Mon, 31 Oct 2016 18:12:07 +0000 (18:12 +0000)]
MFC 282039: Don't use ifm_data.  It was used only for self checking debug.

Sponsored by: Chelsio Communications

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

7 years agoMFC r308038:
sbruno [Mon, 31 Oct 2016 16:48:16 +0000 (16:48 +0000)]
MFC r308038:

  The buffer address is always overwritten in the extended descriptor format,
  we have to refresh it ... always.  This fixes problems reported in NetMap
  with em(4) devices after conversion to extended descriptor format in
  svn r293331.

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

7 years agoDocument EN-16:17-18, SA-16:26-32
gjb [Mon, 31 Oct 2016 16:44:31 +0000 (16:44 +0000)]
Document EN-16:17-18, SA-16:26-32

Sponsored by: The FreeBSD Foundation

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

7 years agoMFC r307523: Make pass driver better support CAM_CDB_POINTER flag.
mav [Mon, 31 Oct 2016 07:21:37 +0000 (07:21 +0000)]
MFC r307523: Make pass driver better support CAM_CDB_POINTER flag.

Previously pass driver just ignored the flag, making random kernel code
access user-space pointer, sometime causing crashes even for correctly
written applications if user-level context was switched or swapped out.
This patch tries to copyin the CDB into kernel space to avoid it.

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

7 years agoMFC r307821:
kib [Sun, 30 Oct 2016 11:45:01 +0000 (11:45 +0000)]
MFC r307821:
Use proper type for local variable.

PR: 212520

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

7 years agoAdd posix_tnode to <search.h>.
ed [Sat, 29 Oct 2016 15:04:24 +0000 (15:04 +0000)]
Add posix_tnode to <search.h>.

In r307227 I've refactored the binary search tree functions to use the
posix_tnode type. As this change does not apply cleanly to this version
of FreeBSD, only make the change that matters: add the definition of the
newly introduced type.

This will ease source-level compatibility going forward.

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

7 years agoMFC r306456: Add #ifdef _KERNEL around send_holes_without_birth_time sysctl.
mav [Sat, 29 Oct 2016 08:57:35 +0000 (08:57 +0000)]
MFC r306456: Add #ifdef _KERNEL around send_holes_without_birth_time sysctl.

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

7 years agoMFC r306425: MFV r306423:
mav [Sat, 29 Oct 2016 08:56:43 +0000 (08:56 +0000)]
MFC r306425: MFV r306423:
7402 Create tunable to ignore hole_birth feature

Until we can resolve the numerous hole_birth bugs that have cropped up
recently, and come up with a way going forwards to protect users from
corruption, we should disable the hole_birth feature.  Using a tunable
allows those who are confident that their data is correct to continue to
take advantage of the feature.

Closes #188

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Author: Paul Dagnelie <pcd@delphix.com>

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

7 years agoMFC r306424: MFV r306422:
mav [Sat, 29 Oct 2016 08:54:18 +0000 (08:54 +0000)]
MFC r306424: MFV r306422:
7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedo
bjs

dsl_dataset_space is looking at the ds_bp's fill count while
dmu_objset_write_ready() is concurrently modifying it. This fix adds an
rrwlock to protect the ds_bp.

Closes #180

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Author: Paul Dagnelie <pcd@delphix.com>

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

7 years agoMFC r307507, r307509, r307515:
mav [Sat, 29 Oct 2016 08:48:01 +0000 (08:48 +0000)]
MFC r307507, r307509, r307515:
Consider device as clean even if SYNCHRONIZE CACHE failed.

If device reservation was preempted by other initiator, our sync request
will always fail.  Without this change CAM tried to sync cache on every
following device close, including numerous GEOM tasting opens/closes,
causing lots of useless noise in logs.

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

7 years agoMFC r307374: Add LU option to control reported provisioning type.
mav [Sat, 29 Oct 2016 08:45:39 +0000 (08:45 +0000)]
MFC r307374: Add LU option to control reported provisioning type.

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

7 years agoMFC r307350: Add LUN options to limit UNMAP and WRITE SAME sizes.
mav [Sat, 29 Oct 2016 08:45:06 +0000 (08:45 +0000)]
MFC r307350: Add LUN options to limit UNMAP and WRITE SAME sizes.

CTL itself has no limits on on UNMAP and WRITE SAME sizes.  But depending
on backends large requests may take too much time.  To avoid that new
configuration options allow to hint initiator maximal sizes it should not
exceed.

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

7 years agoMFC r304918: Decode some new ATA commands found in ACS-3.
mav [Sat, 29 Oct 2016 08:42:43 +0000 (08:42 +0000)]
MFC r304918: Decode some new ATA commands found in ACS-3.

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

7 years agoMFC 272079,272080: cxgbe/tom: Update for syncache_add locking changes.
jhb [Sat, 29 Oct 2016 00:16:43 +0000 (00:16 +0000)]
MFC 272079,272080: cxgbe/tom: Update for syncache_add locking changes.

272079:
cxgbe/tom:  Catch up with r271119, syncache_add doesn't need tcbinfo lock.

272080:
Update comment (missed this bit in r272079).

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

7 years agoMFC r307731: Add names for some DASP devices.
mav [Fri, 28 Oct 2016 19:46:08 +0000 (19:46 +0000)]
MFC r307731: Add names for some DASP devices.

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

7 years agoMFC r300881, r302058 (by asomers):
mav [Fri, 28 Oct 2016 18:25:32 +0000 (18:25 +0000)]
MFC r300881, r302058 (by asomers):
Avoid issuing spa config updates for physical path when not necessary

ZFS's configuration needs to be updated whenever the physical path for a
device changes, but not when a new device is introduced. This is because new
devices necessarily cause config updates, but only if they are actually
accepted into the pool.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
        Split vdev_geom_set_physpath out of vdev_geom_attrchanged.  When
        setting the vdev's physical path, only request a config update if
        the physical path has changed.  Don't request it when opening a
        device for the first time, because the config sync will happen
        anyway upstack.

sys/geom/geom_dev.c
        Split g_dev_set_physpath and g_dev_set_media out of
        g_dev_attrchanged

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

7 years agoMFC r300059 (by asomers): Speed up vdev_geom_open_by_guids
mav [Fri, 28 Oct 2016 18:24:05 +0000 (18:24 +0000)]
MFC r300059 (by asomers): Speed up vdev_geom_open_by_guids

Speedup is hard to measure because the only time vdev_geom_open_by_guids
gets called on many drives at the same time is during boot. But with
vdev_geom_open hacked to always call vdev_geom_open_by_guids, operations
like "zpool create" speed up by 65%.

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

        * Read all of a vdev's labels in parallel instead of sequentially.
        * In vdev_geom_read_config, don't read the entire label, including
          the uberblock.  That's a waste of RAM.  Just read the vdev config
          nvlist.  Reduces the IO and RAM involved with tasting from 1MB to
          448KB.

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

7 years agoMFC r298814 (by asomers): Fix a use-after-free when "zpool import" fails
mav [Fri, 28 Oct 2016 18:22:00 +0000 (18:22 +0000)]
MFC r298814 (by asomers): Fix a use-after-free when "zpool import" fails

clear vd->vdev_tsd in vdev_geom_close_locked instead of vdev_geom_detach.
In the latter function, it would fail to happen in certain circumstances
where cp->private was unset.  Ideally, the latter should never happen, but
it can happen when vdev open fails, or where spares are involved.

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

7 years agoMFC r298786 (by asomers):
mav [Fri, 28 Oct 2016 18:20:14 +0000 (18:20 +0000)]
MFC r298786 (by asomers):
Refactor vdev_geom_attach and friends to reduce code duplication

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
        Move checks for provider's sectorsize and mediasize into a single
        location in vdev_geom_attach. Remove the zfs::vdev::taste class;
        it's ok to use the regular vdev class for tasting. Consolidate guid
        checks into a single location in vdev_attach_ok. Consolidate some
        error handling code from vdev_geom_attach into vdev_geom_detach,
        closing a resource leak of geom consumers in the process.

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

7 years agoMFC r294329 (by asomers): Disallow zvol-backed ZFS pools
mav [Fri, 28 Oct 2016 18:18:53 +0000 (18:18 +0000)]
MFC r294329 (by asomers): Disallow zvol-backed ZFS pools

Using zvols as backing devices for ZFS pools is fraught with panics and
deadlocks. For example, attempting to online a missing device in the
presence of a zvol can cause a panic when vdev_geom tastes the zvol.  Better
to completely disable vdev_geom from ever opening a zvol. The solution
relies on setting a thread-local variable during vdev_geom_open, and
returning EOPNOTSUPP during zvol_open if that thread-local variable is set.

Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its intent
was to prevent a recursive mutex acquisition panic. However, the new check
for the thread-local variable also fixes that problem.

Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason, this
function was set to panic. But it can occur that a device disappears during
tasting, and it causes no problems to ignore this departure.

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

7 years agobump __FreeBSD_version for libzfs_core.h
avg [Fri, 28 Oct 2016 15:20:43 +0000 (15:20 +0000)]
bump __FreeBSD_version for libzfs_core.h

Direct commit.

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

7 years agoMFC r307141: remove a few stray spaces from sys/param.h
avg [Fri, 28 Oct 2016 15:18:11 +0000 (15:18 +0000)]
MFC r307141: remove a few stray spaces from sys/param.h

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

7 years agoMFC r307131: install header files required development with libzfs_core
avg [Fri, 28 Oct 2016 15:15:51 +0000 (15:15 +0000)]
MFC r307131: install header files required development with libzfs_core

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

7 years agoMFC r307130: smbus: allow child devices to be added via hints
avg [Fri, 28 Oct 2016 15:02:24 +0000 (15:02 +0000)]
MFC r307130: smbus: allow child devices to be added via hints

Note that r281985 has never been MFC-ed to this branch, so this
commit contains a couple of bits from that commit.

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

7 years agoMFC r306808:
kib [Fri, 28 Oct 2016 12:59:21 +0000 (12:59 +0000)]
MFC r306808:
Add verbosity around failed reboot(2) call.

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

7 years agoMFC r306807:
kib [Fri, 28 Oct 2016 12:58:40 +0000 (12:58 +0000)]
MFC r306807:
When making a pause after detecting hard kill of the single-user
shell, ensure that we do sleep for at least the specified time, in
presence of signals.

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

7 years agoMFC r307651:
hselasky [Fri, 28 Oct 2016 12:46:38 +0000 (12:46 +0000)]
MFC r307651:
Add support for adjusting the hardware buffering delay for USB audio.

Requested by: Goran Mekic <meka@tilda.center>

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

7 years agoMFC 303002: Include process IDs in core dumps.
jhb [Fri, 28 Oct 2016 03:54:19 +0000 (03:54 +0000)]
MFC 303002: Include process IDs in core dumps.

When threads were added to the kernel, the pr_pid member of the
NT_PRSTATUS note was repurposed to store LWP IDs instead of process
IDs.  However, the process ID was no longer recorded in core dumps.
This change adds a pr_pid field to prpsinfo (NT_PRSINFO).  Rather than
bumping the prpsinfo version number, note parsers can use the note's
payload size to determine if pr_pid is present.

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

7 years agoMFC r305539: work around AMD erratum 793 for family 16h, models 00h-0Fh
avg [Thu, 27 Oct 2016 07:57:43 +0000 (07:57 +0000)]
MFC r305539: work around AMD erratum 793 for family 16h, models 00h-0Fh

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

7 years agoMFC r306801: implement zfs_vptocnp() using z_parent property
avg [Thu, 27 Oct 2016 07:54:10 +0000 (07:54 +0000)]
MFC r306801: implement zfs_vptocnp() using z_parent property

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

7 years agoMFC r307578
davidcs [Wed, 26 Oct 2016 18:13:30 +0000 (18:13 +0000)]
MFC r307578
    1. Use taskqueue_create() instead of taskqueue_create_fast() for both
       fastpath and slowpath taskqueues.
    2. Service all transmits in taskqueue threads.
    3. additional stats counters for  keeping track of
     - bd availability
     - tx buf ring not emptied in the fp task queue.
       These are drained via timeout taskqueue.
     - tx attempts during link down.

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

7 years agoMFC r307132: Use copyout() instead of pointing sbuf to user-space buffer.
mav [Wed, 26 Oct 2016 07:45:48 +0000 (07:45 +0000)]
MFC r307132: Use copyout() instead of pointing sbuf to user-space buffer.

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

7 years agoMerge r307936:
glebius [Tue, 25 Oct 2016 17:16:08 +0000 (17:16 +0000)]
Merge r307936:
  The argument validation in r296956 was not enough to close all possible
  overflows in sysarch(2).

  Submitted by: Kun Yang <kun.yang chaitin.com>
  Patch by:     kib
  Security:     SA-16:15

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

7 years agoMFC r307783:
bapt [Tue, 25 Oct 2016 14:53:50 +0000 (14:53 +0000)]
MFC r307783:

Import tzdata 2016h

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

7 years agoMFC r307551:
jch [Tue, 25 Oct 2016 12:58:36 +0000 (12:58 +0000)]
MFC r307551:

Fix a double-free when an inp transitions to INP_TIMEWAIT state
after having been dropped.

This change enforces in_pcbdrop() logic in tcp_input():

"in_pcbdrop() is used by TCP to mark an inpcb as unused and avoid future packet
delivery or event notification when a socket remains open but TCP has closed."

PR: 203175
Reported by: Palle Girgensohn, Slawa Olhovchenkov
Tested by: Slawa Olhovchenkov
Reviewed by: Slawa Olhovchenkov
Approved by: gnn, Slawa Olhovchenkov
Differential Revision: https://reviews.freebsd.org/D8211
Sponsored by: Verisign, inc

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

7 years agoMFC r307522: makesyscalls.sh: remove trailing space on the "created from" line
emaste [Mon, 24 Oct 2016 01:22:01 +0000 (01:22 +0000)]
MFC r307522: makesyscalls.sh: remove trailing space on the "created from" line

In r10905 and r10906 makesyscalls was modified to avoid emitting a
literal $Id$ string in the generated file, with:

    gsub("[$]Id: ", "", $0)
    gsub(" [$]", "", $0)

Then r11294 added some functionality and also tried to address the $Id$
problem in a different way, by removing every $:

    sed -e 's/\$//g ...

This rendered the gsub infeffective. The gsub was later updated to
track the $Id$ -> $FreeBSD$ switch, even though it did not do anything.

Revert the addition of the s/\$//g, and update the gsub to keep the
resulting format the same.

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

7 years agoMFC r307520: elfdump: correct DT_AUXILIARY / DT_USED / DT_FILTER definitions
emaste [Mon, 24 Oct 2016 00:46:38 +0000 (00:46 +0000)]
MFC r307520: elfdump: correct DT_AUXILIARY / DT_USED / DT_FILTER definitions

r109332 introduced these three as DT_SUNW_*. Update to the correct
names already used elsewhere in FreeBSD and the Sun "Linker and
Libraries Guide"

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

7 years agoSpelling, title.
grog [Sat, 22 Oct 2016 22:36:32 +0000 (22:36 +0000)]
Spelling, title.

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

7 years agoMFC r307215:
mm [Sat, 22 Oct 2016 21:41:28 +0000 (21:41 +0000)]
MFC r307215:
Sync libarchive with vendor. Style and tests fixes.

Important vendor bugfixes (relevant to FreeBSD):
#801: FreeBSD Coverity report: resource leak in libarchive/tar/test/main.c

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

7 years agoMFC r307236:
markj [Fri, 21 Oct 2016 17:43:25 +0000 (17:43 +0000)]
MFC r307236:
Plug a vnode lock leak in vm_fault_hold().

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

7 years agoMFC r306276, but don't remove findwin95
asomers [Fri, 21 Oct 2016 17:39:05 +0000 (17:39 +0000)]
MFC r306276, but don't remove findwin95

Mount msdosfs with longnames support by default.

The old behavior depended on the FAT version and on what files were in the
root directory. "mount_msdosfs -o shortnames" is still supported.

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

7 years agoMFstable/11 r307721:
ngie [Fri, 21 Oct 2016 08:36:30 +0000 (08:36 +0000)]
MFstable/11 r307721:

MFC r306029:

Use SRCTOP instead of the longhand version for defining the path to contrib/atf

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

7 years agoMFstable/11 r307718:
ngie [Fri, 21 Oct 2016 08:32:26 +0000 (08:32 +0000)]
MFstable/11 r307718:

MFC r305920:

Remove spurious newlines from atf_tc_fail calls

This changes the results from broken (incorrect) to failed (correct) on
i386

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

7 years agoMFstable/11 r307715:
ngie [Fri, 21 Oct 2016 08:25:03 +0000 (08:25 +0000)]
MFstable/11 r307715:

MFC r305916,r305918:

r305916:

Make sure $TMPDIR is created with 0755 permissions

This is required to ensure that the temporary script can be executed,
as the default mode is apparently too restrictive

r305918:

Only chmod $TMPDIR if it's not /tmp

This is a safety belt to ensure that the /tmp sticky bit stuff doesn't
get whacked by accident if someone runs the script outright

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

7 years agoMFC r307218:
kib [Thu, 20 Oct 2016 13:12:19 +0000 (13:12 +0000)]
MFC r307218:
Fix a race in vm_page_busy_sleep(9).

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

7 years agoMFC r306762: Fix possible geom destruction before final provider close.
mav [Thu, 20 Oct 2016 09:06:39 +0000 (09:06 +0000)]
MFC r306762: Fix possible geom destruction before final provider close.

Introduce internal counter to track opens.  Using provider's counters is
not very successfull after calling g_wither_provider().

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

7 years agoMFC r306571:
markj [Wed, 19 Oct 2016 17:31:59 +0000 (17:31 +0000)]
MFC r306571:
rtsold: Log messages about unexpected RAs at LOG_DEBUG.

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

7 years agoMFC r306332:
pfg [Wed, 19 Oct 2016 16:40:38 +0000 (16:40 +0000)]
MFC r306332:
btree(3): don't shortcut closing if the metadata is dirty.

Obtained from: NetBSD (from krb5 tree)

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

7 years agoMFC r307145:
emaste [Wed, 19 Oct 2016 13:42:40 +0000 (13:42 +0000)]
MFC r307145:

Use M_WAITOK in PIO_KEYMAP ioctl

The malloc return value is not checked.

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

7 years agoMFC 307261
sephe [Wed, 19 Oct 2016 08:45:19 +0000 (08:45 +0000)]
MFC 307261

    hyperv/stor: Fix off-by-one bug; this brings back TRIM support.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Reported by:    Lili Deng <v-lide microsoft com>
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8238

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

7 years agoMFC 307078
sephe [Wed, 19 Oct 2016 08:43:20 +0000 (08:43 +0000)]
MFC 307078

    ifnet: Use if_link_state snapshot to invoke ifnet_link_event

    So that everyone in this task have consistent view of link state.

    Reviewed by:    ae
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8214

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

7 years agoMFC 307012,307013,307262
sephe [Wed, 19 Oct 2016 08:40:24 +0000 (08:40 +0000)]
MFC 307012,307013,307262

307012
    hyperv/vmbus: Allow driver to inject synchronous task into channel taskq.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8208

307013
    hyperv/hn: Rework link status support.

    This is the preamble for network device SR-IOV and
    NDIS_STATUS_NETWORK_CHANGE handling.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8209

307262
    hyperv/hn: Management parts always need suspend and resume.

    Sponsored by:   Microsoft

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

7 years agoMFC 306936-306939
sephe [Wed, 19 Oct 2016 08:32:24 +0000 (08:32 +0000)]
MFC 306936-306939

306936
    hyperv/hn: Fix checksum offload settings

    The _correct_ way to identify the supported checksum offloading and
    TSO parameters is to query OID_TCP_OFFLOAD_HARDWARE_CAPABILITIES.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8088

306937
    hyperv/hn: Fix if_hw_tsomax setup.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8089

306938
    hyperv/hn: Generalize RSS capabilities query.

    - Support NDIS < 6.30.
    - Stringent response checks.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8090

306939
    hyperv/hn: Suffix NDIS offload size with NDIS version.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8091

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

7 years agoMFC r306346
vangyzen [Wed, 19 Oct 2016 00:14:22 +0000 (00:14 +0000)]
MFC r306346

Make no assertions about mutex state when the scheduler is stopped.

This changes the assert path to match the lock and unlock paths.

Sponsored by: Dell EMC

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

7 years agoMFC r307064:
kib [Tue, 18 Oct 2016 10:33:28 +0000 (10:33 +0000)]
MFC r307064:
When downgrading exclusively busied page to shared-busy state, wakeup
waiters.

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

7 years agoMFC 304438:
mckusick [Mon, 17 Oct 2016 22:34:41 +0000 (22:34 +0000)]
MFC 304438:

Fsck_ufs was using an int rather than a ufs2_daddr_t to store the
alternate superblock location when given in the -b option.

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

7 years agoMFC r304230:
mckusick [Mon, 17 Oct 2016 21:49:54 +0000 (21:49 +0000)]
MFC r304230:
Add two new macros, SLIST_CONCAT and LIST_CONCAT.

MFC r304239:
Bug 211013 reports that a write error to a UFS filesystem running
with softupdates panics the kernel.

PR: 211013

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

7 years agoMFC r306790
davidcs [Mon, 17 Oct 2016 18:07:51 +0000 (18:07 +0000)]
MFC r306790
  Add support for adding up to 64 Multicast addresses with a single
  mailbox command

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

7 years agoMFC r306840:
sevan [Sun, 16 Oct 2016 23:54:40 +0000 (23:54 +0000)]
MFC r306840:
Sort SEE ALSO section sequentially.
Highlighted by mandoc -Tlint

PR: 212440
Approved by: imp
Differential Revision: https://reviews.freebsd.org/D8192

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

7 years agoMFC r306736:
sevan [Sun, 16 Oct 2016 23:53:10 +0000 (23:53 +0000)]
MFC r306736:
Add history section to nos-tun(8)

PR:             212545
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

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

7 years agoMFC r306735:
sevan [Sun, 16 Oct 2016 23:50:09 +0000 (23:50 +0000)]
MFC r306735:
Add history section to natd(8)
Fix back sentence raised by igor.

PR: 212544
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

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

7 years agoMFC r306734:
sevan [Sun, 16 Oct 2016 23:49:09 +0000 (23:49 +0000)]
MFC r306734:
Add history section to fsck_ffs(8)
Move sentence to a new line as advised by igor.

PR:             212474
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

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

7 years agoMFC r306732:
sevan [Sun, 16 Oct 2016 23:44:02 +0000 (23:44 +0000)]
MFC r306732:
Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.
5 Installation notes [2].
I was unable to pin point the exact version of Mach the fdisk utility appeared as I could not find documentation
 older than version 2.5 & no source code or repo history.
fdisk utility appears as a separate utility[3] in v2.5. Due to this, I have avoided stating the exact version fd
isk first appeared in Mach.
Add authors section.

[1] https://groups.google.com/d/topic/comp.unix.bsd/Hhi45vAHxDg/discussion
[2] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_install.ps
[3] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_manpages.ps

PR:             212470
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

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

7 years agoMFC r306731:
sevan [Sun, 16 Oct 2016 23:39:15 +0000 (23:39 +0000)]
MFC r306731:
Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.5 Installation notes [2].
I was unable to pin point the exact version of Mach the fdisk utility appeared as I could not find documentation older than version 2.5 & no source code or repo history.
fdisk utility appears as a separate utility[3] in v2.5. Due to this, I have avoided stating the exact version fdisk first appeared in Mach.
Add authors section.
Make correction pointed by igor
[1] https://groups.google.com/d/topic/comp.unix.bsd/Hhi45vAHxDg/discussion
[2] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_install.ps
[3] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_manpages.ps
PR: 212469
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

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

7 years agoMFC r306728:
sevan [Sun, 16 Oct 2016 23:37:15 +0000 (23:37 +0000)]
MFC r306728:
Add history section for devfs(8)
Move sentence to a new line as advised by igor.

PR:             212441
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

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

7 years agoMFC r306727:
sevan [Sun, 16 Oct 2016 23:34:21 +0000 (23:34 +0000)]
MFC r306727:
Add history section for devd(8)
Move sentence to a new line as advised by igor

PR: 212439
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

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

7 years agoMFC r306725:
sevan [Sun, 16 Oct 2016 23:32:35 +0000 (23:32 +0000)]
MFC r306725:
Add history section for clri(8)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/man/man8/clri.8

PR:             212438
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

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

7 years agoMFC r306724:
sevan [Sun, 16 Oct 2016 23:28:58 +0000 (23:28 +0000)]
MFC r306724:
Add history section for bsdlabel(8)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Tahoe/usr/man/cat8/disklabel.0
Remove tab after space, highlighted by igor

PR: 212436
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

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

7 years agoMFC r306723:
sevan [Sun, 16 Oct 2016 23:27:03 +0000 (23:27 +0000)]
MFC r306723:
Add history section for atmconfig(8)

PR:             212415
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

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

7 years agoMFC r306722:
sevan [Sun, 16 Oct 2016 23:18:35 +0000 (23:18 +0000)]
MFC r306722:
Add history section for test(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/test.c

PR: 211789
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

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

7 years agoMFC r306721:
sevan [Sun, 16 Oct 2016 23:16:05 +0000 (23:16 +0000)]
MFC r306721:
Add history section for stty(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man1/stty.1

PR:             211788
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

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

7 years agoMFC r306720:
sevan [Sun, 16 Oct 2016 23:13:27 +0000 (23:13 +0000)]
MFC r306720:
Add history section of pwd(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s2/pwd.c

PR: 211787
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

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

7 years agoMFC r306719:
sevan [Sun, 16 Oct 2016 23:12:07 +0000 (23:12 +0000)]
MFC r306719:
Document origins of expr & authors
http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/usr/man/man1/expr.1

PR:             173979
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

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

7 years agoMFC r306718:
sevan [Sun, 16 Oct 2016 23:09:04 +0000 (23:09 +0000)]
MFC r306718:
Add history section for echo(1)
Sourced using the draft copy of the second edition manual
http://www.tuhs.org/Archive/PDP-11/Distributions/research/1972_stuff/unix_2nd_edition_manual.pdf

PR: 211785
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

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

7 years agoMFC r306615:
sevan [Sun, 16 Oct 2016 22:52:05 +0000 (22:52 +0000)]
MFC r306615:
sconfig appeared in FreeBSD 5.2.

PR:             212550
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8105

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

7 years agoMFC r306614:
sevan [Sun, 16 Oct 2016 22:33:03 +0000 (22:33 +0000)]
MFC r306614:
Note the version PF first appeared in FreeBSD & from which version it was ported from.
Address the contractions raised by igor.

PR: 212574
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8105

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

7 years agoMFC r306613:
sevan [Sun, 16 Oct 2016 22:31:51 +0000 (22:31 +0000)]
MFC r306613:
Note the change of name in FreeBSD 5.0.

PR:             212542
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8105

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

7 years agoMFC r306612:
sevan [Sun, 16 Oct 2016 22:27:16 +0000 (22:27 +0000)]
MFC r306612:
Note the name change from mount_null to mount_nullfs in FreeBSD 5.0.

PR:             212541
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8105

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

7 years agoMFC r306611:
sevan [Sun, 16 Oct 2016 22:22:46 +0000 (22:22 +0000)]
MFC r306611:
Amend history to mention predecessor originated from 386BSD[1] & current implementation from NetBSD[2].
Reword history since the utility was renamed once more in FreeBSD 5.0.
Separate out author & historical information regarding character code conversion.
Add AUTHORS section.

[1] https://groups.google.com/forum/#!search/mount_pcfs.c/comp.unix.bsd/9qhH0v1tZm0/inlPnXZj_2sJ
[2] http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/mount_msdos/mount_msdos.c?rev=1.6&content-type=text/x-cvsweb-markup

PR: 212536
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8105

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

7 years agoMFC r267667:
sevan [Sun, 16 Oct 2016 22:02:50 +0000 (22:02 +0000)]
MFC r267667:
use .Mt to mark up email addresses consistently (part1)

PR: 191174
Submitted by: Franco Fichtner  <franco at lastsummer.de>

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

7 years agoMFC r282970: Close some potential races around socket start/close.
mav [Sat, 15 Oct 2016 17:39:40 +0000 (17:39 +0000)]
MFC r282970: Close some potential races around socket start/close.

There are some reports about panics on ic->ic_socket NULL derefence.
This kind of races is the only way I can imagine it to happen.

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

7 years agoMFC r307038
arybchik [Sat, 15 Oct 2016 13:45:12 +0000 (13:45 +0000)]
MFC r307038

sfxge(4): update external port mapping for Medford

Extend the mapping table for external port numbering to support port modes
which output to the second external port only. Where supported, map from
the current port mode rather than inferring from all the available modes.
Updated comments for clarity.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r306944
arybchik [Sat, 15 Oct 2016 13:44:13 +0000 (13:44 +0000)]
MFC r306944

sfxge(4): sync tlv_layout.h with firmwaresrc and update port-mode
definition use

It fixes driver attach issue to a new firmware which reports a new
port-modes.

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r306853
bapt [Sat, 15 Oct 2016 12:41:41 +0000 (12:41 +0000)]
MFC r306853

Import tzdata 2016g

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

7 years agoMFC r306852
bapt [Sat, 15 Oct 2016 12:38:21 +0000 (12:38 +0000)]
MFC r306852

Incorporate a change from OpenBSD by millert@OpenBSD.org

Don't warn about valid time zone abbreviations.  POSIX
through 2000 says that an abbreviation cannot start with ':', and
cannot contain ',', '-', '+', NUL, or a digit.  POSIX from 2001
on changes this rule to say that an abbreviation can contain only
'-', '+', and alphanumeric characters from the portable character
set in the current locale.  To be portable to both sets of rules,
an abbreviation must therefore use only ASCII letters."  Adapted
from tzcode2015f.

This is needed to be able to update tzdata to a newer version

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

7 years agoMFC r297289, r300542, r306854
bapt [Sat, 15 Oct 2016 12:28:14 +0000 (12:28 +0000)]
MFC r297289, r300542, r306854

Update pci_vendors to 2016-10-03

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

7 years agoBump __FreeBSD_version for todays ZFS merges.
mav [Fri, 14 Oct 2016 18:43:17 +0000 (18:43 +0000)]
Bump __FreeBSD_version for todays ZFS merges.

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

7 years agoMFC r305563: MFV r305562: 7259 DS_FIELD_LARGE_BLOCKS is unused
mav [Fri, 14 Oct 2016 07:47:07 +0000 (07:47 +0000)]
MFC r305563: MFV r305562: 7259 DS_FIELD_LARGE_BLOCKS is unused

The DS_FIELD_LARGE_BLOCKS macro has been unused since the integration of
this patch:

    commit ca0cc3918a1789fa839194af2a9245f801a06b1a
    Author: Matthew Ahrens <mahrens@delphix.com>
    Date:   Fri Jul 24 09:53:55 2015 -0700

        5959 clean up per-dataset feature count code
        Reviewed by: Toomas Soome <tsoome@me.com>
        Reviewed by: George Wilson <george@delphix.com>
        Reviewed by: Alex Reece <alex@delphix.com>
        Approved by: Richard Lowe <richlowe@richlowe.net>

This patch simply removes this macro from dsl_dataset.h.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Author: Matthew Ahrens <mahrens@delphix.com>

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

7 years agoMFC r305561: MFV r305560:
mav [Fri, 14 Oct 2016 07:45:10 +0000 (07:45 +0000)]
MFC r305561: MFV r305560:
7278 tuning zfs_arc_max does not impact arc_c_min

When changing zfs_arc_max (e.g. as zdb does), it may be set to less
than the default arc_c_min. arc_c_min should decrease to not be more than
arc_c_max, but it doesn't; therefore tuning of arc_c_max is ineffective.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Author: Matthew Ahrens <mahrens@delphix.com>

openzfs/openzfs@608764beadaf4bb71c5d8fe1818e8392ac66a61b

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

7 years agoMFC r305456 (by avg): fix zfs pool creation accidentally broken by r305331
mav [Fri, 14 Oct 2016 07:43:28 +0000 (07:43 +0000)]
MFC r305456 (by avg): fix zfs pool creation accidentally broken by r305331

The upstream change introduced a new load state, SPA_LOAD_CREATE,
and vdev_geom code needs to be aware of it.

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

7 years agoMFC r305342: Missed FreeBSD-specific piece of r305338.
mav [Fri, 14 Oct 2016 07:41:44 +0000 (07:41 +0000)]
MFC r305342: Missed FreeBSD-specific piece of r305338.

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

7 years agoMFC r305340: MFC r305337:
mav [Fri, 14 Oct 2016 07:40:20 +0000 (07:40 +0000)]
MFC r305340: MFC r305337:
7004 dmu_tx_hold_zap() does dnode_hold() 7x on same object

Using a benchmark which has 32 threads creating 2 million files in the
same directory, on a machine with 16 CPU cores, I observed poor
performance. I noticed that dmu_tx_hold_zap() was using about 30% of
all CPU, and doing dnode_hold() 7 times on the same object (the ZAP
object that is being held).

dmu_tx_hold_zap() keeps a hold on the dnode_t the entire time it is
running, in dmu_tx_hold_t:txh_dnode, so it would be nice to use the
dnode_t that we already have in hand, rather than repeatedly calling
dnode_hold(). To do this, we need to pass the dnode_t down through
all the intermediate calls that dmu_tx_hold_zap() makes, making these
routines take the dnode_t* rather than an objset_t* and a uint64_t
object number. In particular, the following routines will need to have
analogous *_by_dnode() variants created:

dmu_buf_hold_noread()
dmu_buf_hold()
zap_lookup()
zap_lookup_norm()
zap_count_write()
zap_lockdir()
zap_count_write()

This can improve performance on the benchmark described above by 100%,
from 30,000 file creations per second to 60,000. (This improvement is on
top of that provided by working around the object allocation issue. Peak
performance of ~90,000 creations per second was observed with 8 CPUs;
adding CPUs past that decreased performance due to lock contention.) The
CPU used by dmu_tx_hold_zap() was reduced by 88%, from 340 CPU-seconds
to 40 CPU-seconds.

Sponsored by: Intel Corp.

Closes #109

Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Ned Bass <bass6@llnl.gov>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Author: Matthew Ahrens <mahrens@delphix.com>

openzfs/openzfs@d3e523d489a169ab36f9ec1b2a111a60a5563a9f

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

7 years agoMFC r305339: MFV r305336: 7247 zfs receive of deduplicated stream fails
mav [Fri, 14 Oct 2016 07:37:08 +0000 (07:37 +0000)]
MFC r305339: MFV r305336: 7247 zfs receive of deduplicated stream fails

This resolves two 'zfs recv' issues. First, when receiving into an
existing filesystem, a snapshot created during the receive process is
not added to the guid->dataset map for the stream, resulting in failed
lookups for deduped streams when a WRITE_BYREF record refers to a
snapshot received earlier in the stream. Second, the newly created
snapshot was also not set properly, referencing the snapshot before the
new receiving dataset rather than the existing filesystem.

Closes #159

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Author: Chris Williamson <chris.williamson@delphix.com>

openzfs/openzfs@b09697c8c18be68abfe538de9809938239402ae8

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

7 years agoMFC r305338: MFV r305335: 7003 zap_lockdir() should tag hold
mav [Fri, 14 Oct 2016 07:35:43 +0000 (07:35 +0000)]
MFC r305338: MFV r305335: 7003 zap_lockdir() should tag hold

zap_lockdir() / zap_unlockdir() should take a "void *tag" argument which
tags the hold on the zap. This will help diagnose programming errors
which misuse the hold on the ZAP.

Sponsored by: Intel Corp.

Closes #108

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Author: Matthew Ahrens <mahrens@delphix.com>

openzfs/openzfs@0780b3eab5a2c13e04328b39ecd2a6d0d3c4f7cb

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