]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoDocument r327234, tcpdump(1) 4.9.2.
gjb [Wed, 18 Apr 2018 14:42:56 +0000 (14:42 +0000)]
Document r327234, tcpdump(1) 4.9.2.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r331662, tzdata version 2018d.
gjb [Wed, 18 Apr 2018 14:42:55 +0000 (14:42 +0000)]
Document r331662, tzdata version 2018d.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r331500, TIAO USB multi-protocol adapter support.
gjb [Wed, 18 Apr 2018 14:42:54 +0000 (14:42 +0000)]
Document r331500, TIAO USB multi-protocol adapter support.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r326892, Amazon EC2 instances now use Amazon Time Sync
gjb [Wed, 18 Apr 2018 14:42:53 +0000 (14:42 +0000)]
Document r326892, Amazon EC2 instances now use Amazon Time Sync
Service, NTP service internal to the EC2 infrastructure.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r323136 which I overlooked, OpenSSH 7.5p1.
gjb [Wed, 18 Apr 2018 14:42:52 +0000 (14:42 +0000)]
Document r323136 which I overlooked, OpenSSH 7.5p1.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r323134, OpenSSH version 7.4p1.
gjb [Wed, 18 Apr 2018 14:42:51 +0000 (14:42 +0000)]
Document r323134, OpenSSH version 7.4p1.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r331638, OpenSSL 1.0.2o.
gjb [Wed, 18 Apr 2018 14:42:50 +0000 (14:42 +0000)]
Document r331638, OpenSSL 1.0.2o.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r321092, ln(1) '-F' behavior fixed.
gjb [Wed, 18 Apr 2018 14:42:49 +0000 (14:42 +0000)]
Document r321092, ln(1) '-F' behavior fixed.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r324270, ps(1) realtime and idle priorities in state flags.
gjb [Wed, 18 Apr 2018 14:42:48 +0000 (14:42 +0000)]
Document r324270, ps(1) realtime and idle priorities in state flags.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r324271, ps(1) capsicum capability mode state information.
gjb [Wed, 18 Apr 2018 14:42:47 +0000 (14:42 +0000)]
Document r324271, ps(1) capsicum capability mode state information.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r328140, df(1) '--si' alias to '-H'.
gjb [Wed, 18 Apr 2018 14:42:46 +0000 (14:42 +0000)]
Document r328140, df(1) '--si' alias to '-H'.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r331471, ps(1) 'jail' keyword.
gjb [Wed, 18 Apr 2018 14:42:45 +0000 (14:42 +0000)]
Document r331471, ps(1) 'jail' keyword.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r330570, less(1) v530.
gjb [Wed, 18 Apr 2018 14:42:44 +0000 (14:42 +0000)]
Document r330570, less(1) v530.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r331246, bmake version 20180222.
gjb [Wed, 18 Apr 2018 14:42:43 +0000 (14:42 +0000)]
Document r331246, bmake version 20180222.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r331838, clang, lld, lldb, llvm, etc. update to 6.0.0.
gjb [Wed, 18 Apr 2018 14:42:42 +0000 (14:42 +0000)]
Document r331838, clang, lld, lldb, llvm, etc. update to 6.0.0.

Sponsored by: The FreeBSD Foundation

6 years agoInitial pruning of the relnotes page post-11.1-RELEASE.
gjb [Wed, 18 Apr 2018 14:42:41 +0000 (14:42 +0000)]
Initial pruning of the relnotes page post-11.1-RELEASE.

Sponsored by: The FreeBSD Foundation

