/[base]/stable/10
ViewVC logotype

Log of /stable/10

View Directory Listing Directory Listing


Sticky Revision:


Revision 368708 - Directory Listing
Modified Wed Dec 16 22:25:40 2020 UTC (3 years, 6 months ago) by mm
MFC r368207,368607:

MFC r368207:
Update libarchive to 3.5.0

Relevant vendor changes:
  Issue #1258: add archive_read_support_filter_by_code()
  PR #1347: mtree digest reader support
  Issue #1381: skip hardlinks pointing to itself on extraction
  PR #1387: fix writing of cpio archives with hardlinks without file type
  PR #1388: fix rdev field in cpio format for device nodes
  PR #1389: completed support for UTF-8 encoding conversion
  PR #1405: more formats in archive_read_support_format_by_code()
  PR #1408: fix uninitialized size in rar5_read_data
  PR #1409: system extended attribute support
  PR #1435: support for decompression of symbolic links in zipx archives
  Issue #1456: memory leak after unsuccessful archive_write_open_filename

MFC r368607:
Sync libarchive with vendor.

Vendor changes:
  Issue #1461: Unbreak build without lzma
  Issue #1462: warc reader: Fix build with gcc11
  Issue #1463: Fix code compatibility in test_archive_read_support.c
  Issue #1464: Use built-in strnlen on platforms where not available
  Issue #1465: warc reader: fix undefined behaviour in deconst() function


Revision 368505 - Directory Listing
Modified Thu Dec 10 09:39:27 2020 UTC (3 years, 6 months ago) by hselasky
Fix bug in ifconfig regarding VLAN creation.

Detection of VLAN interface type must happen before detection of
interface type by prefix. Else the following sequence of commands will
try to create a LAGG interface instead of a VLAN interface, which
accidentially works, because the data pointed to by the ifr_data
pointer is not parsed by the VLAN create ioctl(2).

How to reproduce:
# ifconfig lagg0 create
# ifconfig lagg0.256 create

This is a direct commit.

Differential Revision:	https://reviews.freebsd.org/D27521
Tested by:		raul.munoz@custos.es
Sponsored by:		Mellanox Technologies // NVIDIA Networking


Revision 367155 - Directory Listing
Modified Fri Oct 30 00:34:40 2020 UTC (3 years, 8 months ago) by cy
MFC r367070:

Remove a random equal sign from the example. It should not be there.
It's a syntax error.

PR:		210303
Reported by:	leventelist at gmail.com


Revision 366804 - Directory Listing
Modified Sun Oct 18 01:57:49 2020 UTC (3 years, 8 months ago) by grog
Correct location and date of the Boston Shoemakers' organization,
which significantly predated the USA.

Reference: http://www.famousdaily.com/history/boston-shoemakers-form-first-us-labor-organization.html


Revision 364084 - Directory Listing
Modified Mon Aug 10 17:35:58 2020 UTC (3 years, 10 months ago) by dim
MFC r363988:

Fix clang 11 -Wformat warnings in yp_mkdb:

usr.sbin/yp_mkdb/yp_mkdb.c:91:40: error: format specifies type 'char *' but the argument has type 'void *' [-Werror,-Wformat]
                printf("%.*s %.*s\n", (int)key.size, key.data, (int)data.size,
                        ~~~~                         ^~~~~~~~
usr.sbin/yp_mkdb/yp_mkdb.c:92:7: error: format specifies type 'char *' but the argument has type 'void *' [-Werror,-Wformat]
                    data.data);
                    ^~~~~~~~~


Revision 363685 - Directory Listing
Modified Thu Jul 30 02:52:55 2020 UTC (3 years, 11 months ago) by cy
MFC r363453:

Document the IPFILTER_PREDEFINED environment variable.

PR:		248088
Reported by:	joeb1@a1poweruser.com


Revision 362800 - Directory Listing
Modified Tue Jun 30 15:53:52 2020 UTC (4 years ago) by dim
MFC r362623:

Fix copy/paste mistake in kvm_getswapinfo(3)

It seems this manpage was copied from kvm_getloadavg(3), but the
DIAGNOSTICS section was not updated completely. Update the section with
correct information about a return value of -1.


Revision 362368 - Directory Listing
Modified Fri Jun 19 07:07:10 2020 UTC (4 years ago) by rpokala
MFC r362078:

Decode the "LACP Fast Timeout" LAGG option flag

