]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r302908:
bdrewery [Fri, 22 Jul 2016 00:43:32 +0000 (00:43 +0000)]
MFC r302908:

  Fix dlsym(RTLD_NEXT) handling to only return the next library in last library
  cases.

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

7 years agoMFC: merge in all new features and improvements into geom_uzip(8) from current,
sobomax [Thu, 21 Jul 2016 23:49:26 +0000 (23:49 +0000)]
MFC: merge in all new features and improvements into geom_uzip(8) from current,
which includes:

 o LZMA compression;
 o block de-duplication;
 o performance improvements;
 o pop out worker kthread to do extraction.

This includes the following revisions:
 r295943,r295952,r298502,r298619,r299195,r302284

Suggested by: emaste

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

7 years agoMFC r302957: Fix NCQ TRIM emulation.
mav [Thu, 21 Jul 2016 11:58:47 +0000 (11:58 +0000)]
MFC r302957: Fix NCQ TRIM emulation.

When this code was written, there was no guests using it to test.

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

7 years agoMFC r303000: Update if_hwassist when interface options are changed.
mav [Thu, 21 Jul 2016 11:41:27 +0000 (11:41 +0000)]
MFC r303000: Update if_hwassist when interface options are changed.

In particular for me this fixes checksum problem when if_bridge attached
to the interface requests TXCSUM to be disabled, but effectively ignored.

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

7 years agoMFC r303003:
gjb [Thu, 21 Jul 2016 00:52:53 +0000 (00:52 +0000)]
MFC r303003:

 Make sure we clean up the rdoc and reldoc directories if NODOC
 is not set.

Sponsored by: The FreeBSD Foundation

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

7 years agoFix lem(4) build after r303107
sbruno [Wed, 20 Jul 2016 22:32:19 +0000 (22:32 +0000)]
Fix lem(4) build after r303107

Submitted by: Jason Wolfe <j@nitrology.com>

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

7 years agoFix em(4) build after r303107
sbruno [Wed, 20 Jul 2016 22:28:26 +0000 (22:28 +0000)]
Fix em(4) build after r303107

Reported by: Jason Wolf <j@nitrology.com>

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

7 years agoMFC - r302384 to 10-STABLE
sbruno [Wed, 20 Jul 2016 18:26:48 +0000 (18:26 +0000)]
MFC - r302384 to 10-STABLE
Do not initialize the adapter on MTU change when adapter status is down.
This fixes long-standing problems when changing settings of the adapter.

Discussed in:
https://lists.freebsd.org/pipermail/freebsd-net/2016-June/045509.html

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

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

7 years agoMFC: merge in all new features and improvements into mkuzip(8) from current,
sobomax [Wed, 20 Jul 2016 16:36:17 +0000 (16:36 +0000)]
MFC: merge in all new features and improvements into mkuzip(8) from current,
which includes:

 o LZMA compression;
 o block de-duplication;
 o performance improvements;
 o multi-thread support.

This includes the following revisions:
  r295943,r296626,r296628,r296810,r298504,r298505,r298577

Suggested by: emaste

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

7 years agoMFC r302770:
kib [Wed, 20 Jul 2016 15:07:52 +0000 (15:07 +0000)]
MFC r302770:
Trace timeval parameters to the getitimer(2) and setitimer(2) syscalls.

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

7 years agoMFC r302673
slm [Wed, 20 Jul 2016 14:38:02 +0000 (14:38 +0000)]
MFC r302673
Use real values to calculate Max I/O size instead of guessing.

Reviewed by: ken, scottl
Approved by: ken, scottl, ambrisko (mentors)
Differential Revision: https://reviews.freebsd.org/D7043

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

7 years agoMFC r302558:
gahr [Wed, 20 Jul 2016 07:33:48 +0000 (07:33 +0000)]
MFC r302558:
Do not truncate lines longer than 512 chars.

PR: 210344
Differential Revision: https://reviews.freebsd.org/D6881

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

7 years agoMFC r302973:
pfg [Wed, 20 Jul 2016 04:49:01 +0000 (04:49 +0000)]
MFC r302973:
sed(1): Fix off by one introduced in r299211.

Detected by running the gsed tests.

Submitted by: Mikhail Teterin
PR: 195929

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

7 years agoMFC r302179:
markj [Wed, 20 Jul 2016 00:53:21 +0000 (00:53 +0000)]
MFC r302179:
gcore: Forward pending signals when detaching from the target.

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

7 years agoMFC r302091:
markj [Wed, 20 Jul 2016 00:52:11 +0000 (00:52 +0000)]
MFC r302091:
Do not complete pending gmirror BIOs when tearing down the provider.

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

7 years agoMFC r302797:
markj [Wed, 20 Jul 2016 00:51:09 +0000 (00:51 +0000)]
MFC r302797:
Document DDB's "alltrace" and "show all trace" commands.

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

7 years agoMFC r261242:
jch [Mon, 18 Jul 2016 08:20:31 +0000 (08:20 +0000)]
MFC r261242:

Decrease lock contention within the TCP accept case by removing
the INP_INFO lock from tcp_usr_accept.  As the PR/patch states
this was following the advice already in the code.
See the PR below for a full discussion of this change and its
measured effects.

