]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
6 years agoMFC r324312: fix the misleading log facility used in devd/zfs.conf
avg [Thu, 19 Oct 2017 07:23:47 +0000 (07:23 +0000)]
MFC r324312: fix the misleading log facility used in devd/zfs.conf

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

6 years agoMFC r324309: remove heuristic error detection from ddi_strto*()
avg [Thu, 19 Oct 2017 07:21:45 +0000 (07:21 +0000)]
MFC r324309: remove heuristic error detection from ddi_strto*()

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

6 years agoUpdate wpa_supplicant/hostapd for 2017-01 vulnerability release.
gordon [Thu, 19 Oct 2017 03:18:22 +0000 (03:18 +0000)]
Update wpa_supplicant/hostapd for 2017-01 vulnerability release.

Note this is a different patchset than what was applied to head and
stable/11 due to the much older version of wpa_supplicant/hostapd in
stable/10.

hostapd: Avoid key reinstallation in FT handshake
Prevent reinstallation of an already in-use group key
Extend protection of GTK/IGTK reinstallation of WNM-Sleep Mode cases
Fix TK configuration to the driver in EAPOL-Key 3/4 retry case
Prevent installation of an all-zero TK
Fix PTK rekeying to generate a new ANonce
TDLS: Reject TPK-TK reconfiguration
WNM: Ignore Key Data in WNM Sleep Mode Response frame if no PMF in use
WNM: Ignore WNM-Sleep Mode Response if WNM-Sleep Mode has not been used
WNM: Ignore WNM-Sleep Mode Response without pending request
FT: Do not allow multiple Reassociation Response frames
TDLS: Ignore incoming TDLS Setup Response retries

Submitted by: jhb
Obtained from:        https://w1.fi/security/2017-01/ (against later version)
Security:     FreeBSD-SA-17:07
Security:     CERT VU#228519
Security:     CVE-2017-13077
Security:     CVE-2017-13078
Security:     CVE-2017-13079
Security:     CVE-2017-13080
Security:     CVE-2017-13081
Security:     CVE-2017-13082
Security:     CVE-2017-13086
Security:     CVE-2017-13087
Security:     CVE-2017-13088
Differential Revision: https://reviews.freebsd.org/D12724

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

6 years agoMFC r324497:
ngie [Tue, 17 Oct 2017 15:53:19 +0000 (15:53 +0000)]
MFC r324497:

Mute gcc warning about p not being possibly initialized

I'm running into this warning on a tinderbox run with gcc 4.2.1 with mips and
powerpc.

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

6 years agoMFC r324478:
ngie [Tue, 17 Oct 2017 15:49:36 +0000 (15:49 +0000)]
MFC r324478:

Check the exit code from fsck_ffs instead of relying on MODIFIED being in the output

^/head@r323923 changed when MODIFIED is printed at exit. It's better to follow the
documented way of determining whether or not a filesystem is clean per fsck_ffs, i.e.,
ensure that the exit code is either 0 or 7.

The pass/fail determination is brittle prior to this commit, and ^/head@r323923 made
the issue apparent -- thus this needs to be fixed independent of ^/head@r323923.

PR: 222780
MFC with: r323923

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

6 years agoMFC r289568, r300676, r300677, r300719, r300720 and r300721:
hselasky [Tue, 17 Oct 2017 11:20:32 +0000 (11:20 +0000)]
MFC r289568, r300676, r300677, r300719, r300720 and r300721:
Implement LinuxKPI module parameters as SYSCTLs.

The bool module parameter is no longer supported, because there is no
equivalent in FreeBSD 10-stable. These are converted into "int" type.

There are two macros available which control the behaviour of the
LinuxKPI module parameters:

- LINUXKPI_PARAM_PARENT allows the consumer to set the SYSCTL parent
where the modules parameters will be created.

- LINUXKPI_PARAM_PREFIX defines a parameter name prefix, which is
  added to all created module parameters.

The LinuxKPI module parameters also have a permissions value.
If any write bits are set we are allowed to modify the module
parameter runtime. Reflect this when creating the static SYSCTL
nodes.

The module_param_call() function is no longer supported.

Sponsored by: Mellanox Technologies

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

6 years agoMFC of 324456.
mckusick [Mon, 16 Oct 2017 21:55:31 +0000 (21:55 +0000)]
MFC of 324456.

Do not report filesystem as modified if only timestamp updated in superblock.

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