6 years agoMFC r332458:
ken [Tue, 17 Apr 2018 15:34:08 +0000 (15:34 +0000)]
MFC r332458:
  ------------------------------------------------------------------------
  r332458 | ken | 2018-04-12 15:21:18 -0600 (Thu, 12 Apr 2018) | 34 lines

  Handle Programmable Early Warning for control commands in sa(4).

  When the tape position is inside the Early Warning area, the tape
  drive will return a sense key of NO SENSE, and an ASC/ASCQ of
  0x00,0x02, which means: End-of-partition/medium detected".  If
  this was in response to a control command like WRITE FILEMARKS,
  we correctly translate this as informational status and return
  0 from saerror().

  Programmable Early Warning should be handled the same way, but
  we weren't handling it that way.  As a result, if a PEW status
  (sense key of NO SENSE, ASC/ASCQ of 0x00,0x07, "Programmable early
  warning detected") came back in response to a WRITE FILEMARKS,
  we returned an error.

  The impact of this was that if an application was writing to a
  sa(4) device, and a PEW area was set (in the Device Configuration
  Extension subpage -- mode page 0x10, subpage 1), and a filemark
  needed to be written on close, we could wind up returning an error
  to the user on close because of a "failure" to write the filemarks.

  It actually isn't a failure, but rather just a status report from
  the drive, and shouldn't be treated as a failure.

  sys/cam/scsi/scsi_sa.c:
   For control commands in saerror(), treat asc/ascq 0x00,0x07
   the same as 0x00,{0-5} -- not an error.  Return 0, since
   the command actually did succeed.

  Reported by: Dr. Andreas Haakh <andreas@haakh.de>
  Tested by: Dr. Andreas Haakh <andreas@haakh.de>
  Sponsored by: Spectra Logic
  ------------------------------------------------------------------------

6 years agoMFC r332421: vt: add three more cp437 mappings for vga textmode
emaste [Tue, 17 Apr 2018 12:51:28 +0000 (12:51 +0000)]
MFC r332421: vt: add three more cp437 mappings for vga textmode

In UTF-8 locales mandoc uses a number of characters outside of the Basic
Latin group, e.g. from general punctuation or miscellaneous mathematical
symbols, and these rendered as ? in text mode.

This change adds (char, replacement, code point, description):

    – - U+2013 En Dash
    ⟨ < U+27E8 Mathematical Left Angle Bracket
    ⟩ > U+27E9 Mathematical Right Angle Bracket

This change addresses some common cases; there are others that still
need to be added after a more thorough review.

PR: 227409
Sponsored by: The FreeBSD Foundation

6 years agoMFC r332387: Annotate geom modules with MODULE_VERSION
kevans [Tue, 17 Apr 2018 02:18:04 +0000 (02:18 +0000)]
MFC r332387: Annotate geom modules with MODULE_VERSION

GEOM ELI may double ask the password during boot. Once at loader time, and
once at init time.

This happens due a module loading bug. By default GEOM ELI caches the
password in the kernel, but without the MODULE_VERSION annotation, the
kernel loads over the kernel module, even if the GEOM ELI was compiled into
the kernel. In this case, the newly loaded module
purges/invalidates/overwrites the GEOM ELI's password cache, which causes
the double asking.

This MFC commit differs slightly from head, due to pc98 removal. These
changes were trivial and should be obvious.

6 years agoMFC r332390: make-memstick.sh: put partition args on separate lines
emaste [Tue, 17 Apr 2018 00:46:21 +0000 (00:46 +0000)]
MFC r332390: make-memstick.sh: put partition args on separate lines

This makes it easier to identify the individual partition types and
facilitates comparisons across architectures.

Sponsored by: The FreeBSD Foundation

6 years agoMFC of 332264, 332266, 332415:
mckusick [Tue, 17 Apr 2018 00:03:32 +0000 (00:03 +0000)]
MFC of 332264, 332266, 332415:

Check for errors in libufs getino() and gracefully fail descriptor
upgrade request in ufs_disk_write().

6 years agoMFC r332353:
tuexen [Mon, 16 Apr 2018 21:22:12 +0000 (21:22 +0000)]
MFC r332353:

Don't show the number of currently established SCTP associations,
since this is not monotonically increasing. It's number can be
derived from the other counters shown.

6 years agoMFC r332273:
tuexen [Mon, 16 Apr 2018 21:20:34 +0000 (21:20 +0000)]
MFC r332273:
Fix a logical inversion bug.
Thanks to Irene Ruengeler for finding and reporting this bug.

6 years agoMFC r332271:
tuexen [Mon, 16 Apr 2018 21:18:44 +0000 (21:18 +0000)]
MFC r332271:

Small cleanup, no functional change.

6 years agoMFC r332269:
tuexen [Mon, 16 Apr 2018 21:17:18 +0000 (21:17 +0000)]
MFC r332269:

Fix a signed/unsigned warning showing up for the userland stack
on some platforms.
Thanks to Felix Weinrank for reporting the issue.

6 years agoMFC 331324: Ensure thread library is initialized in pthread_testcancel().
jhb [Mon, 16 Apr 2018 20:45:21 +0000 (20:45 +0000)]
MFC 331324: Ensure thread library is initialized in pthread_testcancel().

Call _thr_check_init() before reading curthread in pthread_testcancel().

If a constructor in a library creates a semaphore via sem_init() and
then waits for it via sem_wait(), the program can core dump in
_pthread_testcancel() called from sem_wait().  This is because the
semaphore implementation lives in libc, so the library's constructors
can be run before libthr's constructors.

Sponsored by: DARPA / AFRL

6 years agoMFC r325313:
trasz [Mon, 16 Apr 2018 17:30:33 +0000 (17:30 +0000)]
MFC r325313:

Make syscall_timing(1) default to a temporary file when run without -p.

6 years agoMFC r325318:
trasz [Mon, 16 Apr 2018 17:29:50 +0000 (17:29 +0000)]
MFC r325318:

Add benchmark for access(2).

6 years agoMFC r325316:
trasz [Mon, 16 Apr 2018 17:28:59 +0000 (17:28 +0000)]
MFC r325316:

Add benchmark for getresuid(2) - three pointers, although only "output" ones,
and quite lightwait.

The purpose of this commit, and the previous one, is to be able to measure
overhead of pointer arguments - in case you're running a strange architecture
where pointers and integers are quite different things at the hardware level.

6 years agoMFC r325315:
trasz [Mon, 16 Apr 2018 17:27:13 +0000 (17:27 +0000)]
MFC r325315:

Add select(2) benchmark.  It takes four pointers; unfortunately it's
somewhat heavy.

6 years agoMFC r325314:
trasz [Mon, 16 Apr 2018 17:26:32 +0000 (17:26 +0000)]
MFC r325314:

Add getpriority(2) benchmark; it's a lightweight syscall which does pretty
much nothing - just like getuid(2) - but takes arguments.

6 years agoMFC r325317:
trasz [Mon, 16 Apr 2018 17:25:52 +0000 (17:25 +0000)]
MFC r325317:

Add bad_open benchmark, which measures failed opens by calling
open("", O_RDONLY);.

6 years agoMFC r331013:
trasz [Mon, 16 Apr 2018 17:24:33 +0000 (17:24 +0000)]
MFC r331013:

Fix iSCSI target crash on session reinstation.

The crash scenario goes like this: there's a thread waiting on "reinstate";
because it doesn't update the timeout counter it gets terminated by the
callout; at this point the maintenance thread starts the termination routine.
The first thread finishes waiting, proceeds to icl_conn_handoff(), and drops
the refcount, which allows the maintenance thread to free its resources.  At
this point another thread receives a PDU.  Boom.

PR: 222898, 219866
Sponsored by: playkey.net

6 years agoMFC r330937:
trasz [Mon, 16 Apr 2018 17:22:51 +0000 (17:22 +0000)]
MFC r330937:

Fix typo in a warning message.

6 years agoMFC r330741:
trasz [Mon, 16 Apr 2018 17:22:09 +0000 (17:22 +0000)]
MFC r330741:

Make iscsictl(1) display "Disabled" status for disabled sessions.

6 years agoMFC r330740:
trasz [Mon, 16 Apr 2018 17:21:26 +0000 (17:21 +0000)]
MFC r330740:

Check for duplicates when modifying an iSCSI session.  Previously we did
this check on open, but "iscsictl -M", or an iSCSI redirect received by
iscsid(8) could end up with two sessions with the same target name and
portal.

6 years agoMFC r330024:
trasz [Mon, 16 Apr 2018 17:18:06 +0000 (17:18 +0000)]
MFC r330024:

.Xr rctl(8) and cpuset(1).

PR: 225935

6 years agoMFC r328342:
trasz [Mon, 16 Apr 2018 17:15:26 +0000 (17:15 +0000)]
MFC r328342:

Add SPDX identifiers to linux_ptrace.c and cfumass.c.

6 years agoMFC r328336:
trasz [Mon, 16 Apr 2018 17:14:42 +0000 (17:14 +0000)]
MFC r328336:

Add missing SPDX identifier in iscsid(8).

6 years agoMFC r328335:
trasz [Mon, 16 Apr 2018 17:13:54 +0000 (17:13 +0000)]
MFC r328335:

Add SPDX identifiers for uefisign(8) sources.

6 years agoMFC r328195:
trasz [Mon, 16 Apr 2018 17:13:09 +0000 (17:13 +0000)]
MFC r328195:

Add usb_template(4) to RPI-B kernel config.  This is to support the USB OTG
functionality on Raspberry Pi 0.

6 years agoMFC r327777:
trasz [Mon, 16 Apr 2018 17:12:18 +0000 (17:12 +0000)]
MFC r327777:

Make nullfs properly report MNT_AUTOMOUNTED set on the nullfs mount itself,
instead of copying from the underlying filesystem.

PR: 224851

6 years agoMFC r326730:
trasz [Mon, 16 Apr 2018 17:08:58 +0000 (17:08 +0000)]
MFC r326730:

Move the DIAGNOSTIC check for lost iSCSI PDUs from icl_conn_close()
to icl_conn_free().  It's perfectly valid for the counter to be non-zero
in the former.

Sponsored by: playkey.net

6 years agoMFC r326471:
trasz [Mon, 16 Apr 2018 17:06:18 +0000 (17:06 +0000)]
MFC r326471:

Document autofs(6) sysctl variables.

PR: 219414

6 years agoMFC r330710, r330718-r330720
asomers [Mon, 16 Apr 2018 16:33:35 +0000 (16:33 +0000)]
MFC r330710, r330718-r330720

r330710:
tftpd: Flush files as soon as they are fully received

On an RRQ, tftpd doesn't exit as soon as it's finished receiving a file.
Instead, it waits five seconds just in case the client didn't receive the
server's last ACK and decides to resend the final DATA packet.
Unfortunately, this created a 5 second delay from when the client thinks
it's done sending the file, and when the file is available for other
processes.

Fix this bug by closing the file as soon as receipt is finished.

PR: 157700
Reported by: Barry Mishler <barry_mishler@yahoo.com>

r330718:
tftpd: Verify world-writability for WRQ when using relative paths

tftpd(8) says that files may only be written if they already exist and are
publicly writable.  tftpd.c verifies that a file is publicly writable if it
uses an absolute pathname.  However, if the pathname is relative, that check
is skipped.  Fix it.

Note that this is not a security vulnerability, because the transfer
ultimately doesn't work unless the file already exists and is owned by user
nobody.  Also, this bug does not affect the default configuration, because
the default uses the "-s" option which makes all pathnames absolute.

PR: 226004

r330719:
tftpd: Abort on an WRQ access violation

On a WRQ (write request) tftpd checks whether the client has access
permission for the file in question.  If not, then the write is prevented.
However, tftpd doesn't reply with an ERROR packet, nor does it abort.
Instead, it tries to receive the packet anyway.

The symptom is slightly different depending on the nature of the error.  If
the target file is nonexistent and tftpd lacks permission to create it, then
tftpd will willingly receive the file, but not write it anywhere.  If the
file exists but is not writable, then tftpd will fail to ACK to WRQ.

PR: 225996

r330720:
tftpd: reject unknown opcodes

If tftpd receives a command with an unknown opcode, it simply exits 1.  It
doesn't send an ERROR packet, and the client will hang waiting for one.  Fix
it.

PR: 226005

6 years agoMFC r330696, r330709, r330742, r331358
asomers [Mon, 16 Apr 2018 16:32:00 +0000 (16:32 +0000)]
MFC r330696, r330709, r330742, r331358

r330696:
Add some functional tests for tftpd(8)

tftpd(8) is difficult to test in isolation due to its relationship with
inetd.  Create a test program that mimics the behavior of tftp(1) and
inetd(8) and verifies tftpd's response in several different scenarios.

These test cases cover all of the basic TFTP protocol, but not the optional
parts.

PR: 157700
PR: 225996
PR: 226004
PR: 226005
Differential Revision: https://reviews.freebsd.org/D14310

r330709:
Commit missing file from r330696

X-MFC-With: 330696

r330742:
tftpd: fix the build of tests on i386 after 330696

It's those darn printf format specifiers again

Reported by: cy, kibab
X-MFC-With: 330696

r331358:
tftpd: misc Coverity cleanup in the tests

A bunch of unchecked return values from open(2) and read(2)

Reported by: Coverity
CID: 138690013869111386926138692813869321386942
CID: 13869611386979
X-MFC-With: 330696

6 years agoMFC r330627:
asomers [Mon, 16 Apr 2018 16:29:48 +0000 (16:29 +0000)]
MFC r330627:

g_bio(9): fix a documentation oversight from r163870

6 years agoMFC r330515:
asomers [Mon, 16 Apr 2018 16:28:23 +0000 (16:28 +0000)]
MFC r330515:

spray: fix the spelling in an output string

6 years agoMFC r330514:
asomers [Mon, 16 Apr 2018 16:27:08 +0000 (16:27 +0000)]
MFC r330514:

rpc.sprayd: raise WARNS to 6

6 years agoMFC r329874:
asomers [Mon, 16 Apr 2018 16:25:42 +0000 (16:25 +0000)]
MFC r329874:

Add tests for lagg(4) and other cloned network interfaces

Unfortunately, most of the tests are disabled because they fairly frequently
trigger panics.

Sponsored by: Spectra Logic Corp

6 years agoMFC r329845, r329872
asomers [Mon, 16 Apr 2018 16:24:36 +0000 (16:24 +0000)]
MFC r329845, r329872

r329845:
Fix numerous Coverity issues in mptutil

Most are memory or file descriptor leaks. Three were unannotated
fallthroughs in a switch/case statement. One was an integer overflow before
widen.

Reported by: Coverity
CID: 1007463 1007462 1007461 1007460 1007459 1007458 1007457
CID: 1006855 1006854 1006853 1006852 1006851 1006850 1006849
CID: 1006848 1006845 1006844 1006843 1006842 1006841 1006840
CID: 1006839 1006838 1006837 1006836 1006835 1006834 1006833
CID: 1006832 1006831 1006831 1006830 1006829 1008334 1008170
CID: 1008169 1008168
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D11013

r329872:
Delete copypasta

Reported by: rpokala
X-MFC-With: 329845
Sponsored by: Spectra Logic Corp

6 years agoMFC r329754:
asomers [Mon, 16 Apr 2018 16:23:32 +0000 (16:23 +0000)]
MFC r329754:

dhclient: raise WARNS to 4

Mostly const-correctness fixes. There were also some variable-shadowing,
unused variable, and a couple of sockaddr type-correctness changes. I also had
trouble with cast-align warnings. I was able to prove that one of them was a
false positive. But ultimately I had to disable the warning program-wide to
deal with the others.

Reviewed by: cem
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D14460

6 years agoMFC r328341:
trasz [Mon, 16 Apr 2018 16:22:00 +0000 (16:22 +0000)]
MFC r328341:

Add SPDX tags to iscsi(4).

6 years agoMFC r329606:
asomers [Mon, 16 Apr 2018 16:20:39 +0000 (16:20 +0000)]
MFC r329606:

tail: fix "tail -r" for piped input that begins with '\n'

A subtle logic bug, probably introduced in r311895, caused tail to print the
first two lines of piped input in forward order, if the very first character
was a newline.

PR: 222671
Reported by: Jim Long <freebsd-bugzilla@umpquanet.com>, pprocacci@gmail.com
Sponsored by: Spectra Logic Corp

6 years agoMFC r328590:
trasz [Mon, 16 Apr 2018 16:20:21 +0000 (16:20 +0000)]
MFC r328590:

Document the new hw.usb.template behaviour.

6 years agoMFC r328589:
trasz [Mon, 16 Apr 2018 16:19:31 +0000 (16:19 +0000)]
MFC r328589:

Make the handler routine for the hw.usb.template sysctl trigger the USB
host to reprobe the bus by switching the USB pull up resistors off and
back on.  In other words - when FreeBSD is configured as a USB device,
changing the sysctl will be immediately noticed by the machine it's
connected to.

Relnotes: yes
Sponsored by: The FreeBSD Foundation

6 years agoMFC r328338:
trasz [Mon, 16 Apr 2018 16:16:24 +0000 (16:16 +0000)]
MFC r328338:

Add SPDX tags for automount(8) et al.

6 years agoMFC r328339:
trasz [Mon, 16 Apr 2018 16:15:31 +0000 (16:15 +0000)]
MFC r328339:

Add SPDX tags to autofs(5).

6 years agoMFC r328337:
trasz [Mon, 16 Apr 2018 16:14:05 +0000 (16:14 +0000)]
MFC r328337:

Add missing SPDX tags for ctld(8).

6 years agoMFC r326430:
trasz [Mon, 16 Apr 2018 16:12:30 +0000 (16:12 +0000)]
MFC r326430:

Add "vmaddr" ps(1) keyword.

6 years agoMFC r326248:
trasz [Mon, 16 Apr 2018 16:10:16 +0000 (16:10 +0000)]
MFC r326248:

.Xr pmcstat(8) from kgmon(8) and gprof(1).

6 years agoMFC r325403:
trasz [Mon, 16 Apr 2018 16:06:27 +0000 (16:06 +0000)]
MFC r325403:

Add missing MLINKS for disk_add_alias(9).

6 years agoMFC r331546:
kp [Mon, 16 Apr 2018 16:02:09 +0000 (16:02 +0000)]
MFC r331546:

pf: reload and resync do the same thing

The reload and resync commands for the startup script do exactly the same
thing, so implement one as a call to the other.

6 years agoMFC r329312 by eadler@:
trasz [Mon, 16 Apr 2018 16:01:06 +0000 (16:01 +0000)]
MFC r329312 by eadler@:

etc: clean up trailing whitespace in autofs

6 years agoMFC r326252:
trasz [Mon, 16 Apr 2018 15:59:51 +0000 (15:59 +0000)]
MFC r326252:

Add /etc/autofs/include_nis, a non-rewriting NIS map.

6 years agoMFC r326251:
trasz [Mon, 16 Apr 2018 15:58:53 +0000 (15:58 +0000)]
MFC r326251:

Rename /etc/autofs/include_nis to /etc/autofs/include_nis_nullfs, to indicate
that this script provides nullfs map rewriting for local mounts.

6 years agoMFC r326250:
trasz [Mon, 16 Apr 2018 15:58:02 +0000 (15:58 +0000)]
MFC r326250:

Change formatting; no functional changes.

6 years agoMFC r325392:
trasz [Mon, 16 Apr 2018 15:57:18 +0000 (15:57 +0000)]
MFC r325392:

Add NIS automounter map, which supports rewriting of self-hosted locations
to make them nullfs.

PR: 221010

6 years agoMFC r325400:
trasz [Mon, 16 Apr 2018 15:54:38 +0000 (15:54 +0000)]
MFC r325400:

Make autofs(5) rc scripts run earlier, matching those for amd(8).

This helps when you have some daemons that need to access automounted shares.

PR: 221011

6 years agoMFC r325390:
trasz [Mon, 16 Apr 2018 15:53:44 +0000 (15:53 +0000)]
MFC r325390:

Use proper naming in a debug message.

6 years agoMFC r325312:
trasz [Mon, 16 Apr 2018 15:52:52 +0000 (15:52 +0000)]
MFC r325312:

Add fetchbench, a trivial HTTP benchmark based on fetch(1).

6 years agoMFC r330875:
trasz [Mon, 16 Apr 2018 15:51:19 +0000 (15:51 +0000)]
MFC r330875:

Add "usbconfig dump_all_desc", a subcommand to dump all device and config
descriptors.

6 years agoMFC r327522:
trasz [Mon, 16 Apr 2018 15:50:10 +0000 (15:50 +0000)]
MFC r327522:

Fix warnings from "mandoc -Tlint -Wwarning".

6 years agoMFC r327382:
trasz [Mon, 16 Apr 2018 15:49:16 +0000 (15:49 +0000)]
MFC r327382:

Improve usbconfig(8) manual page by adding descriptions for subcommands.

6 years agoMFC r328219:
trasz [Mon, 16 Apr 2018 15:48:15 +0000 (15:48 +0000)]
MFC r328219:

Add missing manufacturer/serial number string descriptors.

6 years agoMFC r328197:
trasz [Mon, 16 Apr 2018 15:46:24 +0000 (15:46 +0000)]
MFC r328197:

Remove unused index.

6 years agoMFC r328196:
trasz [Mon, 16 Apr 2018 15:44:03 +0000 (15:44 +0000)]
MFC r328196:

Add missing SPDX tags; the rest of the license text is the same as in other
USB templates.

6 years agoMFC r328194:
trasz [Mon, 16 Apr 2018 15:42:26 +0000 (15:42 +0000)]
MFC r328194:

Add sysctls to control device side USB identifiers. This makes it
possible to change string and numeric vendor and product identifiers,
as well as anything else there might be to change for a particular
device side template, eg the MAC address.

Relnotes: yes

6 years agoMFC r324626:
trasz [Mon, 16 Apr 2018 15:39:34 +0000 (15:39 +0000)]
MFC r324626:

Replace some magic numbers in usb_template(4) code with #defines.
There should be no functional changes.

6 years agoMerge r331871:
glebius [Mon, 16 Apr 2018 15:07:19 +0000 (15:07 +0000)]
Merge r331871:
  Handle a special case when a slab can fit only one allocation,
  and zone has a large alignment. With alignment taken into
  account uk_rsize will be greater than space in a slab. However,
  since we have only one item per slab, it is always naturally
  aligned.

  Code that will panic before this change with 4k page:

        z = uma_zcreate("test", 3984, NULL, NULL, NULL, NULL, 31, 0);
        uma_zalloc(z, M_WAITOK);

  A practical scenario to hit the panic is a machine with 56 CPUs
  and 2 NUMA domains, which yields in zone size of 3984 (on head).

PR: 227116

6 years agoMFC r328861: Update blacklist-helper to not emit messages from pf during operation.
lidl [Mon, 16 Apr 2018 14:46:02 +0000 (14:46 +0000)]
MFC r328861: Update blacklist-helper to not emit messages from pf during operation.

Use 'pfctl -k' when blocking a site to kill active tcp connections
from the blocked address.

Fix 'purge' operation for pf, which must dynamically determine which
filters have been created, so the filters can be flushed by name.

6 years agoMFC r324512: Don't use a non-zero argument for __builtin_frame_address
lidl [Mon, 16 Apr 2018 14:42:25 +0000 (14:42 +0000)]
MFC r324512: Don't use a non-zero argument for __builtin_frame_address

Mirror the change made for powerpc64 in r323687.  With this
change, gcc 6.4.0 can successfully compile and link a kernel
that runs on sparc64.

6 years agoMFC r324237:
trasz [Mon, 16 Apr 2018 14:39:34 +0000 (14:39 +0000)]
MFC r324237:

Make procstat(1) recognize process descriptors, so that it shows
"P" instead of "?" in "procstat -af" output. Note that there are
still a few more DTYPE_* kinds we don't decode yet.

Sponsored by: DARPA, AFRL

6 years agoMFC r323206: Enable dtrace support for mips64 and the ERL kernel config
lidl [Mon, 16 Apr 2018 14:39:04 +0000 (14:39 +0000)]
MFC r323206: Enable dtrace support for mips64 and the ERL kernel config

Turn on the required options in the ERL config file, and ensure
that the fbt module is listed as a dependency for mips in
the modules/dtrace/dtraceall/dtraceall.c file.

6 years agoMFC r332483:
kevans [Mon, 16 Apr 2018 13:50:01 +0000 (13:50 +0000)]
MFC r332483:

dtc(1): Update to upstream 006664a

Highlights:

- Passing "-" to -o will now cause output to go to stdout
- Path-based syntactic sugar for overlays is now accepted. This looks like:

/dts-v1/;
/plugin/;

&{/soc} {
    sid: eeprom@1c14000 {
        compatible = "allwinner,sun8i-h3-sid";
        reg = <0x1c14000 0x400>;
        status = "okay";
    };
};

6 years agoMFC r331950: 9434 Speculative prefetch is blocked by device removal code.
mav [Mon, 16 Apr 2018 04:16:46 +0000 (04:16 +0000)]
MFC r331950: 9434 Speculative prefetch is blocked by device removal code.

Device removal code does not set spa_indirect_vdevs_loaded for pools
that never experienced device removal.  At least one visual consequence
of it is completely blocked speculative prefetcher.  This patch sets
the variable in such situations.

6 years agoMFC r331713: MFV r331712:
mav [Mon, 16 Apr 2018 04:16:10 +0000 (04:16 +0000)]
MFC r331713: MFV r331712:
9280 Assertion failure while running removal_with_ganging test with 4K devices

illumos/illumos-gate@243952c7eeef020886e3e2e3df99a513df40584a

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matt Ahrens <Matt.Ahrens@delphix.com>

6 years agoMFC r331711: MFV 331710:
mav [Mon, 16 Apr 2018 04:15:25 +0000 (04:15 +0000)]
MFC r331711: MFV 331710:
9188 increase size of dbuf cache to reduce indirect block decompression

illumos/illumos-gate@268bbb2a2fa79c36d4695d13a595ba50a7754b76

With compressed ARC (6950) we use up to 25% of our CPU to decompress indirect
blocks, under a workload of random cached reads. To reduce this decompression
cost, we would like to increase the size of the dbuf cache so that more
indirect blocks can be stored uncompressed.

If we are caching entire large files of recordsize=8K, the indirect blocks
use 1/64th as much memory as the data blocks (assuming they have the same
compression ratio). We suggest making the dbuf cache be 1/32nd of all memory,
so that in this scenario we should be able to keep all the indirect blocks
decompressed in the dbuf cache. (We want it to be more than the 1/64th that
the indirect blocks would use because we need to cache other stuff in the
dbuf cache as well.)

In real world workloads, this won't help as dramatically as the example
above, but we think it's still worth it because the risk of decreasing
performance is low. The potential negative performance impact is that we
will be slightly reducing the size of the ARC (by ~3%).

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Allan Jude <allanjude@freebsd.org>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

6 years agoMFC r331709: MFV r331708:
mav [Mon, 16 Apr 2018 04:14:42 +0000 (04:14 +0000)]
MFC r331709: MFV r331708:
9321 arc_loan_compressed_buf() can increment arc_loaned_bytes by the wrong value

illumos/illumos-gate@9be12bd737714550277bd02b0c693db560976990

arc_loan_compressed_buf() increments arc_loaned_bytes by psize unconditionally
In the case of zfs_compressed_arc_enabled=0, when the buf is returned via
arc_return_buf(), if ARC_BUF_COMPRESSED(buf) is false, then arc_loaned_bytes
is decremented by lsize, not psize.

Switch to using arc_buf_size(buf), instead of psize, which will return
psize or lsize, depending on the result of ARC_BUF_COMPRESSED(buf).

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Allan Jude <allanjude@freebsd.org>

6 years agoMFC r331707: MFV r331706:
mav [Mon, 16 Apr 2018 04:14:03 +0000 (04:14 +0000)]
MFC r331707: MFV r331706:
9235 rename zpool_rewind_policy_t to zpool_load_policy_t

illumos/illumos-gate@5dafeea3ebd2dd77affc802bcb90f63faf01589f

We want to be able to pass various settings during import/open of a pool,
which are not only related to rewind. Instead of adding a new policy and
duplicate a bunch of code, we should just rename rewind_policy to a more
generic term like load_policy.

For instance, we'd like to set spa->spa_import_flags from the nvlist,
rather from a flags parameter passed to spa_import as in some cases we want
those flags not only for the import case, but also for the open case. One
such flag could be ZFS_IMPORT_MISSING_LOG (as used in zdb) which would
allow zfs to open a pool when logs are missing.

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>

6 years agoMFC r331705: MFV 331704:
mav [Mon, 16 Apr 2018 04:13:19 +0000 (04:13 +0000)]
MFC r331705: MFV 331704:
9191 dump vdev tree to zfs_dbgmsg when spa load fails due to missing log devices

illumos/illumos-gate@ccef24b493bcbd146fcd6d8946666cae081470b6

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>

6 years agoMFC r331703: MFV 331702:
mav [Mon, 16 Apr 2018 04:11:48 +0000 (04:11 +0000)]
MFC r331703: MFV 331702:
9187 racing condition between vdev label and spa_last_synced_txg in vdev_validate

illumos/illumos-gate@d1de72cfa29ab77ff80e2bb0e668a6afa5bccaf0

ztest failed with uncorrectable IO error despite having the fix for #7163.
Both sides of the mirror have CANT_OPEN_BAD_LABEL, which also distinguishes
it from that issue.

Definitely seems like a racing condition between the vdev_validate and spa_sync:
1. Thread A (spa_sync): vdev label is updated to latest txg
2. Thread B (vdev_validate): vdev label's txg is compared to spa_last_synced_txg and is ahead.
3. Thread A (spa_sync): spa_last_synced_txg is updated to latest txg.

Solution: do not check txg in vdev_validate unless config lock is held.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matt Ahrens <matthew.ahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>

6 years agoMFC r331701: MFV r331695, 331700: 9166 zfs storage pool checkpoint
mav [Mon, 16 Apr 2018 04:10:56 +0000 (04:10 +0000)]
MFC r331701: MFV r331695, 331700: 9166 zfs storage pool checkpoint

illumos/illumos-gate@8671400134a11c848244896ca51a7db4d0f69da4

The idea of Storage Pool Checkpoint (aka zpool checkpoint) deals with
exactly that.  It can be thought of as a “pool-wide snapshot” (or a
variation of extreme rewind that doesn’t corrupt your data).  It remembers
the entire state of the pool at the point that it was taken and the user
can revert back to it later or discard it.  Its generic use case is an
administrator that is about to perform a set of destructive actions to ZFS
as part of a critical procedure.  She takes a checkpoint of the pool before
performing the actions, then rewinds back to it if one of them fails or puts
the pool into an unexpected state.  Otherwise, she discards it.  With the
assumption that no one else is making modifications to ZFS, she basically
wraps all these actions into a “high-level transaction”.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>

6 years agoMFC r331699: Partial MFV r329753:
mav [Mon, 16 Apr 2018 03:58:08 +0000 (03:58 +0000)]
MFC r331699: Partial MFV r329753:
8809 libzpool should leverage work done in libfakekernel

illumos/illumos-gate@f06dce2c1f0f3af78581e7574f65bfba843ddb6e

Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Andrew Stormont <astormont@racktopsystems.com>

We do not have libfakekernel, but need to reduce code divergence.

6 years agoMFC r331420 (by avg): zfs: fix mismatch between format specifier and type
mav [Mon, 16 Apr 2018 03:56:10 +0000 (03:56 +0000)]
MFC r331420 (by avg): zfs: fix mismatch between format specifier and type

vdev_dbgmsg_print_tree printed vdev_id of uint64_t type with %u format
specifier.  That caused subsequent parameters to be incorrectly read
from the stack and lead to a crash when a wrong value was interpreted as
a string pointer.

This should be upstreamed.

6 years agoMFC r331414: Reduce struct aggsum_bucket padding to fit into one cache line.
mav [Mon, 16 Apr 2018 03:55:14 +0000 (03:55 +0000)]
MFC r331414: Reduce struct aggsum_bucket padding to fit into one cache line.

6 years agoMFC r331408: MFV r331407: 9213 zfs: sytem typo
mav [Mon, 16 Apr 2018 03:54:35 +0000 (03:54 +0000)]
MFC r331408: MFV r331407: 9213 zfs: sytem typo

illumos/illumos-gate@edc8ef7d921c96b23969898aeb766cb24960bda7

Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Approved by: Joshua M. Clulow <josh@sysmgr.org>
Author: Toomas Soome <tsoome@me.com>

6 years agoMFC r331406: MFV r331405: 9084 spa_*_ashift must ignore spare devices
mav [Mon, 16 Apr 2018 03:53:34 +0000 (03:53 +0000)]
MFC r331406: MFV r331405: 9084 spa_*_ashift must ignore spare devices

illumos/illumos-gate@b037f3dbd69cef4a7ffd576ad33e07bfaf0b1e84

Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

6 years agoMFC r331404: MFV r331400:
mav [Mon, 16 Apr 2018 03:52:54 +0000 (03:52 +0000)]
MFC r331404: MFV r331400:
8484 Implement aggregate sum and use for arc counters

In pursuit of improving performance on multi-core systems, we should
implements fanned out counters and use them to improve the performance of
some of the arc statistics. These stats are updated extremely frequently,
and can consume a significant amount of CPU time.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>

6 years agoMFC r329808: MFV r329807:
mav [Mon, 16 Apr 2018 03:49:27 +0000 (03:49 +0000)]
MFC r329808: MFV r329807:
8940 Sending an intra-pool resumable send stream may result in EXDEV

illumos/illumos-gate@544132fce3fa6583f01318f9559adc46614343a7

"zfs send -t <token>" for an incremental send should be able to resume
successfully when sending to the same pool: a subtle issue in
zfs_iter_children() doesn't currently allow this.

Because resuming from a token requires "guid" -> "dataset" mapping
(guid_to_name()), we have to walk the whole hierarchy to find the right
snapshots to send.
When resuming an incremental send both source and destination live in the
same pool and have the same guid: this is where zfs_iter_children() gets
confused and picks up the wrong snapshot, so we end up trying to send an
incremental "destination@snap1 -> source@snap2" stream instead of
"source@snap1 -> source@snap2": this fails with an "Invalid cross-device
link" (EXDEV) error.

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Author: loli10K <ezomori.nozomu@gmail.com>