]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
6 years agoMFH (r325010): don't bother verifying a password that we know is too long.
des [Tue, 14 Nov 2017 10:49:07 +0000 (10:49 +0000)]
MFH (r325010): don't bother verifying a password that we know is too long.

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

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

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

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

Approved by: avg (mentor)

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

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

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

MFC r297936:

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

MFC r297976:

  Clean up some style(9) violations.

MFC r298567:

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

PR: 208082
Submitted by: delphij

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

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

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

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

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

Fedor has found some weird behavior in his tests.

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

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

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

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

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

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

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

Security: CVE-2017-1086

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

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

This is a direct commit.

Sponsored by: Mellanox Technologies

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

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

Sponsored by: Mellanox Technologies

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

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

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

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

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

Sponsored by: Mellanox Technologies

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

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

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

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

Sponsored by: Mellanox Technologies

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

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

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

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

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

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

Fix a stray space while here.

PR: 223317

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

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

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

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

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

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

  Sponsored by: Spectra Logic

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

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

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

Sponsored by: The FreeBSD Foundation

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

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

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

PR: 205144
Approved by: mav (mentor)

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

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

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

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

PR: 143570
Approved by: mav (mentor)

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

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

Remove dead stores

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

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

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

Clean up trailing whitespace in kdb_thr_ctx(..)

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

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

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

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

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

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

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

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

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

PR: 209368

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

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

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

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

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

Obtained from: Vlad Tsyrklevich through posting on openbsd-tech

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

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

Remove redundant sys/cdefs.h include.

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

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

  PR: 222746

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Suggested by: ed

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

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

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

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

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

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

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

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

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

This is a direct commit to ^/stable/10

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

6 years agoMFC r324538
davidcs [Thu, 19 Oct 2017 17:37:33 +0000 (17:37 +0000)]
MFC r324538
Added support driver state capture/retrieval

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

6 years agoMFC r324535
davidcs [Thu, 19 Oct 2017 17:35:37 +0000 (17:35 +0000)]
MFC r324535
Add sanity checks in ql_hw_send() qla_send() to ensure that empty slots
in Tx Ring map to empty slot in Tx_buf array before Transmits. If the
checks fail further Transmission on that Tx Ring is prevented.

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

6 years agoMFC r324311: sysctl-s in a module should be accessible only when the module is initia...
avg [Thu, 19 Oct 2017 08:00:34 +0000 (08:00 +0000)]
MFC r324311: sysctl-s in a module should be accessible only when the module is initialized

Sponsored by: Panzura

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

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