PR: 183659
Submitted by: Julien Charbon
Reviewed by: jhb

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

7 years agoMFC r302772: re-apply r299908: zfsctl_snapdir_lookup: clear VV_ROOT of
avg [Mon, 18 Jul 2016 06:46:49 +0000 (06:46 +0000)]
MFC r302772: re-apply r299908: zfsctl_snapdir_lookup: clear VV_ROOT of
snapshot's root

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

7 years agoMFC r302667
truckman [Mon, 18 Jul 2016 06:09:52 +0000 (06:09 +0000)]
MFC r302667

Fix problems in the FQ-PIE AQM cleanup code that could leak memory or
cause a crash.

Because dummynet calls pie_cleanup() while holding a mutex, pie_cleanup()
is not able to use callout_drain() to make sure that all callouts are
finished before it returns, and callout_stop() is not sufficient to make
that guarantee.  After pie_cleanup() returns, dummynet will free a
structure that any remaining callouts will want to access.

Fix these problems by allocating a separate structure to contain the
data used by the callouts.  In pie_cleanup(), call callout_reset_sbt()
to replace the normal callout with a cleanup callout that does the cleanup
work for each sub-queue.  The instance of the cleanup callout that
destroys the last flow will also free the extra allocated block of memory.
Protect the reference count manipulation in the cleanup callout with
DN_BH_WLOCK() to be consistent with all of the other usage of the reference
count where this lock is held by the dummynet code.

Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au>
Differential Revision: https://reviews.freebsd.org/D7174

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

7 years agoMFC r302573:
kib [Mon, 18 Jul 2016 04:34:42 +0000 (04:34 +0000)]
MFC r302573:
Fill tf_trapno for trap frames created for syscall.

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

7 years agoMFC r302511, r302771, r302845:
pfg [Sun, 17 Jul 2016 18:32:33 +0000 (18:32 +0000)]
MFC r302511, r302771, r302845:
mail(1): check for out of memory conditions when calling calloc(3).

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

7 years agoMFC r302517:
dchagin [Sun, 17 Jul 2016 15:23:32 +0000 (15:23 +0000)]
MFC r302517:

Fix a copy/paste bug introduced during X86_64 Linuxulator work.
FreeBSD support NX bit on X86_64 processors out of the box, for i386 emulation
use READ_IMPLIES_EXEC flag, introduced in r302515.

While here move common part of mmap() and mprotect() code to the files in compat/linux
to reduce code dupcliation between Linuxulator's.

MFC r302518, r302626:

Add linux_mmap.c to the appropriate conf/files.

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

7 years agoRegen for r302962 (Linux personality), record mergeinfo for r320516.
dchagin [Sun, 17 Jul 2016 15:11:23 +0000 (15:11 +0000)]
Regen for r302962 (Linux personality), record mergeinfo for r320516.

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

7 years agoMFC r302515:
dchagin [Sun, 17 Jul 2016 15:07:33 +0000 (15:07 +0000)]
MFC r302515:

Implement Linux personality() system call mainly due to READ_IMPLIES_EXEC flag.
In Linux if this flag is set, PROT_READ implies PROT_EXEC for mmap().
Linux/i386 set this flag automatically if the binary requires executable stack.

READ_IMPLIES_EXEC flag will be used in the next Linux mmap() commit.

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

7 years agoMFC r302857:
jamie [Sun, 17 Jul 2016 14:16:21 +0000 (14:16 +0000)]
MFC r302857:

  Start jails non-parallel if jail_parallel_start is NO.  This was true
  for an explicitly specified jail list; now it's also true for all jails.

PR: 209112

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

7 years agoMFC r302856:
jamie [Sun, 17 Jul 2016 14:15:08 +0000 (14:15 +0000)]
MFC r302856:

    Fix up the order in which jail creation processes are run, to preserve
    the config file's order in the non-parallel-start case.

PR: 209112

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

7 years agoMFC r302855:
jamie [Sun, 17 Jul 2016 14:12:34 +0000 (14:12 +0000)]
MFC r302855:

    Wait for jails to complete startup if jail_parallel_start is YES,
    instead of assuming they'll take less than one second.

PR: 203172
Submitted by: dmitry2004@yandex.ru

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

7 years agoMFH r301732, r302288
cperciva [Sat, 16 Jul 2016 08:17:14 +0000 (08:17 +0000)]
MFH r301732, r302288

Updates to EC2 loader.conf:
* Use console=comconsole (r301732) since EC2 now has a "VGA" console;
* Enable blkif indirect segment I/O (r302288) since EC2 now consistently
  gets better disk performance with this option enabled.

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

7 years agoMFC r301877:
markj [Sat, 16 Jul 2016 02:57:37 +0000 (02:57 +0000)]
MFC r301877:
Add a missing error check for a malloc() call in idr_get().

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

7 years agoMFC r302346:
markj [Sat, 16 Jul 2016 02:55:02 +0000 (02:55 +0000)]
MFC r302346:
Ensure that spinlock sections are balanced even after a panic.

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