6 years agoMFC r321256:
brooks [Sun, 15 Oct 2017 22:45:25 +0000 (22:45 +0000)]
MFC r321256:

Include ARCH_FLAGS in CFLAGS when building modules.

Without this change, modules will match the default compiler
configuration which may not be the same as the kernel values.

Reviewed by: imp
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11633

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

6 years agoMFC r320999:
brooks [Sun, 15 Oct 2017 22:39:31 +0000 (22:39 +0000)]
MFC r320999:

Add 32-bit compat for kinfo_proc's ki_tdaddr.

This appears to have been an oversight in r213536.

Reviewed by: markj
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11521

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

6 years agoMFC r324243:
brooks [Sat, 14 Oct 2017 16:49:39 +0000 (16:49 +0000)]
MFC r324243:

Remove an unneeded and incorrect memset().

On Variant I TLS architectures (aarch64, arm, mips, powerpc, and riscv)
the __libc_allocate_tls function allocates thread local storage memory
with calloc(). It then copies initialization data over the portions with
non-zero initial values. Before this change it would then pointlessly
zero the already zeroed remainder of the storage. Unfortunately the
calculation was wrong and it would zero TLS_TCB_SIZE (2*sizeof(void *))
additional bytes.

In practice, this overflow only matters if the TLS segment is sized such
that calloc() allocates less than TLS_TCB_SIZE extra memory. Even
then, the likely result will be zeroing part of the next bucket. This
coupled with the impact being confined to Tier II platforms means there
will be no security advisory for this issue.

Reviewed by: kib, dfr
Discussed with: security-officer (delphij)
Found by: CHERI
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D12547

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

6 years agoMFC 324039: Don't defer wakeup()s for completed journal workitems.
jhb [Fri, 13 Oct 2017 22:40:57 +0000 (22:40 +0000)]
MFC 324039: Don't defer wakeup()s for completed journal workitems.

Normally wakeups() are performed for completed softupdates work items
in workitem_free() before the underlying memory is free()'d.
complete_jseg() was clearing the "wakeup needed" flag in work items to
defer the wakeup until the end of each loop iteration.  However, this
resulted in the item being free'd before it's address was used with
wakeup().  As a result, another part of the kernel could allocate this
memory from malloc() and use it as a wait channel for a different
"event" with a different lock.  This triggered an assertion failure
when the lock passed to sleepq_add() did not match the existing lock
associated with the sleep queue.  Fix this by removing the code to
defer the wakeup in complete_jseg() allowing the wakeup to occur
slightly earlier in workitem_free() before free() is called.

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

6 years agoMFC 324073: Use UMA_ALIGNOF() for name cache UMA zones.
jhb [Fri, 13 Oct 2017 21:58:44 +0000 (21:58 +0000)]
MFC 324073: Use UMA_ALIGNOF() for name cache UMA zones.

This fixes kernel crashes due to misaligned accesses to the 64-bit
time_t embedded in struct namecache_ts in MIPS n32 kernels.

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

6 years agoMFC 324072: Add UMA_ALIGNOF().
jhb [Fri, 13 Oct 2017 17:11:08 +0000 (17:11 +0000)]
MFC 324072: Add UMA_ALIGNOF().

This is a wrapper around _Alignof() that sets the alignment for a zone
to the alignment required by a given type.  This allows the compiler to
determine the proper alignment rather than having the programmer try to
guess.

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

6 years agoMFC r323612: gmirror: treat ENXIO as disk disconnect, not media error
avg [Fri, 13 Oct 2017 09:14:05 +0000 (09:14 +0000)]
MFC r323612: gmirror: treat ENXIO as disk disconnect, not media error

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

6 years agoMFC r323528: MFV r323527: 5815 libzpool's panic function doesn't set global panicstr
avg [Fri, 13 Oct 2017 09:11:24 +0000 (09:11 +0000)]
MFC r323528: MFV r323527: 5815 libzpool's panic function doesn't set global panicstr

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

6 years agoMFC r323525: MFV r323523: 8331 zfs_unshare returns wrong error code for smb unshare...
avg [Fri, 13 Oct 2017 09:07:58 +0000 (09:07 +0000)]
MFC r323525: MFV r323523: 8331 zfs_unshare returns wrong error code for smb unshare failure

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

6 years agoMFC r323524: MFV r316932: 6280 libzfs: unshare_one() could fail with EZFS_SHARENFSFAILED
avg [Fri, 13 Oct 2017 09:05:20 +0000 (09:05 +0000)]
MFC r323524: MFV r316932: 6280 libzfs: unshare_one() could fail with EZFS_SHARENFSFAILED

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