r286700 added the "lacp_fast_timeout" option to `ifconfig', but we forgot to
include the new option in the string used to decode the option bits. Add
"LACP_FAST_TIMO" to LAGG_OPT_BITS.

Also, s/LAGG_OPT_LACP_TIMEOUT/LAGG_OPT_LACP_FAST_TIMO/g , to be clearer that
the flag indicates "Fast Timeout" mode.


Revision 362313 - Directory Listing
Modified Thu Jun 18 10:41:51 2020 UTC (4 years ago) by hselasky
MFC r362045:
Make sure packets generated by raw IP code is let through by mlx5en(4).

Allow the TCP header to reside in the mbuf following the IP header.
Else such packets will get dropped.

Backtrace:
mlx5e_sq_xmit()
mlx5e_xmit()
ether_output_frame()
ether_output()
ip_output_send()
ip_output()
rip_output()
sosend_generic()
sosend()
kern_sendit()
sendit()
sys_sendto()
amd64_syscall()
fast_syscall_common()

Sponsored by:	Mellanox Technologies


Revision 362310 - Directory Listing
Modified Thu Jun 18 10:31:21 2020 UTC (4 years ago) by hselasky
MFC r362044:
Extend use of unlikely() in the fast path, in mlx5en(4).

Typically the TCP/IP headers fit within the first mbuf and should not
trigger any of the error cases. Use unlikely() for these cases.

No functional change.

Sponsored by:	Mellanox Technologies


Revision 362307 - Directory Listing
Modified Thu Jun 18 10:17:36 2020 UTC (4 years ago) by hselasky
MFC r362043:
Use const keyword when parsing the TCP/IP header in the fast path in mlx5en(4).

When parsing the TCP/IP header in the fast path, make it clear by using
the const keyword, no fields are to be modified inside the transmitted
packet.

No functional change.

Sponsored by:	Mellanox Technologies


Revision 362224 - Directory Listing
Modified Tue Jun 16 12:21:55 2020 UTC (4 years ago) by kevans
MFC r361977: libusb: improve compatibility

Specifically, add LIBUSB_CLASS_PHYSICAL and the libusb_has_capability API.
Descriptions and functionality for these derived from the
documentation at [0].  The current set of capabilities are all supported by
libusb.

These were detected as missing after updating net/freerdp to 2.1.1, which
attempted to use both.

[0] http://libusb.sourceforge.net/api-1.0/group__libusb__misc.html


Revision 362168 - Directory Listing
Modified Sun Jun 14 05:33:25 2020 UTC (4 years ago) by hselasky
MFC r362056:
Add missing range checks when receiving USB ethernet packets.

Found by:	Ilja Van Sprundel, IOActive
Sponsored by:	Mellanox Technologies


Revision 362134 - Directory Listing
Modified Fri Jun 12 23:02:34 2020 UTC (4 years ago) by mm
MFC r361294:
Update libarchive to 3.4.3

Relevant vendor changes:
  PR #1352: support negative zstd compression levels
  PR #1359: improve zstd version checking
  PR #1348: support RHT.security.selinux from GNU tar
  PR #1357: support for archives compressed with pzstd
  PR #1367: fix issues in acl tests
  PR #1372: child handling cleanup
  PR #1378: fix memory leak from passphrase callback


Revision 361928 - Directory Listing
Modified Mon Jun 8 14:00:11 2020 UTC (4 years ago) by cy
MFC 361721:

Per-rule hit counts (-h) can be used with either -i (input) or -o (output)
filter rule lists.


Revision 361921 - Directory Listing
Modified Mon Jun 8 09:34:16 2020 UTC (4 years ago) by hselasky
MFC r361827:
USB HID descriptors may push/pop the current state to allow
description of items residing in a so-called union. FreeBSD currently
only supports 4 such push levels.

If the push level is not restored within the processing of the same
HID item, an invalid memory location may be used for subsequent HID
item processing.

Verify that the push level is always valid when processing HID items.

Reported by:	Andy Nguyen (Google)
Sponsored by:	Mellanox Technologies


Revision 361916 - Directory Listing
Modified Mon Jun 8 09:31:14 2020 UTC (4 years ago) by hselasky
MFC r361582:
Fix check for wMaxPacketSize in USB bluetooth driver,
in case device is not FULL speed.

Sponsored by:	Mellanox Technologies


Revision 361912 - Directory Listing
Modified Mon Jun 8 09:28:26 2020 UTC (4 years ago) by hselasky
MFC r361581:
Implement helper function, usbd_get_max_frame_length(), which allows kernel
device drivers to correctly predict the default USB transfer frame length.

Sponsored by:	Mellanox Technologies


Revision 361908 - Directory Listing
Modified Mon Jun 8 09:25:01 2020 UTC (4 years ago) by hselasky
MFC r361577:
Don't allow USB device drivers to parent own interface.
It will prevent proper USB device detach.

Sponsored by:	Mellanox Technologies


Revision 361358 - Directory Listing
Modified Fri May 22 09:01:26 2020 UTC (4 years, 1 month ago) by hselasky
MFC r361075:
Assign process group of the TTY under the "proctree_lock".

This fixes a race where concurrent calls to doenterpgrp() and
leavepgrp() while TIOCSCTTY is executing may result in tp->t_pgrp
changing value so that tty_rel_pgrp() misses clearing it to NULL. For
more details refer to the use of pgdelete() in the kernel.

No functional change intended.

Panic backtrace:
__mtx_lock_sleep() # page fault due to using destroyed mutex
tty_signal_pgrp()
tty_ioctl()
ptsdev_ioctl()
kern_ioctl()
sys_ioctl()
amd64_syscall()

Sponsored by:	Mellanox Technologies


Revision 361157 - Directory Listing
Modified Mon May 18 08:45:24 2020 UTC (4 years, 1 month ago) by hselasky
MFC r360092:
Bring HCI error messages up-to-date.
See Bluetooth v5.6 core specification Vol.1 Part F: Controller error codes.

Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245737
Sponsored by:	Mellanox Technologies


Revision 361154 - Directory Listing
Modified Mon May 18 08:43:05 2020 UTC (4 years, 1 month ago) by hselasky
MFC r360070:
Add missing feature descriptions to hci_features2str().

The list of possible features in hccontrol/features2str() is incomplete.
Refer to "Bluetooth Core Specification 5.2 Vol. 2 Part C. 3.3 Feature Mask Definition".

Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245354
Sponsored by:	Mellanox Technologies


Revision 360542 - Directory Listing
Modified Fri May 1 18:27:14 2020 UTC (4 years, 2 months ago) by dim
MFC r360322:

Fix race between prebuilding libsbuf and libgeom

The latter needs the former, but with a multi-job build on a fast
machine, the race is sometimes lost. This leads to "ld: error: unable to
find library -lsbuf", when linking libgeom.so.

Submitted by:	kevans


Revision 360340 - Directory Listing
Modified Sun Apr 26 15:52:41 2020 UTC (4 years, 2 months ago) by dim
Remove stray "DO NOT DELETE" line, which bmake apparently put in without
my knowledge or consent. I did not intend to commit this.


Revision 360338 - Directory Listing
Modified Sun Apr 26 15:50:32 2020 UTC (4 years, 2 months ago) by dim
Add casts to work around harmless -Werror warnings from clang 10.0.0,
such as:

usr.sbin/timed/timed/networkdelta.c:160:13: error: implicit conversion from 'long' to 'float' changes value from 9223372036854775807 to 9223372036854775808
      [-Werror,-Wimplicit-int-float-conversion]
        float ap = LONG_MAX;            /* bounds on the median */
              ~~   ^~~~~~~~

Direct commit to stable/{10,11,12}, since timed has been removed from
FreeBSD 13.


Revision 360335 - Directory Listing
Modified Sun Apr 26 08:38:10 2020 UTC (4 years, 2 months ago) by hselasky
MFC r360075:
Set the maximum exit latency to 0 for XHCI USB 3.0 devices, because we
don't implement link power management, LPM.

This fixes error code XHCI_TRB_ERROR_BANDWIDTH for isochronous USB 3.0
transactions.

Submitted by:	Horse Ma <Shichun.Ma@dell.com>
Sponsored by:	Mellanox Technologies


Revision 360332 - Directory Listing
Modified Sun Apr 26 08:35:32 2020 UTC (4 years, 2 months ago) by hselasky
MFC r359968:
Cast all ioctl command arguments through uint32_t internally.

Hide debug print showing use of sign extended ioctl command argument
under INVARIANTS. The print is available to all and can easily fill
up the logs.

No functional change intended.

Sponsored by:	Mellanox Technologies


Revision 360326 - Directory Listing
Modified Sat Apr 25 22:23:34 2020 UTC (4 years, 2 months ago) by dim
MFC r348282 (by lwhsu):

Remove an uneeded indentation introduced in r286196 to silence gcc warnging

Sponsored by:	The FreeBSD Foundation


Revision 360304 - Directory Listing
Modified Sat Apr 25 13:14:06 2020 UTC (4 years, 2 months ago) by dim
MFC r348445 (by lwhsu):

Add the missing braces to fix the code not guarded by the if clause and has
misleading indentation.  This is found by gcc -Wmisleading-indentation

Approved by:	erj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20428


Revision 360303 - Directory Listing
Modified Sat Apr 25 13:10:17 2020 UTC (4 years, 2 months ago) by dim
Fix misleading indentation in sys/dev/drm2/radeon/evergreen.c

This fixes the following warning from recent versions of clang and gcc:

sys/dev/drm2/radeon/evergreen.c:554:4: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]

Direct commit to stable/{10,11,12}, since this driver has been removed
from FreeBSD 13.


Revision 360301 - Directory Listing
Modified Sat Apr 25 12:57:20 2020 UTC (4 years, 2 months ago) by dim
MFC r354834 (by jhibbits):

bsnmp: Fix operator precedence in error check in table_check_response

Summary:
The ?: operator has a lower precedence than == and &&, so the result will always
be recorded as true.  Found by gcc8.

Reviewed by:	ngie, ae
Differential Revision: https://reviews.freebsd.org/D22427


Revision 359890 - Directory Listing
Modified Mon Apr 13 16:34:21 2020 UTC (4 years, 2 months ago) by hselasky
MFC r359446:
Add support for multiple playback and recording devices per physical USB audio
device. This requires some structural refactoring inside the driver, mostly
about converting existing audio channel structures into arrays.

The main audio mixer is provided by the first PCM instance.
The non-first audio instances may only have a software mixer for PCM playback.

Tested by:	Horse Ma <Shichun.Ma@dell.com>
Sponsored by:	Mellanox Technologies


Revision 359887 - Directory Listing
Modified Mon Apr 13 16:32:18 2020 UTC (4 years, 2 months ago) by hselasky
MFC r359440:
Implement new mixer API to return the device pointer based on the mixer pointer.

Sponsored by:	Mellanox Technologies


Revision 359884 - Directory Listing
Modified Mon Apr 13 16:30:10 2020 UTC (4 years, 2 months ago) by hselasky
MFC r359356:
Change default microphone level from 0 to 25.

Discussed with:	Horse Ma <Shichun.Ma@dell.com>
Sponsored by:	Mellanox Technologies


Revision 359881 - Directory Listing
Modified Mon Apr 13 16:28:15 2020 UTC (4 years, 2 months ago) by hselasky
MFC r359355:
Improve USB audio mixer support for USB audio class 1 and 2.
- make sure volume controls are correctly mapped to "pcm" and "rec" depending
  on how they deliver audio to the USB host.
- make sure there are no duplicate record selections.
- remove internal only mixer class type.
- don't add software volume controls for recording only.
- some minor mixer code cleanup.

Tested by:	Horse Ma <Shichun.Ma@dell.com>
Sponsored by:	Mellanox Technologies


Revision 359878 - Directory Listing
Modified Mon Apr 13 16:26:15 2020 UTC (4 years, 2 months ago) by hselasky
MFC r359323:
Be more intelligent when classifying USB audio terminal types, so that we
don't end up using SOUND_MIXER_VOLUME for all undefined types.

Sponsored by:	Mellanox Technologies


Revision 359875 - Directory Listing
Modified Mon Apr 13 16:24:21 2020 UTC (4 years, 2 months ago) by hselasky
MFC r359322:
Make mute controls available for USB audio mixers.

Submitted by:	Horse Ma <Shichun.Ma@dell.com>
Sponsored by:	Mellanox Technologies


Revision 359872 - Directory Listing
Modified Mon Apr 13 16:22:15 2020 UTC (4 years, 2 months ago) by hselasky
MFC r359321:
Factor out USB audio mixer value range check.

Sponsored by:	Mellanox Technologies


Revision 359869 - Directory Listing
Modified Mon Apr 13 16:19:45 2020 UTC (4 years, 2 months ago) by hselasky
MFC r359320:
Avoid scaling USB audio mixer values twice.

Sponsored by:	Mellanox Technologies


Revision 359855 - Directory Listing
Modified Mon Apr 13 09:02:17 2020 UTC (4 years, 2 months ago) by hselasky
MFC r359653:
Count number of times transmit ring is out of buffers in mlx5en(4).

Differential Revision:	https://reviews.freebsd.org/D24273
Sponsored by:	Mellanox Technologies


Revision 359847 - Directory Listing
Modified Mon Apr 13 08:33:49 2020 UTC (4 years, 2 months ago) by hselasky
MFC r359654:
Ensure a minimum inline size of 16 bytes in mlx5en(4).

This includes 14 bytes of ethernet header and 2 bytes of VLAN header.

This allows for making assumptions about the inline size limit
in the fast transmit path later on.

Use a signed integer variable to catch underflow.

Sponsored by:	Mellanox Technologies


Revision 359318 - Directory Listing
Modified Thu Mar 26 05:38:33 2020 UTC (4 years, 3 months ago) by hselasky
MFC r359120:
Correctly implement support for remote wakeup for USB 3.0 device.

Submitted by:	Horse Ma <Shichun.Ma@dell.com>
Sponsored by:	Mellanox Technologies


Revision 359161 - Directory Listing
Modified Fri Mar 20 14:26:08 2020 UTC (4 years, 3 months ago) by avatar
MFC r338422: Adding support for CS46xx MIDI output.

With this patch, users can play the MIDI files through /dev/sequencer
device with tools like playmidi. The audio output will go through
the external MIDI device such like wavetable synthesis card.

Reviewed by:	matk (a long time ago), kib
Tested with:	Terratec SiXPack 5.1+ + Yamaha DB50XG


Revision 359123 - Directory Listing
Modified Thu Mar 19 09:20:41 2020 UTC (4 years, 3 months ago) by hselasky
MFC r359014:
Fix for double unlock in ipoib.

The ipoib_unicast_send() function is not supposed to unlock the priv lock.

Sponsored by:	Mellanox Technologies


Revision 358949 - Directory Listing
Modified Fri Mar 13 09:18:28 2020 UTC (4 years, 3 months ago) by hselasky
MFC r358841:
Fix for building libusb under Linux.

Sponsored by:	Mellanox Technologies


Revision 358941 - Directory Listing
Modified Fri Mar 13 08:57:22 2020 UTC (4 years, 3 months ago) by hselasky
MFC r358838:
Add support for the device statistics IOCTL, needed by the coming
linux_libusb upgrade.

Sponsored by:	Mellanox Technologies


Revision 358937 - Directory Listing
Modified Fri Mar 13 08:53:59 2020 UTC (4 years, 3 months ago) by hselasky
MFC r358695:
Define more subsystem orders.
Intended for use with module_init_order() in the LinuxKPI.

Sponsored by:	Mellanox Technologies


Revision 358933 - Directory Listing
Modified Fri Mar 13 08:50:56 2020 UTC (4 years, 3 months ago) by hselasky
MFC r358694:
Fix some whitespace issues in ipoib.

Sponsored by:	Mellanox Technologies


Revision 358927 - Directory Listing
Modified Fri Mar 13 01:06:08 2020 UTC (4 years, 3 months ago) by mm
MFC r358533:
Sync libarchive with vendor.

Relevant vendor changes:
  Issue #1257: Add testcase for ZIPX files with LZMA_STREAM_END marker
  PR #1331: cpio.5: fix hard link description
  Issue #1335: archive_read.c: fix UBSan warning about undefined behavior
  Issue #1338: XAR reader: fix UBSan warning about undefined behavior
  Issue #1339: bsdcpio_test: fix datatype in from_hex()
  Issue #1341: Safe writes: delete temporary file if rename fails.
  Issue #1341: Safe writes: improve error handling


Revision 358879 - Directory Listing
Modified Wed Mar 11 08:26:11 2020 UTC (4 years, 3 months ago) by hselasky
MFC r358629:
Implement a detaching flag for the sound(4) subsystem to take
appropriate actions when we are trying to detach an audio device,
but cannot because someone is using it.

This avoids applications having to wait for the DSP read data
timeout before they receive any error indication.
Tested with virtual_oss(8).

Remove some unused definitions while at it.

PR:		194727
Sponsored by:	Mellanox Technologies


Revision 358875 - Directory Listing
Modified Wed Mar 11 08:21:48 2020 UTC (4 years, 3 months ago) by hselasky
MFC r358738:
Remove the power bit from the super speed root hub port status register
because it clobbers the super speed link status when a device is in super
speed mode. Currently the power bit is not needed for anything in the USB
hub driver.

This fixes USB warm reset for super speed devices.

Tested by:	Shichun.Ma@dell.com
Sponsored by:	Mellanox Technologies


Revision 358119 - Directory Listing
Modified Wed Feb 19 15:30:13 2020 UTC (4 years, 4 months ago) by gjb
Remove reference to the freebsd-mobile mailing list to fix the build.

This is a direct commit to stable/10 as part of an ongoing investigation
regarding transient and silent build failures.

Sponsored by:	Rubicon Communications, LLC (netgate.com)


Revision 358090 - Directory Listing
Modified Wed Feb 19 01:51:44 2020 UTC (4 years, 4 months ago) by mm
MFC r356212,r356366,r356416,r357785
Update libarchive to version 3.4.2

Relevant vendor changes (r356212):
  Issue #351: Refactor and implement private state logic for write filters
  PR #1252: RAR5 reader - verify window size for solid files (OSS-Fuzz 15482)
  PR #1255: zip writer - don't append unused NUL for directories
  PR #1260: Fix sparse file offset overflow on 32-bit systems
  PR #1263: UNICODE filename support for reading lha/lzh format
  Issue #1276: Bugfix and optimize archive_wstring_append_from_mbs()
  PR #1288: Add the "xattrhdr" option to pax write options
  PR #1295: 7z reader - fix reading archives with digests in PackInfo
  PR #1296: RAR5 reader - verify window size for multivolume archives
  PR #1297: ZIP reader - support LZMA_STREAM_END marker in 'lzma alone' files
  Issue #1298: Fix a heap-buffer-overflow in archive_string_append_from_wcs()
  OSS-Fuzz 19360, 19362: LHA reader - plug two memory leaks on error
  Fix possible off-by-one when dealing with readlink(2)

Relevant vendor changes (r356366):
  Issue #1302: Plug memory leak on failure of archive_write_client_open()

Relevant vendor changes (r356416):
  Issue #1302: Re-do fix for archive_write_client_open()

Relevant vendor changes (r357785):
  PR #1289: atomic extraction support (bsdtar -x --safe-writes)
  PR #1308: big endian fix for UTF16 support in LHA reader
  PR #1326: reject RAR5 files that declare invalid header flags
  Issue #987: fix support 7z archive entries with Delta filter
  Issue #1317: fix compression output buffer handling in XAR writer
  Issue #1319: fix uname or gname longer than 32 characters in pax writer
  Issue #1325: fix use after free when archiving hardlinks in ISO9660 or XAR
  Use localtime_r() and gmtime_r() instead of localtime() and gmtime()


Revision 358035 - Directory Listing
Modified Mon Feb 17 19:31:34 2020 UTC (4 years, 4 months ago) by rmacklem
MFC: r357149
Fix a crash in the NFSv4 server.

The PR reported a crash that occurred when a file was removed while
client(s) were actively doing lock operations on it.
Since nfsvno_getvp() will return NULL when the file does not exist,
the bug was obvious and easy to fix via this patch. It is a little
surprising that this wasn't found sooner, but I guess the above
case rarely occurs.

PR:		242768


Revision 357582 - Directory Listing
Modified Wed Feb 5 18:26:50 2020 UTC (4 years, 4 months ago) by emaste
MFC r357212: libfetch: fix urldecode buffer overrun

Reported by:	Duncan Overbruck
Security:	CVE-2020-7450


Revision 357523 - Directory Listing
Modified Tue Feb 4 19:46:29 2020 UTC (4 years, 4 months ago) by dim
MFC r357340:

Merge r357339 from the clang1000-import branch:

Fix the following -Werror warning from clang 10.0.0 in bsnmpd:

usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1661:4: error: misleading indentation; statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation]
                        return (-1);
                        ^
usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1658:5: note: previous statement is here
                } else
                  ^

The intent was to group the return statement with the previous syslog()
call.


Revision 357520 - Directory Listing
Modified Tue Feb 4 19:35:40 2020 UTC (4 years, 4 months ago) by dim
MFC r357272:

Merge r357271 from the clang1000-import branch:

Fix the following -Werror warning from clang 10.0.0 in bsnmpd:

usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c:1235:43: error: overlapping comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare]
                            begemotBridgeStpPortEnable_enabled ||
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~

Work around it by casting the enum values to the type of val->v.integer.


Revision 357519 - Directory Listing
Modified Tue Feb 4 19:31:01 2020 UTC (4 years, 4 months ago) by dim
MFC r357268:

Merge r357260 from the clang1000-import branch:

Fix the following -Werror warning from clang 10.0.0 in procstat:

usr.bin/procstat/procstat_sigs.c:79:3: error: misleading indentation; statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation]
                xo_close_container(name);
                ^
usr.bin/procstat/procstat_sigs.c:77:4: note: previous statement is here
        } else
          ^

The intent was to group the xo_close_container() call to the previous
snprintf() call.


Revision 357518 - Directory Listing
Modified Tue Feb 4 19:24:10 2020 UTC (4 years, 4 months ago) by dim
MFC r357269:

Merge r357267 from the clang1000-import branch:

Fix the following -Werror warning from clang 10.0.0 in tip:

usr.bin/tip/tip/tip.c:428:4: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
                        if (gch == EOF)
                        ^
usr.bin/tip/tip/tip.c:426:5: note: previous statement is here
                } else if (!cumode && gch == character(value(FORCE)))
                  ^

The intent was to have the EOF check grouped with the getchar() call
just above it.  This was accidentally introduced in r354624.


Revision 357517 - Directory Listing
Modified Tue Feb 4 19:19:48 2020 UTC (4 years, 4 months ago) by dim
MFC r357223:

Merge r357222 from the clang1000-import branch:

Fix the following -Werror warning from clang 10.0.0 in rbootd:

libexec/rbootd/rmpproto.c:335:49: error: multiple unsequenced modifications to 'filename' [-Werror,-Wunsequenced]
        filename = (filename = strrchr(filepath,'/'))? ++filename: filepath;
                 ~                                     ^


Revision 357439 - Directory Listing
Modified Mon Feb 3 11:05:59 2020 UTC (4 years, 4 months ago) by hselasky
MFC r357298:
Add missing mutex unlock in failure case.

Differential Revision:	https://reviews.freebsd.org/D23430
Submitted by:	cem
Reported by:	Coverity
Coverity CID:	1368773
Sponsored by:	Mellanox Technologies


Revision 357432 - Directory Listing
Modified Mon Feb 3 10:50:52 2020 UTC (4 years, 4 months ago) by hselasky
MFC r356952:
Add new USB ID to uslcom(4).

Submitted by:	Oleg Sharoyko <osharoiko@gmail.com>
PR:		243494
Sponsored by:	Mellanox Technologies


Revision 357429 - Directory Listing
Modified Mon Feb 3 10:47:44 2020 UTC (4 years, 4 months ago) by hselasky
MFC r356633:
Make sure the VNET is properly set when reaping mbufs in ipoib.
Else the following panic may happen:

panic()
icmp_error()
ipoib_cm_mb_reap()
linux_work_fn()
taskqueue_run_locked()
taskqueue_thread_loop()
fork_exit()
fork_trampoline()

Submitted by:	Andreas Kempe <kempe@lysator.liu.se>
Sponsored by:	Mellanox Technologies


Revision 357351 - Directory Listing
Modified Fri Jan 31 20:04:32 2020 UTC (4 years, 5 months ago) by dim
MFC r357226:

Merge r357224 from the clang1000-import branch:

Fix the following -Werror warning from clang 10.0.0 in binutils:

contrib/binutils/bfd/peicode.h:1356:3: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
                if (efi)
                ^
contrib/binutils/bfd/peicode.h:1353:8: note: previous statement is here
              if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
              ^
contrib/binutils/bfd/peicode.h:1370:3: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
                if (!efi)
                ^
contrib/binutils/bfd/peicode.h:1367:8: note: previous statement is here
              if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
              ^


Revision 356783 - Directory Listing
Modified Thu Jan 16 08:53:59 2020 UTC (4 years, 5 months ago) by hselasky
MFC r356545:
Fix a XHCI driver issue with Intel's Gemini Lake SOC.

Do not configure any endpoint twice, but instead keep track of which
endpoints are configured on a per device basis, and use an evaluate
endpoint context command instead. When changing the configuration make
sure all endpoints get deconfigured and the configured endpoint mask
is reset.

This fixes an issue where an endpoint might stop working if there is
an error and the endpoint needs to be reconfigured as a part of the
error recovery mechanism in the FreeBSD USB stack.

Tested by:	Shichun.Ma@dell.com
Sponsored by:	Mellanox Technologies


Revision 356780 - Directory Listing
Modified Thu Jan 16 08:27:30 2020 UTC (4 years, 5 months ago) by eugen
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


Revision 356681 - Directory Listing
Modified Mon Jan 13 11:33:03 2020 UTC (4 years, 5 months ago) by hselasky
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


Revision 356412 - Directory Listing
Modified Mon Jan 6 09:51:54 2020 UTC (4 years, 5 months ago) by hselasky
MFC r356201:
Fix spelling.

PR:		242891
Sponsored by:	Mellanox Technologies


Revision 356408 - Directory Listing
Modified Mon Jan 6 09:40:59 2020 UTC (4 years, 5 months ago) by hselasky
MFC r356137:
Implement dump_stats command for usbconfig(8).

This command is useful when debugging USB device issues.

Sponsored by:	Mellanox Technologies


Revision 356407 - Directory Listing
Modified Mon Jan 6 09:40:18 2020 UTC (4 years, 5 months ago) by hselasky
MFC r351146:
Implement detach_kernel_driver command in usbconfig(8).

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


Revision 356406 - Directory Listing
Modified Mon Jan 6 09:38:57 2020 UTC (4 years, 5 months ago) by hselasky
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


Revision 356405 - Directory Listing
Modified Mon Jan 6 09:38:08 2020 UTC (4 years, 5 months ago) by hselasky
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


Revision 356404 - Directory Listing
Modified Mon Jan 6 09:37:13 2020 UTC (4 years, 5 months ago) by hselasky
MFC r330875:
Add "usbconfig dump_all_desc", a subcommand to dump all device and config
descriptors.

Reviewed by:	hselasky@
Sponsored by:	The FreeBSD Foundation


Revision 356403 - Directory Listing
Modified Mon Jan 6 09:35:57 2020 UTC (4 years, 5 months ago) by hselasky
MFC r327522:
Fix warnings from "mandoc -Tlint -Wwarning".

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


Revision 356402 - Directory Listing
Modified Mon Jan 6 09:35:11 2020 UTC (4 years, 5 months ago) by hselasky
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


Revision 356399 - Directory Listing
Modified Mon Jan 6 09:22:33 2020 UTC (4 years, 5 months ago) by hselasky
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


Revision 356396 - Directory Listing
Modified Mon Jan 6 09:16:41 2020 UTC (4 years, 5 months ago) by hselasky
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


Revision 356074 - Directory Listing
Modified Wed Dec 25 09:34:16 2019 UTC (4 years, 6 months ago) by hselasky
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


Revision 355419 - Directory Listing
Modified Thu Dec 5 14:53:46 2019 UTC (4 years, 6 months ago) by hselasky
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


Revision 355395 - Directory Listing
Modified Wed Dec 4 17:45:34 2019 UTC (4 years, 6 months ago) by dim
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


Revision 354596 - Directory Listing
Modified Sun Nov 10 17:33:10 2019 UTC (4 years, 7 months ago) by dim
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


Revision 354393 - Directory Listing
Modified Wed Nov 6 14:34:14 2019 UTC (4 years, 7 months ago) by imp
Replace current with stable/10

Direct commit because not relevant to other branches

Reported by:	Jamie Landeg-Jones


Revision 354209 - Directory Listing
Modified Wed Oct 30 21:49:34 2019 UTC (4 years, 8 months ago) by marius
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.


Revision 353418 - Directory Listing
Modified Thu Oct 10 23:27:02 2019 UTC (4 years, 8 months ago) by np
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.


Revision 353414 - Directory Listing
Modified Thu Oct 10 20:28:34 2019 UTC (4 years, 8 months ago) by np
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.


Revision 353377 - Directory Listing
Modified Wed Oct 9 22:19:48 2019 UTC (4 years, 8 months ago) by mm
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


Revision 353179 - Directory Listing
Modified Mon Oct 7 08:25:25 2019 UTC (4 years, 8 months ago) by hselasky
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


Revision 353175 - Directory Listing
Modified Mon Oct 7 08:13:49 2019 UTC (4 years, 8 months ago) by hselasky
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


Revision 353171 - Directory Listing
Modified Mon Oct 7 08:11:12 2019 UTC (4 years, 8 months ago) by hselasky
MFC r352554:
The maximum TD size is 31 and not 15.

Found at:	EuroBSDcon 2019
Sponsored by:	Mellanox Technologies


Revision 353164 - Directory Listing
Modified Mon Oct 7 04:44:01 2019 UTC (4 years, 8 months ago) by cy
MFC r353116:

Add missing definition in DEBUG code.


Revision 352884 - Directory Listing
Modified Mon Sep 30 02:32:51 2019 UTC (4 years, 9 months ago) by cy
MFC r352783:

Fix a typo.


Revision 352866 - Directory Listing
Modified Sun Sep 29 03:41:15 2019 UTC (4 years, 9 months ago) by cy
MFC r352737:

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

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


Revision 352835 - Directory Listing
Modified Sat Sep 28 08:57:29 2019 UTC (4 years, 9 months ago) by dim
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


Revision 351468 - Directory Listing
Modified Sun Aug 25 01:09:31 2019 UTC (4 years, 10 months ago) by cy
MFC r351380:

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


Revision 351017 - Directory Listing
Modified Wed Aug 14 09:42:26 2019 UTC (4 years, 10 months ago) by hselasky
MFC r350396:
Add support for tethering with Nokia 7 plus and the alike.

PR:		239495
Sponsored by:	Mellanox Technologies


Revision 351008 - Directory Listing
Modified Wed Aug 14 06:41:22 2019 UTC (4 years, 10 months ago) by delphij
MFC r350855: Upgrade to Bzip2 version 1.0.8.


Revision 349931 - Directory Listing
Modified Fri Jul 12 02:14:05 2019 UTC (4 years, 11 months ago) by cy
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.


Revision 349927 - Directory Listing
Modified Fri Jul 12 00:50:33 2019 UTC (4 years, 11 months ago) by cy
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


Revision 349903 - Directory Listing
Modified Thu Jul 11 00:44:09 2019 UTC (4 years, 11 months ago) by cy
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.


Revision 349902 - Directory Listing
Added Thu Jul 11 00:38:10 2019 UTC (4 years, 11 months ago) by cy
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.



  ViewVC Help
Powered by ViewVC 1.1.27