]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
4 years agoMFC r356551: arp(8): avoid segfaulting due to out-of-bounds memory access
eugen [Thu, 16 Jan 2020 08:27:30 +0000 (08:27 +0000)]
MFC r356551: arp(8): avoid segfaulting due to out-of-bounds memory access

Fix obvious mistake that sometimes results in reading memory
past end of an array.

PR:             242784

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

4 years agoMFC r356409:
hselasky [Mon, 13 Jan 2020 11:33:03 +0000 (11:33 +0000)]
MFC r356409:
Add own counter for cancelled USB transfers.
Do not count these as errors.

Bump the FreeBSD version to force recompilation of external modules.

Sponsored by: Mellanox Technologies

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

4 years agoMFC r356201:
hselasky [Mon, 6 Jan 2020 09:51:54 +0000 (09:51 +0000)]
MFC r356201:
Fix spelling.

PR: 242891
Sponsored by: Mellanox Technologies

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

4 years agoMFC r356137:
hselasky [Mon, 6 Jan 2020 09:40:59 +0000 (09:40 +0000)]
MFC r356137:
Implement dump_stats command for usbconfig(8).

This command is useful when debugging USB device issues.

Sponsored by: Mellanox Technologies

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

4 years agoMFC r351146:
hselasky [Mon, 6 Jan 2020 09:40:18 +0000 (09:40 +0000)]
MFC r351146:
Implement detach_kernel_driver command in usbconfig(8).

Submitted by: Kevin Zheng <kevinz5000@gmail.com>
PR: 239916

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

4 years agoMFC r333089:
hselasky [Mon, 6 Jan 2020 09:38:57 +0000 (09:38 +0000)]
MFC r333089:
Clean up the EXAMPLES section of usbconfig(8).  This removes parts that
become redundant after documenting all the subcommands, and switches
to the new syntax, without the '-d'.

Reviewed by: hselasky@
Sponsored by: The FreeBSD Foundation

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

4 years agoMFC r332659:
hselasky [Mon, 6 Jan 2020 09:38:08 +0000 (09:38 +0000)]
MFC r332659:
Make it possible to pass the ugenX.Y to usbconfig(8) without using "-d",
eg "usbconfig ugen1.2 dump_all_desc".

Reviewed by: hselasky@
Sponsored by: The FreeBSD Foundation

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

4 years agoMFC r330875:
hselasky [Mon, 6 Jan 2020 09:37:13 +0000 (09:37 +0000)]
MFC r330875:
Add "usbconfig dump_all_desc", a subcommand to dump all device and config
descriptors.

Reviewed by: hselasky@
Sponsored by: The FreeBSD Foundation

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

4 years agoMFC r327522:
hselasky [Mon, 6 Jan 2020 09:35:57 +0000 (09:35 +0000)]
MFC r327522:
Fix warnings from "mandoc -Tlint -Wwarning".

Reported by: Yuri Pankov <yuripv at gmx.com>
Sponsored by: The FreeBSD Foundation

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

4 years agoMFC r327382:
hselasky [Mon, 6 Jan 2020 09:35:11 +0000 (09:35 +0000)]
MFC r327382:
Improve usbconfig(8) manual page by adding descriptions for subcommands.

Reviewed by: hselasky
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D13445

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

4 years agoMFC r356136:
hselasky [Mon, 6 Jan 2020 09:22:33 +0000 (09:22 +0000)]
MFC r356136:
Implement new libusb v2.0 API function, libusb20_dev_get_stats().

This function is useful when debugging USB device issues.

Sponsored by: Mellanox Technologies

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

4 years agoMFC r356135:
hselasky [Mon, 6 Jan 2020 09:16:41 +0000 (09:16 +0000)]
MFC r356135:
Make USB statistics per device instead of per bus.

Bump the FreeBSD version due to structure change to
force recompilation of external USB modules.

Sponsored by: Mellanox Technologies

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

4 years agoMFC r355447:
hselasky [Wed, 25 Dec 2019 09:34:16 +0000 (09:34 +0000)]
MFC r355447:
Fix compilation issue with mlx5core and sparc64 (gcc48):

sys/dev/mlx5/mlx5_en/mlx5_en_tx.c:335: error: requested alignment is not a constant

Sponsored by: Mellanox Technologies

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

4 years agoMFC r355108 and r355170:
hselasky [Thu, 5 Dec 2019 14:53:46 +0000 (14:53 +0000)]
MFC r355108 and r355170:
Fix panic when loading kernel modules before root file system is mounted.
Make sure the rootvnode is always NULL checked.

Differential Revision: https://reviews.freebsd.org/D22545
PR: 241639
Sponsored by: Mellanox Technologies

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

4 years agor355120 | dim | 2019-11-26 23:01:09 +0100 (Tue, 26 Nov 2019) | 32 lines
dim [Wed, 4 Dec 2019 17:45:34 +0000 (17:45 +0000)]
r355120 | dim | 2019-11-26 23:01:09 +0100 (Tue, 26 Nov 2019) | 32 lines

The fdlibm hypot() implementations shouldn't potentially left-shift
negative numbers (invoking undefined behavior)

Summary:
Various paths through hypot(x, y) will multiply x and y by a power of
two, perform the calculation in a range where IEEE-754 provides greater
precision, then undo the multiplication to determine the true result.
Undoing that multiplication is implemented as t1*w, where t1=2**k.

2**k is often computed by taking the high word of 1.0, then adding k<<20
(for doubles or long doubles) or k<<23 (for floats) to it, then
overwriting that high word. But when k is negative this left-shifts a
negative value -- and that's undefined behavior in many editions of C
and C++.

This patch should fix all hypot implementations to compute 2**k without
triggering this particular bit of undefined behavior.

Test Plan: I've only very lightly tested out the hypot(double, double)
change, in SpiderMonkey's JavaScript engine, for consistency with prior
behavior.  The other functions' changes have more or less only been
eyeballed.  Careful examination appreciated!  Do note, however, that an
error in any of these changes would most likely produce a value that is
incorrect by a factor of two, so any mistake would most likely be
glaring if invoked.