6 years agoMFC 324517
sephe [Fri, 13 Oct 2017 02:29:43 +0000 (02:29 +0000)]
MFC 324517

    hyperv/hn: Enable transparent VF by default.

    Sponsored by:   Microsoft

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

6 years agoMFC 324489,324516
sephe [Fri, 13 Oct 2017 02:26:39 +0000 (02:26 +0000)]
MFC 324489,324516

324489
    hyperv/hn: Workaround erroneous hash type observed on WS2016.

    Background:
    - UDP 4-tuple hash type is unconditionally enabled in Hyper-V on WS2016,
      which is _not_ affected by NDIS_OBJTYPE_RSS_PARAMS.
    - Non-fragment UDP/IPv4 datagrams' hash type is delivered to VM as
      TCP_IPV4.

    Currently this erroneous behavior only applies to WS2016/Windows10.

    Force l3/l4 protocol check, if the RXed packet's hash type is TCP_IPV4,
    and the Hyper-V is running on WS2016/Windows10.  If the RXed packet is
    UDP datagram, adjust mbuf hash type to UDP_IPV4.

    Sponsored by:   Microsoft

324516
    hyperv/hn: Workaround erroneous hash type observed on WS2016 for VF.

    The background was described in r324489.

    Sponsored by:   Microsoft

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

6 years agoMFC 324488
sephe [Fri, 13 Oct 2017 02:16:35 +0000 (02:16 +0000)]
MFC 324488

    hyperv/vmbus: Expose Hyper-V major version.

    Sponsored by:   Microsoft

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

6 years agoMFC 324487
sephe [Fri, 13 Oct 2017 02:01:03 +0000 (02:01 +0000)]
MFC 324487

    hyperv/vmbus: Add tunable to pin/unpin event tasks.

    Event tasks are pinned to their respective CPU by default, in the same
    fashion as they were.

    Unpin the event tasks by setting hw.vmbus.pin_evttask to 0, if certain
    CPUs serve special purpose.

    Sponsored by:   Microsoft

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

6 years agoMFC: r324074
rmacklem [Wed, 11 Oct 2017 23:42:29 +0000 (23:42 +0000)]
MFC: r324074
Fix a memory leak that occurred in the pNFS client.

When a "pnfs" NFSv4.1 mount was unmounted, it didn't free up the layouts
and deviceinfo structures. This leak only affects "pnfs" mounts and only
when the mount is umounted.
Found while testing the pNFS Flexible File layout client code.

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

6 years agoMFC: r323978
rmacklem [Wed, 11 Oct 2017 23:33:50 +0000 (23:33 +0000)]
MFC: r323978
Change a panic to an error return.

There was a panic() in the NFS server's write operation that didn't
need to be a panic() and could just be an error return.
This patch makes that change.
Found by code inspection during development of the pNFS service.

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

6 years agoMFC: r323689
rmacklem [Wed, 11 Oct 2017 23:21:24 +0000 (23:21 +0000)]
MFC: r323689
Fix bogus FREAD with NFSV4OPEN_ACCESSREAD. No functional change.

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

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

6 years agoMFC r315404:
hselasky [Wed, 11 Oct 2017 10:56:59 +0000 (10:56 +0000)]
MFC r315404:
Add basic support for VIMAGE to the LinuxKPI and ibcore.

Support is implemented by mapping Linux's "struct net" into FreeBSD's
"struct vnet". Currently only vnet0 is supported by ibcore.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r315405, r323351 and r323364:
hselasky [Wed, 11 Oct 2017 10:20:53 +0000 (10:20 +0000)]
MFC r315405, r323351 and r323364:
Add helper function similar to ip_dev_find() to the LinuxKPI to lookup
a network device by its IPv6 address in the given VNET.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r324202:
hselasky [Wed, 11 Oct 2017 10:04:17 +0000 (10:04 +0000)]
MFC r324202:
Make sure the doorbell lock is valid for the i386 version
of the mlx5en(4) driver.

Tested by: gallatin @
Sponsored by: Mellanox Technologies

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