7 years agoMFC r301090:
markj [Sat, 16 Jul 2016 02:53:52 +0000 (02:53 +0000)]
MFC r301090:
mkimg: Indicate that input file pages are unlikely to be reused.

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

7 years agoMFC r301212:
markj [Sat, 16 Jul 2016 02:49:02 +0000 (02:49 +0000)]
MFC r301212:
Reset the page busy lock state after failing to insert into the object.

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

7 years agoMFC r301210:
markj [Sat, 16 Jul 2016 02:47:56 +0000 (02:47 +0000)]
MFC r301210:
Don't preserve the page's object linkage in vm_page_insert_after().

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

7 years agoMFC r302507:
markj [Fri, 15 Jul 2016 19:10:32 +0000 (19:10 +0000)]
MFC r302507:
Avoid truncating the return value of DTrace predicates.

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

7 years agoMFC r297187
sbruno [Fri, 15 Jul 2016 15:30:09 +0000 (15:30 +0000)]
MFC r297187

Support checksum offloading for TCP/IPV6 and UDP/IPV6.
Support SCTP checksum offloading for SCTP/IPV6.
Support SCTP checksum offloading on all controllers except 82575.

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

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

7 years agoMFC 302541,302605
sephe [Fri, 15 Jul 2016 02:29:10 +0000 (02:29 +0000)]
MFC 302541,302605

302541
    hyperv/stor: Fix the INQUIRY checks

    Don't check the area that the host has not filled.

    PR:         https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209443
    PR:         https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210425
    Submitted by:       Hongjiang Zhang <honzhan microsoft com>
    Reviewed by:        sephe, Dexuan Cui <decui microsoft com>
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D6955

302605
    hyperv/stor: Save the response status and xfer length properly.

    The current command response handling discards status and xfer
    length unconditionally, so that all of the commands would be
    considered successful, even if errors happened.  When errors
    really happens, this causes all kinds of wiredness, since the
    buffer will not be filled on the host side and sense data will
    be ignored.

    Most of the time, errors do not happen, however, error does
    happen for the request sent immediately after the disk resizing.
    Discarding the SCSI status (SCSI_STATUS_CHECK_COND) and sense
    data (capacity changes) prevents the disk resizing from working
    properly.

    This commit saves the response status and xfer length properly
    for later use.

    Submitted by:       Dexuan Cui <decui microsoft com>
    Noticed by: sephe
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D7181

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

7 years agoMFC changes relating to warnings in opensolaris-derived libraries
asomers [Thu, 14 Jul 2016 15:39:31 +0000 (15:39 +0000)]
MFC changes relating to warnings in opensolaris-derived libraries

MFC r257592
MFC r257657
MFC r257638
MFC r257647
MFC r302141

r257592 | sbruno | 2013-11-03 14:05:44 -0700 (Sun, 03 Nov 2013) | 8 lines

This library uses macros to define fprintf behvavior for several object
types The compiler will see the non-string literal arguments to the fprintf
calls and omit warnings for them. Quiese these warnings in contrib code:

cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format
  string is not a string literal (potentially insecure) [-Wformat-security]
  ARENDER(pctl, nvlist_array, nvl, name, val, nelem);

r257657 | sbruno | 2013-11-04 14:32:07 -0700 (Mon, 04 Nov 2013) | 5 lines

Quiesce warning assigning to void * from const ctf_header_t * by explicity
casting to void * before assignment.

Submitted as Illumos issue 4287

r257638 | sbruno | 2013-11-04 09:15:43 -0700 (Mon, 04 Nov 2013) | 6 lines

Quiesce warning regarding %llf which has no effect.

Submitted as illumos issue #4284

Reviewed by:    delphij

r257647 | sbruno | 2013-11-04 12:32:35 -0700 (Mon, 04 Nov 2013) | 4 lines

spelling in comments fixup

Submitted by:           Joerg Sonnenberger <joerg@britannica.bec.de>

r302141 | asomers | 2016-06-23 09:02:57 -0600 (Thu, 23 Jun 2016) | 14 lines

Raise the WARNS level in cddl/lib

cddl/lib/libavl/Makefile
cddl/lib/libctf/Makefile
cddl/lib/libnvpair/Makefile
cddl/lib/libumem/Makefile
cddl/lib/libuutil/Makefile
        Increase WARNS to the highest working level for each of these
        libraries

Sponsored by:   Spectra Logic Corp

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

7 years agoMFH: r297023
julian [Thu, 14 Jul 2016 04:30:42 +0000 (04:30 +0000)]
MFH: r297023

 Add the ability to print out the module specific information in likely formats.
Among other things this gives us the ability to find out the syscall number of a dynamically loaded syscall that has a dynamicly allocated vector number.

Sponsored by: Panzura inc.

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

7 years agoMFC r302402: Fix ahci(4) driver attach to controller with 32 ports.
mav [Thu, 14 Jul 2016 00:26:57 +0000 (00:26 +0000)]
MFC r302402: Fix ahci(4) driver attach to controller with 32 ports.

Incorrect sign expansion in variables that supposed to be a bit fields
caused infinite loop.  Fixing this allows system properly detect maximal
possible 32 devices configured on AHCI HBA of BHyVe.  That case did not
happen in a wild before due to lack of hardware AHCI HBAs with 32 ports.

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