Submitted by: Jeff Walden <jwalden@mit.edu>
Obtained from: https://github.com/freebsd/freebsd/pull/414
Reviewed by: dim, lwhsu
Differential Revision: https://reviews.freebsd.org/D22354

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

4 years agoMFC r354255:
dim [Sun, 10 Nov 2019 17:33:10 +0000 (17:33 +0000)]
MFC r354255:

Add __isnan()/__isnanf() aliases for compatibility with glibc and CUDA

Even though clang comes with a number of internal CUDA wrapper headers,
compiling sample CUDA programs will result in errors similar to:

In file included from <built-in>:1:
In file included from /usr/lib/clang/9.0.0/include/__clang_cuda_runtime_wrapper.h:204:
/usr/home/arr/cuda/var/cuda-repo-10-0-local-10.0.130-410.48/usr/local/cuda-10.0//include/crt/math_functions.hpp:2910:7: error: no matching function for call to '__isnan'
  if (__isnan(a)) {
      ^~~~~~~
/usr/lib/clang/9.0.0/include/__clang_cuda_device_functions.h:460:16: note: candidate function not viable: call to __device__ function from __host__ function
__DEVICE__ int __isnan(double __a) { return __nv_isnand(__a); }
               ^

CUDA expects __isnan() and __isnanf() declarations to be available,
which are glibc specific extensions, equivalent to the regular isnan()
and isnanf().

To provide these, define __isnan() and __isnanf() as aliases of the
already existing static inline functions __inline_isnan() and
__inline_isnanf() from math.h.

Reported by: arrowd
PR: 241550

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

4 years agoReplace current with stable/10
imp [Wed, 6 Nov 2019 14:34:14 +0000 (14:34 +0000)]
Replace current with stable/10

Direct commit because not relevant to other branches

Reported by: Jamie Landeg-Jones

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

4 years agoMFC: r353778 (partial)
marius [Wed, 30 Oct 2019 21:49:34 +0000 (21:49 +0000)]
MFC: r353778 (partial)

In em_handle_link(), only re-arm the link state change interrupt for
82574 and also only if such a device uses MSI-X, i. e. takes advantage
of autoclearing. In case of INTx and MSI re-arming isn't appropriate
here and setting EM_MSIX_LINK isn't either.

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

4 years agoMFC r319872, r321063, r321582, r322034, r322425, r322962, r322985,
np [Thu, 10 Oct 2019 23:27:02 +0000 (23:27 +0000)]
MFC r319872, r321063, r321582, r322034, r322425, r322962, r322985,
r325596, r326026, r328420, r331472, r333276, r333650, r333652, r334406,
r334409-r334410, r334489, r336042, r340651, r342603, and r345083.

This updates the cxgbe firmwares in stable/10 and also pulls in support
for some newer boards and flash parts.

r319872:
cxgbe(4):  Do not request an FEC setting that the port does not support.

r321063:
cxgbe(4): Various link/media related improvements.

r321582:
cxgbe(4): Some updates to the common code.

r322034:
cxgbe(4): Always use the first and not the last virtual interface
associated with a port in begin_synchronized_op.

r322425:
cxgbe(4): Save the last reported link parameters and compare them with
the current state to determine whether to generate a link-state change
notification.  This fixes a bug introduced in r321063 that caused the
driver to sometimes skip these notifications.

r322962:
cxgbe(4): Remove write only variable from t4_port_init.

r322985:
cxgbe(4): Maintain one ifmedia per physical port instead of one per
Virtual Interface (VI).  All autonomous VIs that share a port share the
same media.

r325596:
cxgbe(4): Do not request settings not supported by the port.

r326026:
cxgbe(4): Add a custom board to the device id list.

r328420:
cxgbe(4): Do not display harmless warning in non-debug builds.

r331472:
cxgbe(4): Always initialize requested_speed to a valid value.

This fixes an avoidable EINVAL when the user tries to disable AN after
the port is initialized but l1cfg doesn't have a valid speed to use.

r333276:
cxgbe(4): Update all firmwares to 1.19.1.0.

r333650:
cxgbe(4): Claim some more T5 and T6 boards.

r333652:
cxgbe(4): Add support for two more flash parts.

r334406:
cxgbe(4): Consider all supported speeds when building the ifmedia list
for a port.  Fix other related issues while here:
- Require port lock for access to link_config.
- Allow 100Mbps operation by tracking the speed in Mbps.  Yes, really.
- New port flag to indicate that the media list is immutable.  It will
  be used in future refinements.

This also fixes a bug where the driver reports incorrect media with
recent firmwares.

r334409:
cxgbe(4): Implement ifm_change callback.

r334410:
cxgbe(4): Use ifm for ifmedia just like the rest of the kernel.

No functional change.

r334489:
cxgbe(4): Include full duplex mediaopt in media that can be reported as
active.  Always report full duplex in active media.

r336042:
cxgbe(4): Assume that any unknown flash on the card is 4MB and has 64KB
sectors, instead of refusing to attach to the card.

r340651:
cxgbe(4): Update T4/5/6 firmwares to 1.22.0.3.

r342603:
cxgbe(4): Attach to two T540 variants.

r345083:
cxgbe(4): Update T4/5/6 firmwares to 1.23.0.0.

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

4 years agoMFC r318147 (by erj@):
np [Thu, 10 Oct 2019 20:28:34 +0000 (20:28 +0000)]
MFC r318147 (by erj@):

Add several new media types to if_media.h

These include several 25G types (for active direct attach cables and LR modules),
and a missing type for 10G active direct attach.

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

4 years agoMFC r316456,352732:
mm [Wed, 9 Oct 2019 22:19:48 +0000 (22:19 +0000)]
MFC r316456,352732:
Sync libarchive with vendor.

MFC r316456:
Vendor changes (FreeBSD-related):
  Report which extended attributes could not be restored
  Update archive_read_disk.3 and archive_write_disk.3 manual pages
  Plug memory leaks in xattr tests.

MFC r352732:
Relevant vendor changes:
  Issue #1237: Fix integer overflow in archive_read_support_filter_lz4.c
  PR #1249: Correct some typographical and grammatical errors.
  PR #1250: Minor corrections to the formatting of manual pages

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

4 years agoMFC r352556:
hselasky [Mon, 7 Oct 2019 08:25:25 +0000 (08:25 +0000)]
MFC r352556:
Add quirk for XHCI(4) controllers to support USB control transfers
above 1Kbyte.  It might look like some XHCI(4) controllers do not
support when the USB control transfer is split using a link TRB. The
next NORMAL TRB after the link TRB is simply failing with XHCI error
code 4. The quirk ensures we allocate a 64Kbyte buffer so that the
data stage TRB is not broken with a link TRB.

Found at: EuroBSDcon 2019
Sponsored by: Mellanox Technologies

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

4 years agoMFC r352555:
hselasky [Mon, 7 Oct 2019 08:13:49 +0000 (08:13 +0000)]
MFC r352555:
Increase the maximum user-space buffer size from 256kBytes to 32MBytes for
libusb. This is useful for speeding up large data transfers while reducing
the interrupt rate.

Found at: EuroBSDcon 2019
Sponsored by: Mellanox Technologies

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

4 years agoMFC r352554:
hselasky [Mon, 7 Oct 2019 08:11:12 +0000 (08:11 +0000)]
MFC r352554:
The maximum TD size is 31 and not 15.

Found at: EuroBSDcon 2019
Sponsored by: Mellanox Technologies

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

4 years agoMFC r353116:
cy [Mon, 7 Oct 2019 04:44:01 +0000 (04:44 +0000)]
MFC r353116:

Add missing definition in DEBUG code.

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

4 years agoMFC r352783:
cy [Mon, 30 Sep 2019 02:32:51 +0000 (02:32 +0000)]
MFC r352783:

Fix a typo.

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

4 years agoMFC r352737:
cy [Sun, 29 Sep 2019 03:41:15 +0000 (03:41 +0000)]
MFC r352737:

ipf mistakenly regards UDP packets with a checksum of 0xffff as bad.

Obtained from: NetBSD fil.c r1.30, NetBSD PR/54443

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

4 years agoMFC r352710:
dim [Sat, 28 Sep 2019 08:57:29 +0000 (08:57 +0000)]
MFC r352710:

Do not left-shift a negative number (inducing undefined behavior in
C/C++) in exp(3), expf(3), expm1(3) and expm1f(3) during intermediate
computations that compute the IEEE-754 bit pattern for |2**k| for
integer |k|.

The implementations of exp(3), expf(3), expm1(3) and expm1f(3) need to
compute IEEE-754 bit patterns for 2**k in certain places.  (k is an
integer and 2**k is exactly representable in IEEE-754.)

Currently they do things like 0x3FF0'0000+(k<<20), which is to say they
take the bit pattern representing 1 and then add directly to the
exponent field to get the desired power of two.  This is fine when k is
non-negative.

But when k<0 (and certain classes of input trigger this), this
left-shifts a negative number -- an operation with undefined behavior in
C and C++.

The desired semantics can be achieved by instead adding the
possibly-negative k to the IEEE-754 exponent bias to get the desired
exponent field, _then_ shifting that into its proper overall position.

(Note that in case of s_expm1.c and s_expm1f.c, there are SET_HIGH_WORD
and SET_FLOAT_WORD uses further down in each of these files that perform
shift operations involving k, but by these points k's range has been
restricted to 2 < k <= 56, and the shift operations under those
circumstances can't do anything that would be UB.)

Submitted by: Jeff Walden, https://github.com/jswalden
Obtained from: https://github.com/freebsd/freebsd/pull/411
Obtained from: https://github.com/freebsd/freebsd/pull/412

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

4 years agoMFC r351380:
cy [Sun, 25 Aug 2019 01:09:31 +0000 (01:09 +0000)]
MFC r351380:

Specifying array sizes for fully initialized tables at compile time is
redundant.

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

4 years agoMFC r350396:
hselasky [Wed, 14 Aug 2019 09:42:26 +0000 (09:42 +0000)]
MFC r350396:
Add support for tethering with Nokia 7 plus and the alike.

PR: 239495
Sponsored by: Mellanox Technologies

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

4 years agoMFC r350855: Upgrade to Bzip2 version 1.0.8.
delphij [Wed, 14 Aug 2019 06:41:22 +0000 (06:41 +0000)]
MFC r350855: Upgrade to Bzip2 version 1.0.8.

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

4 years agoMFC r349927, r349929:
cy [Fri, 12 Jul 2019 02:14:05 +0000 (02:14 +0000)]
MFC r349927, r349929:

r349927:
  Resolve IPv6 checksum errors with stateful inspection. According to
  PR/203585 this appears to have been broken by r235959, which predates
  the ipfilter 5.1.2 import into FreeBSD.

  The IPv6 checksum calculation is incorrect. To resolve this we call
  in6_cksum() to do the the heavy lifting for us, through a new function
  ipf_pcksum6(). Should we need to revisit this area again, a DTrace probe
  is added to aid with future debugging.

  Plus whitespace adjustments (r348989).

  PR: 203275, 203585
  Differential Revision: https://reviews.freebsd.org/D20583

r349929:
  Move the new ipf_pcksum6() function from ip_fil_freebsd.c to fil.c.
  The reason for this is that ipftest(8), which still works on FreeBSD-11,
  fails to link to it, breaking stable/11 builds.

  ipftest(8) was broken (segfault) sometime during the FreeBSD-12 cycle.
  glebius@ suggested we disable building it until I can get around to
  fixing it. Hence this was not caught in -current.

  The intention is to fix ipftest(8) as it is used by the netbsd-tests
  (imported by ngie@ many moons ago) for regression testing.

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

4 years agoMFC r348987, r348989:
cy [Fri, 12 Jul 2019 00:50:33 +0000 (00:50 +0000)]
MFC r348987, r348989:

Resolve IPv6 checksum errors with stateful inspection. According to
PR/203585 this appears to have been broken by r235959, which predates
the ipfilter 5.1.2 import into FreeBSD.

The IPv6 checksum calculation is incorrect. To resolve this we call
in6_cksum() to do the the heavy lifting for us, through a new function
ipf_pcksum6(). Should we need to revisit this area again, a DTrace probe
is added to aid with future debugging.

Plus whitespace adjustments (r348989).

PR: 203275, 203585
Differential Revision: https://reviews.freebsd.org/D20583

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

4 years agoMFC 349843:
cy [Thu, 11 Jul 2019 00:44:09 +0000 (00:44 +0000)]
MFC 349843:

Update frtuc struct comments. It not only defines TCP things we are
interested in but also UDP.

While at it document the source and destination port variables.

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

4 years agoMFC r349842:
cy [Thu, 11 Jul 2019 00:38:10 +0000 (00:38 +0000)]
MFC r349842:

Correct the description for the low port in the port compare struct.

Adjust the high port description to match that of the low port
description.

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

4 years agoMFC r349527,349538:
mm [Thu, 11 Jul 2019 00:22:10 +0000 (00:22 +0000)]
MFC r349527,349538:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #1217: RAR5 reader - fix ARM filter going beyond window buffer boundary
            (OSS-Fuzz 15431)
  PR #1218: Fixes to sparse file handling

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

4 years agoMFC r349503-349504:
cy [Fri, 5 Jul 2019 04:24:09 +0000 (04:24 +0000)]
MFC r349503-349504:

Document the -B, binary logfile, and the -C config file options.
Reference the ipmon.5 man page and ipmon.conf.

PR: 238816

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

4 years agoMFC r349505: Upgrade to Bzip2 version 1.0.7.
delphij [Thu, 4 Jul 2019 07:36:09 +0000 (07:36 +0000)]
MFC r349505: Upgrade to Bzip2 version 1.0.7.

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

4 years agoMFC r349409 and r349410:
hselasky [Wed, 3 Jul 2019 18:26:07 +0000 (18:26 +0000)]
MFC r349409 and r349410:
Fix support for LIBUSB_HOTPLUG_ENUMERATE in libusb. Currently all
devices are enumerated regardless of of the LIBUSB_HOTPLUG_ENUMERATE
flag. Make sure when the flag is not specified no arrival events are
generated for currently enumerated devices.

Sponsored by: Mellanox Technologies

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

4 years agoMFC r349370:
hselasky [Wed, 3 Jul 2019 18:19:29 +0000 (18:19 +0000)]
MFC r349370:
Fix parsing of corrupt data in usbdump(8). Check that the transfer
type array lookup is within bounds to avoid segfault.

PR: 238801
Sponsored by: Mellanox Technologies

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

4 years agoMFC r349448:
cy [Wed, 3 Jul 2019 18:11:22 +0000 (18:11 +0000)]
MFC r349448:

Fix a typo.

PR/238816 initially addressed updates to usage() however it has now
become a shopping list of fixes to ipmon man pages and usage().

PR: 238816

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

4 years agoMFC r348993,349135:
mm [Fri, 28 Jun 2019 22:36:27 +0000 (22:36 +0000)]
MFC r348993,349135:
Sync libarchive with vendor including security fixes

r348993:
  - version bumped to 3.4.0
  - check_symlinks_fsobj() without chdir() and fchdir()
  - bsdtar.1 manpage fixes
  - patches from OpenBSD to libarchive_fe/passphrase.c

r349135:
  PR #1212: RAR5 reader - window_mask was not updated correctly
            (OSS-Fuzz 15278)
  OSS-Fuzz 15120: RAR reader - extend use after free bugfix

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

4 years agoCorrect Konrad Zuse's year of birth.
grog [Sat, 22 Jun 2019 23:36:28 +0000 (23:36 +0000)]
Correct Konrad Zuse's year of birth.

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

4 years agoMFC r348797:
hselasky [Tue, 11 Jun 2019 08:53:26 +0000 (08:53 +0000)]
MFC r348797:
Fix for reading the configuration descriptor in libusb. Catch invalid
configuration descriptor reads early on to avoid issues with devices
that don't check for a valid USB configuration read request.

Submitted by: takahiro.kurosawa@gmail.com
PR: 238412

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

4 years agoMFC r348631:
hselasky [Mon, 10 Jun 2019 13:37:38 +0000 (13:37 +0000)]
MFC r348631:
In usb(4) fix a lost completion event issue towards libusb(3). It may happen
if a USB transfer is cancelled that we need to fake a completion event.
Implement missing support in ugen_fs_copy_out() to handle this.

This fixes issues with webcamd(8) and firefox.

Sponsored by: Mellanox Technologies

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

4 years agoMFC r348604:
hselasky [Mon, 10 Jun 2019 13:17:39 +0000 (13:17 +0000)]
MFC r348604:
In xhci(4) there is no stream ID in the completion TRB.
Instead iterate all the stream IDs in stream mode to find
the matching USB transfer.

Sponsored by: Mellanox Technologies

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

4 years agoMFC r348603:
hselasky [Sun, 9 Jun 2019 08:22:38 +0000 (08:22 +0000)]
MFC r348603:
Make sure the DMA tags get freed in mlx5en(4).

Sponsored by: Mellanox Technologies

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

4 years agoMFC r347990:
mm [Tue, 4 Jun 2019 10:36:26 +0000 (10:36 +0000)]
MFC r347990:
Sync libarchive with vendor.

Relevant vendor changes:
  Issue #795: XAR - do not try to add xattrs without an allocated name
  PR #812: non-recursive option for extract and list
  PR #958: support reading metadata from compressed files
  PR #999: add --exclude-vcs option to bsdtar
  Issue #1062: treat empty archives with a GNU volume header as valid
  PR #1074: Handle ZIP files with trailing 0s in the extra fields
            (Android APK archives)
  PR #1109: Ignore padding in Zip extra field data (Android APK archives)
  PR #1167: fix problems related to unreadable directories
  Issue #1168: fix handling of strtol() and strtoul()
  PR #1172: RAR5 - fix invalid window buffer read in E8E9 filter
  PR #1174: ZIP reader - fix of MSZIP signature parsing
  PR #1175: gzip filter - fix reading files larger than 4GB from memory
  PR #1177: gzip filter - fix memory leak with repeated header reads
  PR #1180: ZIP reader - add support for Info-ZIP Unicode Path Extra Field
  PR #1181: RAR5 - fix merge_block() recursion
            (OSS-Fuzz 12999, 13029, 13144, 13478, 13490)
  PR #1183: fix memory leak when decompressing ZIP files with LZMA
  PR #1184: fix RAR5 OSS-Fuzz issues 12466, 14490, 14491, 12817
    OSS-Fuzz 12466: RAR5 - fix buffer overflow when parsing huffman tables
    OSS-Fuzz 14490, 14491: RAR5 - fix bad shift-left operations
    OSS-Fuzz 12817: RAR5 - handle a case with truncated huffman tables
  PR #1186: RAR5 - fix invalid type used for dictionary size mask
            (OSS-Fuzz 14537)
  PR #1187: RAR5 - fix integer overflow (OSS-Fuzz 14555)
  PR #1190: RAR5 - RAR5 don't try to unpack entries marked as directories
            (OSS-Fuzz 14574)
  PR #1196: RAR5 - fix a potential SIGSEGV on 32-bit builds
  OSS-Fuzz 2582: RAR - fix use after free if there is an invalid entry
  OSS-Fuzz 14331: RAR5 - fix maximum owner name length
  OSS-Fuzz 13965: RAR5 - use unsigned int for volume number + range check

  Additional RAR5 reader changes:
    - support symlinks, hardlinks, file owner, file group, versioned files
    - change ARCHIVE_FORMAT_RAR_V5 to 0x100000
    - set correct mode for readonly directories
    - support readonly, hidden and system Windows file attributes

MFC r347999:
Install missing data file for
lib.libarchive.functional_test.test_read_format_zip_utf8_paths

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

4 years agoMF11 r347561.
obrien [Tue, 14 May 2019 04:34:58 +0000 (04:34 +0000)]
MF11 r347561.
MFC r344085: Note that readpassphrase() came into FreeBSD's libc at 4.6.

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

4 years agoMFC r347234:
cy [Fri, 10 May 2019 01:02:07 +0000 (01:02 +0000)]
MFC r347234:

Improve the legibility of the login.access.5 man page by separating
each argument into its own paragraph.

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

4 years agoMFC: r346856
rmacklem [Mon, 6 May 2019 03:20:02 +0000 (03:20 +0000)]
MFC: r346856
Add #ifdef INET6 around declaration of nbuf.

It was reported that without #ifdef INET6 around the declaration of "nbuf",
a build would report an unused variable. For some reason, I didn't see that
warning when I did a build, but it seems reasonable to add these #ifdef INET6's.

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

4 years agoMFC: r346365
rmacklem [Fri, 3 May 2019 02:30:01 +0000 (02:30 +0000)]
MFC: r346365
Fix the NFSv4.0 server so that it does not support NFSv4.1 attributes.

During inspection of a packet trace, I noticed that an NFSv4.0 mount
reported that it supported attributes that are only defined for NFSv4.1.
In practice, this bug appears to be benign, since NFSv4.0 clients will
not use attributes that were added for NFSv4.1.
However, this was not correct and this patch fixes the NFSv4.0 server
so that it only supports attributes defined for NFSv4.0.
It also adds a definition for NFSv4.1 attributes that can only be set,
although it is only defined as 0 for now.
This is anticipation of the addition of support for the NFSv4.1 mode+mask
attribute soon.

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

4 years agoMFC: r346709
rmacklem [Thu, 2 May 2019 01:17:55 +0000 (01:17 +0000)]
MFC: r346709
Add support to nfsdumpstate for printing of INET6 addresses for locks.

r346190 added support for printing of INET6 addresses for the "-o" option
(all opens) but missed adding support for INET6 addresses for the "-l" option.
This patch adds that support.

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

4 years agoMFC r346804:
cy [Wed, 1 May 2019 01:49:33 +0000 (01:49 +0000)]
MFC r346804:

Left justify a function header brace as it should be.
No functional change.

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

5 years agoMFC: r346191
rmacklem [Sat, 27 Apr 2019 02:43:27 +0000 (02:43 +0000)]
MFC: r346191
Add support for INET6 addresses to the kernel code that dumps open/lock state.

PR#223036 reported that INET6 callback addresses were not printed by
nfsdumpstate(8). This kernel patch adds INET6 addresses to the dump structure,
so that nfsdumpstate(8) can print them out, post-r346190.

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

5 years agoMFC: r346190
rmacklem [Sat, 27 Apr 2019 02:34:10 +0000 (02:34 +0000)]
MFC: r346190
Fix nfsdumpstate(8) so that it can print out INET6 callback addresses.

The patch adds support for printing of INET6 callback addresses.
It also adds the #ifdef INET, INET6 as requested by bz@.

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

5 years agoMFC r346229 and r346248:
hselasky [Thu, 25 Apr 2019 12:02:17 +0000 (12:02 +0000)]
MFC r346229 and r346248:
Fix spelling and remove superfluous USB keyword.

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

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

5 years agoFix Makefile after r346467 merged incorrect include file.
rmacklem [Sun, 21 Apr 2019 14:45:18 +0000 (14:45 +0000)]
Fix Makefile after r346467 merged incorrect include file.

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

5 years agoMFC: r345995
rmacklem [Sun, 21 Apr 2019 01:33:13 +0000 (01:33 +0000)]
MFC: r345995
Delete the BUGS entry related to failing when jails are enabled.

r345994 has finally fixed the bug that caused the nfsuserd(8) daemon to
fail when jails were enabled, so delete the BUGS entry from the man page.

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

5 years agoMFC: r345994
rmacklem [Sun, 21 Apr 2019 01:25:27 +0000 (01:25 +0000)]
MFC: r345994
Fix nfsuserd so that it handles the mapped localhost address when jails
are enabled.

The nfsuserd(8) daemon does not function correctly when jails are enabled,
since localhost gets mapped to another IP address and, as such, the upcall
RPC fails.
This patch fixes the problem by doing a getsockname(2) of a socket mapped
to localhost to find out what the correct address is for the comparison
test with the upcall's from IP address.
This patch also adds INET6 support and the required #ifdef's for INET and
INET6. It now uses INET6 by default for the upcalls, if the kernel has
INET6 support and the daemon is also built with INET6 support.

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

5 years agoMFC: r345992, r346087
rmacklem [Sun, 21 Apr 2019 01:15:54 +0000 (01:15 +0000)]
MFC: r345992, r346087
Add INET6 support for the upcalls to the nfsuserd daemon.

The kernel code uses UDP to do upcalls to the nfsuserd(8) daemon to get
updates to the username<->uid and groupname<->gid mappings.
A change to AF_LOCAL last year had to be reverted, since it could result
in vnode locking issues on the AF_LOCAL socket.
This patch adds INET6 support and the required #ifdef INET and INET6
to the code.

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

5 years agoMFC: r345866
rmacklem [Thu, 18 Apr 2019 02:54:07 +0000 (02:54 +0000)]
MFC: r345866
Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled.

The code enabled when "DEBUG" is defined uses mem_alloc(), which is a
malloc(.., M_RPC, M_WAITOK | M_ZERO), but then calls gss_release_buffer()
which does a free(.., M_GSSAPI) to free the memory.
This patch fixes the problem by replacing mem_alloc() with a
malloc(.., M_GSSAPI, M_WAITOK | M_ZERO).
This bug affects almost no one, since the sources are not normally built
with "DEBUG" defined.

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

5 years agoMFC: r345818, r345828
rmacklem [Tue, 16 Apr 2019 02:48:04 +0000 (02:48 +0000)]
MFC: r345818, r345828
Fix a race in the RPCSEC_GSS server code that caused crashes.

When a new client structure was allocated, it was added to the list
so that it was visible to other threads before the expiry time was
initialized, with only a single reference count.
The caller would increment the reference count, but it was possible
for another thread to decrement the reference count to zero and free
the structure before the caller incremented the reference count.
This could occur because the expiry time was still set to zero when
the new client structure was inserted in the list and the list was
unlocked.

This patch fixes the race by initializing the reference count to two
and initializing all fields, including the expiry time, before inserting
it in the list.

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

5 years agoMFC r345497:
mm [Wed, 10 Apr 2019 21:46:28 +0000 (21:46 +0000)]
MFC r345497:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #1153: fixed 2 bugs in ZIP reader [1]
  PR #1143: ensure archive_read_disk_entry_from_file() uses ARCHIVE_READ_DISK
  Changes to file flags code, support more file flags on FreeBSD:
    UF_OFFLINE, UF_READONLY, UF_SPARSE, UF_REPARSE, UF_SYSTEM
    UF_ARCHIVE is not supported by intention (yet)

PR: 236300 [1]

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

5 years agoMFC r345499:
hselasky [Fri, 5 Apr 2019 11:35:58 +0000 (11:35 +0000)]
MFC r345499:
Change all kernel C-type macros into static inline functions.

The current kernel C-type macros might obscurely hide the fact that
the input argument might be used multiple times.

This breaks code like:
isalpha(*ptr++)

Use static inline functions instead of macros to fix this.

Reviewed by: kib @
Differential Revision: https://reviews.freebsd.org/D19694
Sponsored by: Mellanox Technologies

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

5 years agoMFC r345359, r345384:
markj [Thu, 4 Apr 2019 02:08:36 +0000 (02:08 +0000)]
MFC r345359, r345384:
Don't attempt to measure TSC skew when running as a VM guest.

PR: 218452

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

5 years agoMFC r345611:
rpokala [Wed, 3 Apr 2019 06:37:25 +0000 (06:37 +0000)]
MFC r345611:

Teach jedec_dimm(4) to be more forgiving of non-fatal errors.

It looks like some DIMMs claim to have a TSOD, but actually don't. Some
claim they weren't able to change the SPD page, but they did. Neither of
those should be fatal errors.

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

5 years agoMFC r345252:
avos [Mon, 1 Apr 2019 07:54:27 +0000 (07:54 +0000)]
MFC r345252:
net80211: correct check for SMPS node flags updates

Update node flags when driver supports SMPS, not when it is disabled or
in dynamic mode ((iv_htcaps & HTCAP_SMPS) != 0).

Was checked with RTL8188EE (1T1R), STA mode - 'smps' word should disappear
from 'ifconfig wlan0' output.

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

5 years agoMFC r345524: Import tzdata 2019a
philip [Fri, 29 Mar 2019 01:41:51 +0000 (01:41 +0000)]
MFC r345524: Import tzdata 2019a

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

5 years agoMFC r345318:
avos [Wed, 27 Mar 2019 08:55:59 +0000 (08:55 +0000)]
MFC r345318:
lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not
exist

Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation.

Was checked with a command from PR 210770:
lockf -n /tmp/doesnotexist echo; echo $?

PR: 210770

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

5 years agoMFC r342961:
hselasky [Tue, 26 Mar 2019 13:53:33 +0000 (13:53 +0000)]
MFC r342961:
snd_uaudio: Add quirks for Edirol UA-25EX in advanced driver mode.

Extend the vendor class USB audio quirk to cover devices without
the USB audio control descriptor.

PR: 234794
Sponsored by: Mellanox Technologies

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

5 years agoMFC r344795:
hselasky [Tue, 26 Mar 2019 13:46:47 +0000 (13:46 +0000)]
MFC r344795:
Fix typos in libusb.

Found by: Denis Ahrens <denis@h3q.com>
Sponsored by: Mellanox Technologies

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

5 years agoMFC r345009:
dab [Mon, 25 Mar 2019 17:04:33 +0000 (17:04 +0000)]
MFC r345009:

Fix a scribbler in the PMS driver.

The ESGL bit was left uninitialized when executing the REPORT LUNS
ioctl. This could allow a zeroed data buffer to be treated as a
scatter/gather list. The firmware would eventually walk past the end
of the data buffer, potentially find what looked like a valid
address/length pair, and write the result to semi-random memory.

Obtained from:  Dell EMC Isilon
Sponsored by:   Dell EMC Isilon

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

5 years agoMFC r344748:
avos [Fri, 15 Mar 2019 08:21:11 +0000 (08:21 +0000)]
MFC r344748:
Allow to build ifconfig(8) without wireless support

The change removes SIOC[GS]IEEE80211 handling from ifconfig(8)
if WITHOUT_WIRELESS_SUPPORT=yes is set in src.conf(5).

Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D19289

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

5 years agoMFC r344470:
dab [Thu, 7 Mar 2019 13:11:00 +0000 (13:11 +0000)]
MFC r344470:

Fix several Coverity-detected issues in newsyslog.

- CID 1394815, CID 1305673: Dereference before null check - memory was
  allocated and the allocation checked for NULL with a call to errx()
  if it failed. Code below that was guaranteed that the pointer was
  non-NULL, but there was another check for NULL at the exit of the
  function (after the memory had already been referenced). Eliminate
  the useless NULL check.

- CID 1007452: Resource leak - Storage intended to be allocated and
  returned to the caller was never freed. This was the result of a
  regression in the function signature introduced in r208648 (2010)
  (thanks for that find, @cem!). Fixed by altering the function
  signature and passing the allocated memory to the caller as
  intended. This also fixes PR158794.

- CID 1008620: Logically dead code in newsyslog.c - This was a direct
  result of CID 1007452. Since the memory allocated as described there
  was not returned to the caller, a subsequent check for the memory
  having been allocated was dead code. Returning the memory
  re-animates the code that is the subject of this CID.

- CID 1006131: Unused value - in parsing a configuration file, a
  pointer to the end of the last field was saved, but not used after
  that. Rewrite to use the pointer value. This could have been fixed
  by avoiding the assignment altogether, but this solutions more
  closely follows the pattern used in the preceding code.

PR:             158794
Reported by:    Coverity, Ken-ichi EZURA <k.ezura@gmail.com> (PR158794)

Sponsored by: Dell EMC Isilon

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

5 years agoMFC r344245:
avos [Mon, 4 Mar 2019 03:38:43 +0000 (03:38 +0000)]
MFC r344245:
snmp_hostres(3): fix a typo in sanity checks in handle_chunk()

PR: 204253
Submitted by: David Binderman <dcb314@hotmail.com>

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

5 years agoMFC r344244:
avos [Mon, 4 Mar 2019 03:30:39 +0000 (03:30 +0000)]
MFC r344244:
Fix memory / resource leaks in usr.sbin/rpc.ypupdated/update.c

Re-apply r343909 to this file to get the issue fixed.

PR: 204956
Reported by: David Binderman <dcb314@hotmail.com>

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

5 years agoMFC r344477:
hselasky [Fri, 1 Mar 2019 08:06:23 +0000 (08:06 +0000)]
MFC r344477:
Add new USB quirk.

PR: 235897
Sponsored by: Mellanox Technologies

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

5 years agoMFC r344063,r344088:
mm [Thu, 28 Feb 2019 22:57:09 +0000 (22:57 +0000)]
MFC r344063,r344088:

MFC r344063:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #1085: Fix a null pointer dereference bug in zip writer
  PR #1110: ZIP reader added support for XZ, LZMA, PPMD8 and BZIP2
            decopmpression
  PR #1116: Add support for 64-bit ar format
  PR #1120: Fix a 7zip crash [1] and a ISO9660 infinite loop [2]
  PR #1125: RAR5 reader - fix an invalid read and a memory leak
  PR #1131: POSIX reader - do not fail when tree_current_lstat() fails
            due to ENOENT [3]
  PR #1134: Delete unnecessary null pointer checks before calls of free()
  OSS-Fuzz 10843: Force intermediate to uint64_t to make UBSAN happy.
  OSS-Fuzz 11011: Avoid buffer overflow in rar5 reader

MFC r344088:
  archive_read_disk_posix.c: initialize delayed_errno

PR: 233006 [3]
Security: CVE-2019-1000019 [1], CVE-2019-1000020 [2]

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

5 years agoMFC r344473:
dab [Wed, 27 Feb 2019 22:29:37 +0000 (22:29 +0000)]
MFC r344473:

CID 1332000: Logically dead code in sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c

A pointer is first tested for NULL. If non-NULL, another pointer is
set equal to the first. The second pointer is then checked for NULL
and an error path taken if so. This second test and the associated
path is dead code as the pointer value, having just been checked for
NULL, cannot be NULL at this point. Remove the dead code.

Sponsored by: Dell EMC Isilon

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

5 years agoMFC r344198:
avos [Thu, 21 Feb 2019 09:54:57 +0000 (09:54 +0000)]
MFC r344198:
GC ATA_REQUEST_TIMEOUT option remnants

It was removed from code in r249083 and from sys/conf/options in r249213.

PR: 193935, 222170

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

5 years agoMFC r344024:
dab [Wed, 20 Feb 2019 22:49:09 +0000 (22:49 +0000)]
MFC r344024:

CID 1009492: Logically dead code in sys/cam/scsi/scsi_xpt.c

In `probedone()`, for the `PROBE_REPORT_LUNS` case, all paths that
fall to the bottom of the case set `lp` to `NULL`, so the test for a
non-NULL value of `lp` and call to `free()` if true is dead code as
the test can never be true. Fix by eliminating the whole if
statement. To guard against a possible future change that accidentally
violates this assumption, use a `KASSERT()` to catch if `lp` is
non-NULL.

Sponsored by: Dell EMC Isilon

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

5 years agoMFC r343501:
avos [Sun, 17 Feb 2019 02:58:44 +0000 (02:58 +0000)]
MFC r343501:
Add NO_6_BYTE / NO_SYNC_CACHE quirks for (C|D|E).* Olympus digital cameras

PR: 97472
Submitted by: Fabio Luis Girardi <papelhigienico@gmail.com>
Reviewed by: imp

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

5 years agoMFC r343980:
avos [Sat, 16 Feb 2019 01:05:22 +0000 (01:05 +0000)]
MFC r343980:
ifconfig(8): display 802.11n rates correctly for 'roam:rate' parameter

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

5 years agoMFC r343909:
avos [Sat, 16 Feb 2019 00:37:08 +0000 (00:37 +0000)]
MFC r343909:
newkey(8): fix 'tmpname' memory leak (always) and input file descriptor leak
when output file cannot be opened

PR: 201732
Reported by: David Binderman <dcb314@hotmail.com>

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

5 years agoMFC r343905:
hselasky [Fri, 15 Feb 2019 09:22:23 +0000 (09:22 +0000)]
MFC r343905:
Improve Bluetooth device discovery support for Android and Microsoft devices.

Tested using the virtual_bt_speaker(8) tool from the virtual_oss(8)
project at github.com.

PR: 210089
Sponsored by: Mellanox Technologies

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

5 years agoMFC r343591:
cy [Thu, 14 Feb 2019 00:52:03 +0000 (00:52 +0000)]
MFC r343591:

Do not obtain an already held read lock. This causes a witness panic when
ipfs is invoked. This is the second of two panics resolving PR 235110.

PR: 235110
Reported by: David.Boyd49@twc.com

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

5 years agoMFC r343871:
avos [Wed, 13 Feb 2019 09:28:48 +0000 (09:28 +0000)]
MFC r343871:
recoverdisk(1): fclose() file supplied via '-r readlist' parameter when
it's no longer needed

PR: 204952
Reported by: David Binderman <dcb314@hotmail.com>

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

5 years agoMFC r343870:
avos [Tue, 12 Feb 2019 07:03:37 +0000 (07:03 +0000)]
MFC r343870:
ipcs(1): drop obsolete error checking

This code is unreachable since r77551.

PR: 201728

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

5 years agoMFC r343698, r343700:
avos [Sun, 10 Feb 2019 20:42:06 +0000 (20:42 +0000)]
MFC r343698, r343700:
ifconfig(8): display management / multicast wlan(4) rates properly

For 11n / 11ac we are still using non-11n rates for management and
multicast traffic by default; check 'MCS rate' bit to determine how
to print them correctly.

PR: 161035

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

5 years agoMFC r343837:
avos [Sun, 10 Feb 2019 20:26:12 +0000 (20:26 +0000)]
MFC r343837:
net80211(4): validate supplied roam:rate values from ifconfig(8)

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

5 years agoMFC r343604:
avos [Fri, 8 Feb 2019 14:32:27 +0000 (14:32 +0000)]
MFC r343604:
bwn(4): reuse ieee80211_tx_complete function

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

5 years agoMFC r343603:
avos [Fri, 8 Feb 2019 13:57:28 +0000 (13:57 +0000)]
MFC r343603:
ipw(4): reuse ieee80211_tx_complete function

This should partially fix 'netstat -b -I wlan0' output

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

5 years agoMFC r343572:
hselasky [Fri, 8 Feb 2019 10:28:13 +0000 (10:28 +0000)]
MFC r343572:
Add support for Audio Sink and Audio Source profiles to sdpd(8).

This allows user-space programs like virtual_oss(8) to act
as a Bluetooth speaker device.

Sponsored by: Mellanox Technologies

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

5 years agoMFC r343683:
avos [Fri, 8 Feb 2019 04:48:12 +0000 (04:48 +0000)]
MFC r343683:
Do not acquire IEEE80211_LOCK twice in cac_timeout(); reuse
locked function instead.

It is externally visible since r257065.

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

5 years agoMFC r337272:
bdrewery [Thu, 7 Feb 2019 23:57:28 +0000 (23:57 +0000)]
MFC r337272:

  Fix some filemon path logging issues.

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

5 years agoMFC r343633:
bdrewery [Thu, 7 Feb 2019 21:37:06 +0000 (21:37 +0000)]
MFC r343633:

  Shar files may be seen as binary by grep.

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

5 years agoMFC r343682:
avos [Wed, 6 Feb 2019 02:35:56 +0000 (02:35 +0000)]
MFC r343682:
sys/dev/wtap: Check return value from malloc(..., M_NOWAIT) and
drop unneeded cast.

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

5 years agoMFC r343681:
avos [Wed, 6 Feb 2019 02:18:11 +0000 (02:18 +0000)]
MFC r343681:
run(4): fix allocated memory type for ieee80211_node(4)

PR: 177366

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

5 years agoMFC r343574:
avos [Wed, 6 Feb 2019 02:07:37 +0000 (02:07 +0000)]
MFC r343574:
Fix compilation with 'option NDISAPI + device ndis' and
without 'device pccard' in the kernel config file.

PR: 171532
Reported by: Robert Bonomi <bonomi@host128.r-bonomi.com>

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