6 years agoMFC 324050
sephe [Wed, 11 Oct 2017 06:28:46 +0000 (06:28 +0000)]
MFC 324050

    tcp: Don't "negotiate" MSS.

    _NO_ OSes actually "negotiate" MSS.

    RFC 879:
    "... This Maximum Segment Size (MSS) announcement (often mistakenly
    called a negotiation) ..."

    This negotiation behaviour was introduced 11 years ago by r159955
    without any explaination about why FreeBSD had to "negotiate" MSS:

        In syncache_respond() do not reply with a MSS that is larger than what
        the peer announced to us but make it at least tcp_minmss in size.

        Sponsored by:   TCP/IP Optimization Fundraise 2005

    The tcp_minmss behaviour is still kept.

    Syncookie fix was prodded by tuexen, who also helped to test this
    patch w/ packetdrill.

    Reviewed by:    tuexen, karels, bz (previous version)
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D12430

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

6 years agoMFC r324249, 324260, and 324277
cy [Wed, 11 Oct 2017 05:07:37 +0000 (05:07 +0000)]
MFC r324249, 324260, and 324277

Clarify the wording describing the stayopen flag and style fixes.

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

6 years agoMFC r323945 and 323962
cy [Wed, 11 Oct 2017 05:02:36 +0000 (05:02 +0000)]
MFC r323945 and 323962