7 years agoMFC r302476:
pfg [Wed, 13 Jul 2016 16:20:18 +0000 (16:20 +0000)]
MFC r302476:
ng_mppc(4): basic readability cleanups.

No functional change.

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

7 years agoMFC r300134: move zfsctl_freebsd_root_lookup right next to
avg [Wed, 13 Jul 2016 11:14:11 +0000 (11:14 +0000)]
MFC r300134: move zfsctl_freebsd_root_lookup right next to
zfsctl_root_lookup

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

7 years agoMFC r300130: zfsctl_freebsd_root_lookup: gfs_vop_lookup may return a
avg [Wed, 13 Jul 2016 11:06:37 +0000 (11:06 +0000)]
MFC r300130: zfsctl_freebsd_root_lookup: gfs_vop_lookup may return a
doomed vnode

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

7 years agoMFC r299951: do not destroy 'snapdir' when it becomes inactive
avg [Wed, 13 Jul 2016 11:04:02 +0000 (11:04 +0000)]
MFC r299951: do not destroy 'snapdir' when it becomes  inactive

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

7 years agoMFC r299949: try to recycle "snap" vnodes as soon as possible
avg [Wed, 13 Jul 2016 10:32:24 +0000 (10:32 +0000)]
MFC r299949: try to recycle "snap" vnodes as soon as possible

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

7 years agoMFC r299947: fix locking in zfsctl_root_lookup
avg [Wed, 13 Jul 2016 10:16:45 +0000 (10:16 +0000)]
MFC r299947: fix locking in zfsctl_root_lookup

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

7 years agoMFC r299946: gfs_lookup_dot() does not have to acquire any locks
avg [Wed, 13 Jul 2016 10:13:28 +0000 (10:13 +0000)]
MFC r299946: gfs_lookup_dot() does not have to acquire any locks

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

7 years agoMFC r299945: avoid deadlock between zfsctl_snapdir_lookup and
avg [Wed, 13 Jul 2016 10:11:48 +0000 (10:11 +0000)]
MFC r299945: avoid deadlock between zfsctl_snapdir_lookup and
zfsctl_snapshot_reclaim

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

7 years agoMFC r299940: fix a vnode reference leak caused by illumos compat traverse()
avg [Wed, 13 Jul 2016 10:10:05 +0000 (10:10 +0000)]
MFC r299940: fix a vnode reference leak caused by illumos compat traverse()

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

7 years agoMFC r299914: zfsctl_ops_snapshot: remove methods should never be called
avg [Wed, 13 Jul 2016 10:02:39 +0000 (10:02 +0000)]
MFC r299914: zfsctl_ops_snapshot: remove methods should never be called

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

7 years agoMFC r301273: zfs_root: fix a potential root vnode reference leak
avg [Wed, 13 Jul 2016 09:50:07 +0000 (09:50 +0000)]
MFC r301273: zfs_root: fix a potential root vnode reference leak

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

7 years agoMFC r299908,300131,301275: zfs: set VROOT / VV_ROOT consistently and in
avg [Wed, 13 Jul 2016 09:47:54 +0000 (09:47 +0000)]
MFC r299908,300131,301275: zfs: set VROOT / VV_ROOT consistently and in
a single place

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

7 years agoMFC r299902,299938: mount_snapshot: consolidate all error handling
avg [Wed, 13 Jul 2016 09:40:53 +0000 (09:40 +0000)]
MFC r299902,299938: mount_snapshot: consolidate all error handling

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

7 years agoMFC r299906,301870: add zfs_vptocnp with special handling for snapshots
avg [Wed, 13 Jul 2016 09:35:43 +0000 (09:35 +0000)]
MFC r299906,301870: add zfs_vptocnp with special handling for snapshots
under .zfs

Note that the changed is adjusted for the lack of LK_VNHELD in this
branch.

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

7 years agoMFC r300145: add vop_print methods to vnode operatios of various zfsctl
avg [Wed, 13 Jul 2016 09:26:33 +0000 (09:26 +0000)]
MFC r300145: add vop_print methods to vnode operatios of various zfsctl
node types

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

7 years agoMFC r301873: l2arc: reset b_tmp_cdata to NULL in the case of unset b_daddr
avg [Wed, 13 Jul 2016 09:23:02 +0000 (09:23 +0000)]
MFC r301873: l2arc: reset b_tmp_cdata to NULL in the case of unset b_daddr

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

7 years agoMFC r302123: fix deadlock-prone code in getzfsvfs()
avg [Wed, 13 Jul 2016 09:21:28 +0000 (09:21 +0000)]
MFC r302123: fix deadlock-prone code in getzfsvfs()

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

7 years agoMFC r299900: zfsctl: fix several problems with reference counts
avg [Wed, 13 Jul 2016 09:14:45 +0000 (09:14 +0000)]
MFC r299900: zfsctl: fix several problems with reference counts

PR: 207464

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

7 years agoMFC r298105: zfs: enable vn_io_fault support
avg [Wed, 13 Jul 2016 09:09:21 +0000 (09:09 +0000)]
MFC r298105: zfs: enable vn_io_fault support

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

7 years agoMFC r300133: zfsctl_common_fid: remove redundant assignment
avg [Wed, 13 Jul 2016 09:06:58 +0000 (09:06 +0000)]
MFC r300133: zfsctl_common_fid: remove redundant assignment

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

7 years agoMFC r300132: zfsctl: tighten assertion and remove unused definition
avg [Wed, 13 Jul 2016 09:05:14 +0000 (09:05 +0000)]
MFC r300132: zfsctl: tighten assertion and remove unused definition

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

7 years agoMFC r299913: dounmount: do not call mountcheckdirs() for mounts with MNT_IGNORE
avg [Wed, 13 Jul 2016 09:03:01 +0000 (09:03 +0000)]
MFC r299913: dounmount: do not call mountcheckdirs() for mounts with MNT_IGNORE

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

7 years agoMFC r302265, r302382
smh [Wed, 13 Jul 2016 08:33:57 +0000 (08:33 +0000)]
MFC r302265, r302382

Allow ZFS ARC min / max to be tuned at runtime

Relnotes: YES
Sponsored by: Multiplay

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

7 years agoMFC r302362,r302363,r302364,r302365,r302373:
ngie [Wed, 13 Jul 2016 06:09:34 +0000 (06:09 +0000)]
MFC r302362,r302363,r302364,r302365,r302373:

r302362:

Fix gcc warnings

- Remove -Wunused-but-set-variable (newcpu)
- Always return VMEXIT_CONTINUE as the code always set retval to that value.

r302363:

Fix gcc warnings

Put cfl/prdt under AHCI_DEBUG #defines as they are only used in
those cases.

r302364:

Fix gcc warnings

Add `WRAPPED_CTASSERT` macro by annotating CTASSERTs with __unused
to deal with -Wunused-local-typedefs warnings from gcc 4.8+.
All other compilers (clang, etc) use CTASSERT as-is. A more generic
solution for this issue will be proposed after ^/stable/11 is forked.

Consolidate all CTASSERTs under one block instead of inlining them in
functions.

r302365:

Fix gcc warnings

Remove -Wunused-but-set-variable (`error`). Cast calls with
`(void)` to note that the return value is explicitly ignored.

r302373:

Fix CTASSERT issue in a more clean way

- Replace all CTASSERT macro instances with static_assert's.
- Remove the WRAPPED_CTASSERT macro; it's now an unnecessary obfuscation.
- Localize all static_assert's to the structures being tested.
- Sort some headers per-style(9).

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

7 years agoMFC r302206
asomers [Tue, 12 Jul 2016 22:53:11 +0000 (22:53 +0000)]
MFC r302206

Skip lastcomm and sa tests on unsupported architectures

usr.bin/lastcom/tests/Makefile
usr.sbin/sa/tests/Makefile
Set allow_architectures appropriately.  These tests depend on
golden files that must be generated for each architecture, and
haven't yet been generated for all of them.

PR: 204154

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

7 years agoMFC r302174
asomers [Tue, 12 Jul 2016 22:19:25 +0000 (22:19 +0000)]
MFC r302174

Fix "sysctl vm.vmtotal" output on machines with > 2TB virtual memory

sbin/sysctl/sysctl.c
        Fix integer overflows in printf format strings

PR: 199673

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

7 years agoMFC r302036
asomers [Tue, 12 Jul 2016 22:09:05 +0000 (22:09 +0000)]
MFC r302036

Skip sys/acl tests on systems lacking perl

tests/sys/acl/Makefile
        add perl to the required_programs for all tests in this directory

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

7 years agoMFC r301967
asomers [Tue, 12 Jul 2016 21:49:08 +0000 (21:49 +0000)]
MFC r301967

Fix usr.sbin/rpcbind ATF tests on 32-bit platforms

usr.sbin/rpcbind/tests/addrmerge_test.c
Fix some sizeof calculations that work only by luck on 64-bit
platforms.

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

7 years agoMFC r301874
asomers [Tue, 12 Jul 2016 21:41:27 +0000 (21:41 +0000)]
MFC r301874

Fix usr.sbin/extattr testcases on tmpfs

Skip the usr.sbin/extattr testscases if $TMPDIR is tmpfs, which doesn't
support extended attributes

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

7 years agoMFC r300356
asomers [Mon, 11 Jul 2016 23:15:54 +0000 (23:15 +0000)]
MFC r300356

Better document security_show_{success,info,badconfig} in /etc/periodic.conf

periodic(8) already handles the security_show_{success,info,badconfig}
variables correctly. However, those variables aren't explicitly set in
/etc/defaults/periodic.conf or anywhere else, which suggests to the user
that they shouldn't be used.

etc/defaults/periodic.conf
        Explicitly set defaults for security_show_{success,info,badconfig}

usr.sbin/periodic/periodic.sh
        Update usage string

usr.sbin/periodic/periodic.8
        Minor man page updates

One thing I'm _not_ doing is recommending setting security_output to
/var/log/security.log or adding that file to /etc/newsyslog.conf, because
periodic(8) would create it with default permissions, usually 644, and
that's probably a bad idea.

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