Fix misspellings, typos and /* border misalignments.

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

6 years agoMFC r322368, r322371:
pfg [Tue, 10 Oct 2017 21:04:40 +0000 (21:04 +0000)]
MFC r322368, r322371:
fnmatch(3): improve POSIX conformance.

In a recent interpretation[1], "\\" shall return a non-zero value
(indicating either no match or an error).

The fix involves a change over r254091 and now the behavior matches the
Sun/IBM/HP closed source implementations and also likely musl libc.

Submitted by: Joerg Schilling <joerg at schily.net>

[1] http://austingroupbugs.net/view.php?id=806

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

6 years agoMFC 324049,324077
sephe [Tue, 10 Oct 2017 03:40:38 +0000 (03:40 +0000)]
MFC 324049,324077

324049
    hyperv/hn: Fix UDP checksum offload issue in Azure.

    UDP checksum offload does not work in Azure if following conditions are
    met:
    - sizeof(IP hdr + UDP hdr + payload) > 1420.
    - IP_DF is not set in IP hdr

    Use software checksum for UDP datagrams falling into this category.

    Add two tunables to disable UDP/IPv4 and UDP/IPv6 checksum offload, in
    case something unexpected happened.

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

324077
    hyperv/hn: Unbreak i386 building.

    Reported by:    cy
    Sponsored by:   Microsoft

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

6 years agoMFC 324048
sephe [Tue, 10 Oct 2017 03:35:24 +0000 (03:35 +0000)]
MFC 324048

    hyperv/hn: Set tcp header offset for CSUM/LSO offloading.

    No observable effect; better safe than sorry.

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

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

6 years agoMFC 323728,323729
sephe [Tue, 10 Oct 2017 03:29:36 +0000 (03:29 +0000)]
MFC 323728,323729

323728
    hyperv/hn: Fix MTU setting

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

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

323729
    hyperv/hn: Incease max supported MTU

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

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

6 years agoMFC 323727,324316
sephe [Tue, 10 Oct 2017 03:21:17 +0000 (03:21 +0000)]
MFC 323727,324316

323727
    hyperv/hn: Apply VF's RSS setting

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

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

324316
    hyperv/hn: Fix options RSS building

    Reported by:    np
    Sponsored by:   Microsoft

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

6 years agoMFC 323176
sephe [Tue, 10 Oct 2017 03:02:54 +0000 (03:02 +0000)]
MFC 323176

    hyperv/hn: Log RSS capabilities mask.

    This helps to detect when UDP hash types can be supported.

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

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

6 years agoMFC 323175
sephe [Tue, 10 Oct 2017 02:57:30 +0000 (02:57 +0000)]
MFC 323175

    hyperv/hn: Implement SIOCGIFRSS{KEY,HASH}.

    The conditional compiling in the review request is removed, since
    these IOCTLs will be available in stable/10 and stable/11.

    Reviewed by:    gallatin
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D12175

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

6 years agoMFC 323170
sephe [Tue, 10 Oct 2017 02:35:04 +0000 (02:35 +0000)]
MFC 323170

    if: Add ioctls to get RSS key and hash type/function.

    It will be needed by hn(4) to configure its RSS key and hash
    type/function in the transparent VF mode in order to match VF's
    RSS settings. The description of the transparent VF mode and
    the RSS hash value issue are here:
    https://svnweb.freebsd.org/base?view=revision&revision=322299
    https://svnweb.freebsd.org/base?view=revision&revision=322485

    These are generic enough to promise two independent IOCs instead
    of abusing SIOCGDRVSPEC.

    Setting RSS key and hash type/function is a different story,
    which probably requires more discussion.

    Comment about UDP_{IPV4,IPV6,IPV6_EX} were only in the patch
    in the review request; these hash types are standardized now.

    Reviewed by:    gallatin
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D12174

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

6 years agoMFC 322488
sephe [Tue, 10 Oct 2017 02:22:34 +0000 (02:22 +0000)]
MFC 322488

    hyperv: Update copyright for the files changed in 2017

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

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

6 years agoMFH r324148:
mm [Sun, 8 Oct 2017 20:55:45 +0000 (20:55 +0000)]
MFH r324148:
Sync libarchive with vendor.

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

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

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

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

MFC r322633,r324143:

r322633:

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

r324143:

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

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

MFC with:       r322633

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

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

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

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

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

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

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

Submitted by:Anand.Khoje@cavium.com

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

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

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

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

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

Respect MK_TCSH with build-tools and native-xtools

This helps reduce the WORLDTMP footprint slightly.

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

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

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

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

I accidentally used the wrong commit message

Reported by: rgrimes

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

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

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

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

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

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

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

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

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

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

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

Approved by: re (implicit)

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

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

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

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

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

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

6 years agoMFC r323873, r324081: Unprotected modification of ng_iface(4)
eugen [Sun, 1 Oct 2017 19:40:29 +0000 (19:40 +0000)]
MFC r323873, r324081: Unprotected modification of ng_iface(4)
private data leads to kernel panic. Fix a race with per-node
read-mostly lock and refcounting for a hook.

PR: 220076
Tested by: peixoto.cassiano
Approved by: mav (mentor)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12435

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

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

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

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

Fix WARNS

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

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

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

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

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

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

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

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

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

Respect MK_TCSH with build-tools and native-xtools

This helps reduce the WORLDTMP footprint slightly.

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

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

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

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

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

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

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

Delete trailing whitespace

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

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

Standardize on SRCTOP instead of .CURDIR-relative paths

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

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

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

Sponsored by: Chelsio Communications

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

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

bridge: Set module version

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

PR:             220860
Submitted by:   Eugene Grosbein <eugen@freebsd.org>

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

6 years agoMFC r323824
davidcs [Tue, 26 Sep 2017 21:18:43 +0000 (21:18 +0000)]
MFC r323824
    1. ql_hw.c:
     In ql_hw_send() return EINVAL when TSO framelength exceeds max
     supported length by HW.(davidcs)
    2. ql_os.c:
     In qla_send() call bus_dmamap_unload before freeing mbuf or
     recreating dmmamap.(davidcs)
     In qla_fp_taskqueue() Add additional checks for IFF_DRV_RUNNING
     Fix qla_clear_tx_buf() call bus_dmamap_sync() before freeing
     mbuf.

Submitted by: David.Bachu@netapp.com

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

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

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

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

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

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

Sponsored by: Panzura

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

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

Sponsored by: Panzura

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

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

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

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

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

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

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

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

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

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

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

'obj' is not initialized here.

Sponsored by: DARPA / AFRL

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

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

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

MFC: r285289

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

MFC: r285297

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

MFC: r298332

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

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

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

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

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

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

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

Don't use an apostrophe in a possesive pronoun.

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

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

Reset unsupported SFP tuneable back to original entry name.

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

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

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

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

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

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

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

PR: 217747
Reported by: PVS-Studio

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

6 years agoMFC r323812:
gjb [Wed, 20 Sep 2017 17:09:04 +0000 (17:09 +0000)]
MFC r323812:
 Bootstrap etcupdate(8) and mergemaster(8) databases when creating
 virtual machine images and embedded images, similar to what is
 done when extracting base.txz to the target root filesystem in
 a new installation.

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

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

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

PR: 221775
PR: 221328
Sponsored by: Mellanox Technologies

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

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

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

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

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

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

None of the tagged functions had unused parameters.

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

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

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

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

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

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

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

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

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

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

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

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

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

PR: 210721

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

PR: 220186

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

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

The motivation for this is two-fold.

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

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

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

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

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

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

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

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

Sponsored by: Panzura

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

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

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

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

Sponsored by: The FreeBSD Foundation

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

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

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

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

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

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

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

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

Update pci_vendors to 2017-09-01

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

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

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

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

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

Approved by: re (implicit)

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