7 years agoMFC r302327:
ngie [Mon, 11 Jul 2016 17:31:30 +0000 (17:31 +0000)]
MFC r302327:

Fix .../usr.bin/lastcomm/legacy_test:main on i386

The time in the output files was ahead by 3 hours on i386. Fix the incorrect
offset.

PR: 210329

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

7 years agoMFC r302326:
ngie [Mon, 11 Jul 2016 17:30:20 +0000 (17:30 +0000)]
MFC r302326:

Output the diffs to standard error when comparing the expected vs the
obtained output from lastcomm instead of just printing out a summary, e.g.
"they differed".

This will make failures with results more apparent when running kyua debug,
kyua report-html, etc.

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

7 years agoMFC r302336:
hselasky [Mon, 11 Jul 2016 13:01:42 +0000 (13:01 +0000)]
MFC r302336:
Fix interrupt loop when switching from USB device to USB host mode by
clearing all endpoint interrupt bits.

PR: 210736

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

7 years agoMFC r302306:
hselasky [Mon, 11 Jul 2016 12:59:23 +0000 (12:59 +0000)]
MFC r302306:
Fix detection of USB device disconnects in USB host mode when the USB
device is connected directly to the USB port of the DWC OTG, in this
case a RPI-zero.

PR: 210695

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

7 years agoMFC r302221,302222:
delphij [Mon, 11 Jul 2016 07:35:58 +0000 (07:35 +0000)]
MFC r302221,302222:

MFV r302218: file 5.28.

Relnotes: yes

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

7 years agoMFC r302534:
delphij [Mon, 11 Jul 2016 04:11:33 +0000 (04:11 +0000)]
MFC r302534:

Allow - in distribution names.  This is needed for freebsd-update to work
with 11.0+, where the debugging symbols use a new naming scheme for release
distribution files.

Errata candidate.

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

7 years agoMFC r302236:
kib [Sun, 10 Jul 2016 04:33:16 +0000 (04:33 +0000)]
MFC r302236:
Handle the vm_fault() handler race with the vm_object_collapse()
sleepable scan.

MFC r302317:
Change type of the 'dead' variable to boolean.

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

7 years agoMFC r301871:
ngie [Fri, 8 Jul 2016 20:50:44 +0000 (20:50 +0000)]
MFC r301871:

Add missing break in lock_partialfilelock(..) with NFS_RESERR

This will help ensure that the right error is trickled up when the
function is called if the lock status is NFS_RESERR

Tested with: fsx; svn info/svnversion (uses bdb locking); locktests from Bull http://nfsv4.bullopensource.org/tools/tests/locktest.php
CID: 10081611304956

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

7 years agoMFC r301605:
ngie [Fri, 8 Jul 2016 20:39:37 +0000 (20:39 +0000)]
MFC r301605:

Bounds check rpcbs_rmtcall(..) to ensure rtype is less than RPCBVERS_STAT

Not returning if rtype == RPCBVERS_STAT will cause us to overrun the inf array, as
it's defined to be exactly RPCBVERS_STAT elements in rpcb_prot.x:

> include/rpc/rpcb_prot.x:typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];

The proposed change also matches the rest of the rtype upper bound checks in the
file, so the original change was likely a typo.

CID: 1007567

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

7 years agoMFC r301800:
ngie [Fri, 8 Jul 2016 20:30:20 +0000 (20:30 +0000)]
MFC r301800:

Deobfuscate cleanup path in clnt_bck_create(..)

Similar to r300836, cl and ct will always be non-NULL as they're allocated
using the mem_alloc routines, which always use `malloc(..., M_WAITOK)`.

Deobfuscating the cleanup path fixes a leak where if cl was NULL and
ct was not, ct would not be free'd, and also removes a duplicate test for
cl not being NULL.

CID: 1229999

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

7 years agoMFC r301749:
ngie [Fri, 8 Jul 2016 19:19:30 +0000 (19:19 +0000)]
MFC r301749:

Add debug output to aid in determining why `goodResult` != `result`

PR: 210619 (for diagnosis)

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

7 years agoMFC r301708:
ngie [Fri, 8 Jul 2016 19:13:18 +0000 (19:13 +0000)]
MFC r301708:

Revert r301707

getnetent_p doesn't return NULL like getnetent does. coccinelle got confused and
I didn't verify that it worked before committing the change

Pointyhat to: ngie

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

7 years agoMFC r301707:
ngie [Fri, 8 Jul 2016 19:04:51 +0000 (19:04 +0000)]
MFC r301707:

Use NULL instead of `0` in _ht_getnetbyname(..)

- getnetent returns NULL on completion/error.
- .h_aliases is NULL terminated.

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

7 years agoMFC r302294:
mm [Fri, 8 Jul 2016 10:06:02 +0000 (10:06 +0000)]
MFC r302294:

Sync libarchive with vendor, bugfixes for tests:
- fix tests on filesystems without birthtime support, e.g. UFS1 (1)
- vendor issue #729: avoid use of C99 for-scope declarations in
  test_write_format_gnutar_filenames.c

PR: 204157 (1)

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

7 years agoMFC r302338
truckman [Fri, 8 Jul 2016 02:52:39 +0000 (02:52 +0000)]
MFC r302338

Fix a race condition between the main thread in aqm_pie_cleanup() and the
callout thread that can cause a kernel panic.  Always do the final cleanup
in the callout thread by passing a separate callout function for that task
to callout_reset_sbt().

Protect the ref_count decrement in the callout with DN_BH_WLOCK().  All
other ref_count manipulation is protected with this lock.

There is still a tiny window between ref_count reaching zero and the end
of the callout function where it is unsafe to unload the module.  Fixing
this would require the use of callout_drain(), but this can't be done
because dummynet holds a mutex and callout_drain() might sleep.

Remove the callout_pending(), callout_active(), and callout_deactivate()
calls from calculate_drop_prob().  They are not needed because this callout
uses callout_init_mtx().

Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au>
Differential Revision: https://reviews.freebsd.org/D6928

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

7 years agoMFC r302196
kib [Fri, 8 Jul 2016 02:34:04 +0000 (02:34 +0000)]
MFC r302196
Since VOP_INACTIVE() is not guaranteed to be called, all cleanups
executed by inactive methods, must be repeated on reclaim.

MFC r302210:
Clean other flags in ncl_inactive, only.

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

7 years agoMFC r302305: MFV r302260: expat 2.2.0.
delphij [Thu, 7 Jul 2016 04:59:58 +0000 (04:59 +0000)]
MFC r302305: MFV r302260: expat 2.2.0.

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

7 years agoMFC r302296:
cy [Thu, 7 Jul 2016 02:23:52 +0000 (02:23 +0000)]
MFC r302296:

Remove dead code.

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

7 years agoMFC r300547
truckman [Wed, 6 Jul 2016 17:45:38 +0000 (17:45 +0000)]
MFC r300547

Fix multiple Coverity Out-of-bounds access false postive issues in CAM

The currently used idiom for clearing the part of a ccb after its
header generates one or two Coverity errors for each time it is
used.  All instances generate an Out-of-bounds access (ARRAY_VS_SINGLETON)
error because of the treatment of the header as a two element array,
with a pointer to the non-existent second element being passed as
the starting address to bzero().  Some instances also alsp generate
Out-of-bounds access (OVERRUN) errors, probably because the space
being cleared is larger than the sizeofstruct ccb_hdr).

In addition, this idiom is difficult for humans to understand and
it is error prone.  The user has to chose the proper struct ccb_*
type (which does not appear in the surrounding code) for the sizeof()
in the length calculation.  I found several instances where the
length was incorrect, which could cause either an actual out of
bounds write, or incompletely clear the ccb.

A better way is to write the code to clear the ccb itself starting
at sizeof(ccb_hdr) bytes from the start of the ccb, and calculate
the length based on the specific type of struct ccb_* being cleared
as specified by the union ccb member being used.  The latter can
normally be seen in the nearby code.  This is friendlier for Coverity
and other static analysis tools because they will see that the
intent is to clear the trailing part of the ccb.

Wrap all of the boilerplate code in a convenient macro that only
requires a pointer to the desired union ccb member (or a pointer
to the union ccb itself) as an argument.

Reported by: Coverity
CID: 100757810086841009724100977310113041011306
CID: 101130710113081011309101131010113111011312
CID: 101131310113141011315101131610113171011318
CID: 101131910113201011321101132210113241011325
CID: 101132610113271011328101132910113301011374
CID: 101139010113911011392101139310113941011395
CID: 101139610113971011398101139910114001011401
CID: 101140210114031011404101140510114061011408
CID: 101140910114101011411101141210114131011414
CID: 101746110183871086860108687411942571229897
CID: 122996813062291306234133128213312831331294
CID: 133129513315351331536133153913315401341623
CID: 13416241341637134163813552641355324
Reviewed by: scottl, ken, delphij, imp
MFH: 1 month
Differential Revision: https://reviews.freebsd.org/D6496

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

7 years agoMFC r299371 (by trasz)
truckman [Wed, 6 Jul 2016 17:42:09 +0000 (17:42 +0000)]
MFC r299371 (by trasz)

Add "camcontrol reprobe" subcommand, and implement it for da(4).
This makes it possible to manually force updating capacity data
after the disk got resized. Without it it might be neccessary to
reboot before FreeBSD notices updated disk size under eg VMWare.

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

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

7 years agoMFC r301007:
wblock [Mon, 4 Jul 2016 14:23:36 +0000 (14:23 +0000)]
MFC r301007:

Clarify the explanations for the hostname and FQDN entries.

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

7 years agoMFC r302151: posixshm: Fix lock leak when mac_posixshm_check_read rejects
jilles [Sun, 3 Jul 2016 11:45:54 +0000 (11:45 +0000)]
MFC r302151: posixshm: Fix lock leak when mac_posixshm_check_read rejects
read.

While reading the code, I noticed that shm_read() returns without unlocking
foffset and rangelock if mac_posixshm_check_read() rejects the read.

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

7 years agoLimit VOLUME_LABEL (first argument to the mkisoimages scripts)
gjb [Sun, 3 Jul 2016 00:31:33 +0000 (00:31 +0000)]
Limit VOLUME_LABEL (first argument to the mkisoimages scripts)
to 32 characters.

This is a direct commit to stable/10, as UEFI support natively
exists for 11.0-CURRENT and unsupported in 9-STABLE.

Submitted by: Rick Miller
PR: 210463
Sponsored by: The FreeBSD Foundation

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

7 years agoMFC r302075:
mm [Thu, 30 Jun 2016 12:44:15 +0000 (12:44 +0000)]
MFC r302075:

Update libarchive to 3.2.1 (bugfix and security fix release)

List of vendor fixes:
- fix exploitable heap overflow vulnerability in Rar decompression
  (vendor issue 719, CVE-2016-4302, TALOS-2016-0154)
- fix exploitable stack based buffer overflow vulnebarility in mtree
  parse_device functionality (vendor PR 715, CVE-2016-4301, TALOS-2016-0153)
- fix exploitable heap overflow vulnerability in 7-zip read_SubStreamsInfo
  (vendor issue 718, CVE-2016-4300, TALOS-2016-152)
- fix integer overflow when computing location of volume descriptor
  (vendor issue 717)
- fix buffer overflow when reading a crafred rar archive (vendor issue 521)
- fix possible buffer overflow when reading ISO9660 archives on machines
  where sizeof(int) < sizeof(size_t) (vendor issue 711)
- tar and cpio should fail if an input file named on the command line is
  missing (vendor issue 708)
- fix incorrect writing of gnutar filenames that are exactly 512 bytes
  long (vendor issue 682)
- allow tests to be run from paths that are equal or longer than 128
  characters (vendor issue 657)
- add memory allocation errors in archive_entry_xattr.c (vendor PR 603)
- remove dead code in archive_entry_xattr_add_entry() (vendor PR 716)
- fix broken decryption of ZIP files (vendor issue 553)
- manpage style, typo and description fixes

Post-3.2.1 vendor fixes:
- fix typo in cpio version reporting (Vendor PR 725, 726)
- fix argument range of ctype functions in libarchive_fe/passphrase.c
- fix ctype use and avoid empty loop bodies in WARC reader

Security: CVE-2016-4300, CVE-2016-4301, CVE-2016-4302

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

7 years agoMFC r301956, r301957, r301964, r301966, r301968, r301969, r302080,
hselasky [Wed, 29 Jun 2016 10:58:36 +0000 (10:58 +0000)]
MFC r301956, r301957, r301964, r301966, r301968, r301969, r302080,
    r302125 and r302171:

Added multiple new LibUSB v1.0 API functions.
Refer to the individual commits for more details.

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

7 years agoMFC r301842:
hselasky [Wed, 29 Jun 2016 10:43:31 +0000 (10:43 +0000)]
MFC r301842:
Implement code to stop all USB endpoints before executing a USB device
reset command, alternate setting command or set configuration
command. Else LibUSB v1.0 will not re-open the endpoints which the
kernel closes and the USB application might wait infinitely for
transfers to complete.

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

7 years agoMFC r301544:
hselasky [Wed, 29 Jun 2016 10:40:34 +0000 (10:40 +0000)]
MFC r301544:
Fallback to arc4rand() in the LinuxKPI when read_random() returns
zero. This can happen for virtual machines.

Sponsored by: Mellanox Technologies

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

7 years agoMFC r301545:
hselasky [Wed, 29 Jun 2016 10:33:11 +0000 (10:33 +0000)]
MFC r301545:
Add SR-IOV guest support to the mlx5en driver.

This patch adds the missing pieces needed for device setup using the
mlx5en driver inside a virtual machine which is providing hardware
access through SR-IOV.

Sponsored by: Mellanox Technologies

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

7 years agoMFC r302139:
hselasky [Wed, 29 Jun 2016 10:29:52 +0000 (10:29 +0000)]
MFC r302139:
Use correct Q-counter output array.

Sponsored by: Mellanox Technologies

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

7 years agoMFC r302076:
hselasky [Wed, 29 Jun 2016 10:21:45 +0000 (10:21 +0000)]
MFC r302076:
Update the definition for number of scratch pages to match the latest
version of the XHCI specification. Make sure the code can handle the
maximum number of allowed scratch pages.

Submitted by: Shichun_Ma@Dell.com

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

7 years agoMFC r302213:
dchagin [Wed, 29 Jun 2016 06:04:45 +0000 (06:04 +0000)]
MFC r302213:

Fix a bug introduced in r283433.

[1] Remove unneeded sockaddr conversion before kern_recvit() call as the from
argument is used to record result (the source address of the received message) only.

[2] In Linux the type of msg_namelen member of struct msghdr is signed but native
msg_namelen has a unsigned type (socklen_t). So use the proper storage to fetch fromlen
from userspace and than check the user supplied value and return EINVAL if it is less
than 0 as a Linux do.

Reported by: Thomas Mueller <tmueller at sysgo dot com> [1]
Tested by: Thomas Mueller <tmueller at sysgo dot com> [both]
Reviewed by: kib@

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