SVNews

NOTE: This service is experimental and subject to change! Use at your own risk!

Year:   Month: - or - Filter committers: - or -
Filter paths:
Include diffs if smaller than lines.

2017 - 09 - 24   (today)
03:33:26 - r323962
(1 hour 12 minutes ago)
by cy
Affects:  /head/sys/contrib/ipfilter/netinet/ip_nat.c
Fix typo from r323945.

Reported by: Gary Jennejohn <gljennjohn@gmail.com>
Point hat to: cy (me)
02:50:59 - r323961
(1 hour 55 minutes ago)
by alc
Affects:  /head/sys/dev/ti/if_ti.c
Since the page "frame" doesn't belong to a vm object, it can't be paged
out. Since it can't be paged out, it is never actually enqueued in a
paging queue. Nonetheless, passing PQ_INACTIVE to vm_page_unwire()
creates the appearance that the page "frame" is being enqueued in the
inactive queue. As of r288122, we can avoid this false impression by
passing PQ_NONE.

MFC after: 1 week
00:14:48 - r323960
(4 hours 31 minutes ago)
by ngie
Affects:  /head/tests/sys/opencrypto/cryptodev.py
/head/tests/sys/opencrypto/cryptotest.py
Convert some idioms over to py3k-compatible idioms

- Import print_function from __future__ and use print(..) instead of `print ..`.
- Use repr instead of backticks when the object needs to be dumped, unless
  print(..) can do it lazily. Use str instead of backticks as appropriate
  for simplification reasons.

This doesn't fully convert these modules over py3k. It just gets over some of
the trivial compatibility hurdles.
00:07:18 - r323959
(4 hours 38 minutes ago)
by ngie
Affects:  /projects/runtime-coverage/tests/sys/opencrypto/cryptodev.py
/projects/runtime-coverage/tests/sys/opencrypto/cryptotest.py
Convert some idioms over to py3k-compatible idioms

- Import print_function from __future__ and use print(..) instead of `print ..`.
- Use repr instead of backticks when the object needs to be dumped, unless
  print(..) can do it lazily. Use str instead of backticks as appropriate
  for simplification reasons.

This doesn't fully convert these modules over py3k. It just gets over some of
the trivial compatibility hurdles.
2017 - 09 - 23   (yesterday)
19:49:12 - r323958
(8 hours 56 minutes ago)
by fsu
Affects:  /head/share/misc/committers-src.dot
Add myself as src committer.

Approved by: pfg (mentor)
18:37:37 - r323957
(10 hours 8 minutes ago)
by ngie
Affects: 
(351 files)
/projects/runtime-coverage/*
MFhead@r320180
17:48:49 - r323956
(10 hours 57 minutes ago)
by cem
Affects:  /head/sys/kern/subr_witness.c
ddb(4): Add 'show badstacks' command to show witness badstacks

Add a DDB command that mirrors sysctl debug.witness.badstacks.

Reapply r323935 after fixing trivial deficiency. I forgot to compile with
WITNESS enabled. Thanks emaste@ for fixing the build while I was asleep.

Reported by: rstone
Reviewed by: rstone (previous version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12468
16:59:37 - r323955
(11 hours 46 minutes ago)
by shurd
Affects: 
(6 files)
/head/sys/dev/bnxt/*
bnxt: Choose better HW LRO defaults for performance

1) Choose correct Firmware options for HW LRO for best performance
2) Delete TBD and other comments which are not required.
3) Added sysctl interface to enable / disable / modify different factors
  of HW LRO.
4) Disabled HW LRO by default to avoid issues with packet forwarding

This allows much better control over the LRO configuration via sysctls, and
uses much better defaults. Hardware LRO can now be enabled/disabled
independantly from the software LRO, and the tuning parameters are exposed.

manpage updates coming soon.

Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com>
Reviewed by: shurd, sbruno
Approved by: sbruno (mentor)
Sponsored by: Broadcom Limited
Differential Revision: https://reviews.freebsd.org/D12223
16:46:30 - r323954
(11 hours 59 minutes ago)
by shurd
Affects:  /head/sys/net/iflib.c
/head/sys/net/mp_ring.c
Have ifmp_ring_enqueue() abdicate instead of switch to a consumer

Move TX out of the enqueue() path. As a result, we need
to have ifmp_ring_check_drainage() pick up from the abdicate state.

We also need to either enqueue the TX task, or check drainage
after calling ifmp_ring_enqueue() to ensure it's sent.

This change results in a 30% small packet forwarding improvement.

Reviewed by: olivier, sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12439
13:37:02 - r323953
(15 hours 9 minutes ago)
by pho
Affects:  /user/pho/stress2/misc/marcus2.sh
/user/pho/stress2/misc/marcus5.sh
No need to use grep(1).

Sponsored by: Dell EMC Isilon
12:44:42 - r323952
(16 hours 1 minute ago)
by oshogbo
Affects:  /head/sys/boot/i386/libi386/Makefile
After the r317886 support for TFTP and NFS can be enable simultaneously.

The cleanup of this distinction was done in the r318988, but this Makefile
was omitted.

Submitted by: kczekirda@
12:35:46 - r323951
(16 hours 10 minutes ago)
by emaste
Affects:  /head/sys/kern/subr_witness.c
Revert r323935 as it broke the build

subr_witness.c:2577:4: error: use of undeclared identifier 'req'
  req->oldidx = 0;
  ^
12:32:11 - r323950
(16 hours 13 minutes ago)
by oshogbo
Affects: 
(2 files)
/stable/11/share/man/man9/Makefile
MFC r323655:

Add missing links to the nv man page.
12:28:56 - r323949
(16 hours 17 minutes ago)
by oshogbo
Affects: 
(2 files)
/stable/11/share/man/man9/nv.9
MFC r323654:

Fix names of the array functions in the nv man page.

Submitted by: def@
11:09:25 - r323948
(17 hours 36 minutes ago)
by pho
Affects:  /user/pho/stress2/misc/msdos8.sh
Added new test that demonstrates a rename problem with msdosfs.

Sponsored by: Dell EMC Isilon
11:07:21 - r323947
(17 hours 38 minutes ago)
by pho
Affects:  /user/pho/stress2/misc/trim4.sh
Limit runtime and return fsck status.

Sponsored by: Dell EMC Isilon
08:26:42 - r323946
(20 hours 19 minutes ago)
by scottl
Affects:  /head/sys/dev/mpr/mpr_sas.h
/head/sys/dev/mps/mps_sas.h
Garbage collect usued fields

Sponsored by: Netflix
06:00:17 - r323945
(22 hours 45 minutes ago)
by cy
Affects:  /head/sys/contrib/ipfilter/netinet/ip_nat.c
Correct two misspellings. Also align */.
01:39:16 - r323944
(1 day 3 hours ago)
by shurd
Affects:  /head/sys/kern/subr_gtaskqueue.c
/head/sys/sys/_task.h
Make struct grouptask gt_name member a char array

Previously, it was just a pointer which was copied, but
some callers pass in a stack variable which will go out of scope.
Add GROUPTASK_NAMELEN macro (32) and snprintf() the name into it,
using "grouptask" if name is NULL. We can now safely include
gtask->gt_name in console messages.

Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12449
01:37:01 - r323943
(1 day 3 hours ago)
by shurd
Affects:  /head/sys/net/iflib.c
Make the rx budget a tunable

This allows tuning the rx budget for special load profiles
as well as more easily testing to determine sane defaults.

Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12445
01:35:14 - r323942
(1 day 3 hours ago)
by shurd
Affects:  /head/sys/net/iflib.c
Chain mbufs before passing to if_input()

Build a list of mbufs to pass to if_input() after LRO. Results in
12% small packet forwarding rate improvement.

Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12444
01:33:20 - r323941
(1 day 3 hours ago)
by shurd
Affects:  /head/sys/dev/e1000/if_em.c
/head/sys/net/iflib.c
/head/sys/net/iflib.h
Some small packet performance improvements

If the packet is smaller than MTU, disable the TSO flags.
Move TCP header parsing inside the IS_TSO?() test.
Add a new IFLIB_NEED_ZERO_CSUM flag to indicate the checksums need to be zeroed
before TX.

Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12442
2017 - 09 - 22   (2 days ago)
22:19:56 - r323940
(1 day 6 hours ago)
by asomers
Affects:  /projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_destroy/zpool_destroy_004_pos.ksh
Simplify zpool_destroy_004_pos.ksh

Formerly, this test went through tortuous manchinations to determine if the
zfs send and/or receive were interrupted by the zpool destroy. Due to the
race conditions and peculiarities of KSH wait, these efforts were mostly
bogus.

The only true test of success is that the pool was destroyed.

Sponsored by: Spectra Logic Corp
22:12:45 - r323939
(1 day 6 hours ago)
by asomers
Affects: 
(6 files)
/projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/*
/projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/*
Rewrite hotspare_replace_003_neg.

This test case was overly complicated. The new version is simpler and runs
faster. I also moved it into the zpool_import directory because it doesn't
really have anything to do with hotspares.

tests/sys/cddl/zfs/tests/cli_root/zpool_import/Makefile
tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_destroyed_002_neg.ksh
tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_test.sh
tests/sys/cddl/zfs/tests/hotspare/Makefile
tests/sys/cddl/zfs/tests/hotspare/hotspare_replace_003_neg.ksh
tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh
  Move hotspare_replace_003_neg to zpool_import_destroyed_002_neg and
  simplify it.

Sponsored by: Spectra Logic Corp
22:06:09 - r323938
(1 day 6 hours ago)
by asomers
Affects:  /projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/Makefile
/projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_destroyed_001_neg.ksh
/projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_test.sh
Add a new ZFS test case for importing destroyed pools

tests/sys/cddl/zfs/tests/cli_root/zpool_import/Makefile
tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_destroyed_001_neg.ksh
tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_test.sh
  Test that importing a destroyed pool with an out-of-date
  non-destroyed label will fail. This can happen if a disk gets
  removed from the system, the pool has a configuratoin change, the
  pool gets destroyed, the disk gets reinserted, and the admin tries
  to import the pool.

Sponsored by: Spectra Logic Corp
22:00:26 - r323937
(1 day 6 hours ago)
by asomers
Affects: 
(9 files)
/projects/zfsd/head/tests/sys/cddl/zfs/include/libsas.kshlib
/projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_replace_003_neg.ksh
/projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/*
Fix intermittency in ZFS tests that disable SAS phys

tests/sys/cddl/zfs/include/libsas.kshlib
  In disable_sas_disk, wait for the disk to disappear before
  returning. If it doesn't disappear within 2 seconds, try disabling
  the phy again. This is necessary because disabling the phy
  sometimes fails if there is a command outstanding at the time. I
  think the HBA's error recovery code might be resetting the phy in
  that case. Also, in enable_sas_disk, wait for the disk to reappear.

tests/sys/cddl/zfs/tests/hotspare/hotspare_replace_003_neg.ksh
tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib
tests/sys/cddl/zfs/tests/zfsd/zfsd_hotspare_004_pos.ksh
tests/sys/cddl/zfs/tests/zfsd/zfsd_hotspare_007_pos.ksh
tests/sys/cddl/zfs/tests/zfsd/zfsd_import_001_pos.ksh
tests/sys/cddl/zfs/tests/zfsd/zfsd_replace_001_pos.ksh
tests/sys/cddl/zfs/tests/zfsd/zfsd_replace_002_pos.ksh
tests/sys/cddl/zfs/tests/zfsd/zfsd_replace_003_pos.ksh
  Every place that was using (enable|disable)_sas_disk was already
  waiting for the disk to (re|dis)appear, so move that code into a
  common location in libsas.kshlib. Also remove some superfluous
  rescan_disk calls.

Sponsored by: Spectra Logic Corp
21:55:41 - r323936
(1 day 6 hours ago)
by asomers
Affects:  /projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib
/projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh
Fix intermittency in zfsd degrade tests

tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib
  Sync the file under test before corrupting the vdev, not after.

tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh
  Increase timeouts to 600s. On systems with a slow rootpool, the
  extra time is necessary.

Sponsored by: Spectra Logic Corp
20:01:12 - r323935
(1 day 8 hours ago)
by cem
Affects:  /head/sys/kern/subr_witness.c
ddb(4): Add 'show badstacks' command to show witness badstacks

Add a DDB command that mirrors sysctl debug.witness.badstacks.

Reported by: rstone
Reviewed by: rstone
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12468
17:58:57 - r323934
(1 day 10 hours ago)
by jhb
Affects:  /head/sys/arm/arm/vfp.c
/head/sys/arm/include/elf.h
Detect NEON and set HWCAP_NEON if present.

Reviewed by: andrew, ian
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12389
17:57:38 - r323933
(1 day 10 hours ago)
by jhb
Affects:  /head/sys/arm/include/elf.h
Correct HWCAP_VFP3* values to match Linux.

Reviewed by: andrew, ian
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12388
16:42:41 - r323932
(1 day 12 hours ago)
by kib
Affects:  /head/sys/ufs/ffs/ffs_alloc.c
Fix 32bit build.

Reported by: emaste
Sponsored by: The FreeBSD Foundation
15:53:22 - r323931
(1 day 12 hours ago)
by ian
Affects: 
(10 files)
/stable/11/sys/arm/*
/stable/11/sys/dev/*
/stable/11/sys/modules/i2c/*
MFC r323474, r323553, r323691

r323474:
Add a default implementation that returns ENODEV for start, repeat_start,
stop, read, and write methods. Some controllers don't implement these
individual operations and have only a transfer method. In that case, we
should return an indication that the device is present but doesn't support
the method, as opposed to the kobj default error ENXIO which makes it
look like the whole device is missing. Userland tools such as i2c(8) can
use the differing return values to switch between the two different i2c
IO mechanisms.

r323553:
Defer attaching and probing iicbus and its children until interrupts are
available, in i2c controller drivers that require interrupts for transfers.

This is the result of auditing all 22 existing drivers that attach iicbus.
These drivers were the only ones remaining that require interrupts and were
not using config_intrhook to defer attachment. That has led, over the
years, to various i2c slave device drivers needing to use config_intrhook
themselves rather than performing bus transactions in their probe() and
attach() methods, just in case they were attached too early.

r323691:
Give icee(4) a detach() method so it can be used as a module. Add a
module makefile for it.
15:47:35 - r323930
(1 day 12 hours ago)
by ian
Affects: 
(2 files)
/stable/11/usr.sbin/i2c/i2c.c
MFC r323465:

Make i2c -s (device scan) work on hardware that supports only full xfers.

The existing scan code is based on sending an i2c START condition and if
there is no error it assumes there is a device at that i2c address. Some
i2c controllers don't support sending individual start/stop signals on the
bus, they can only perform complete data transfers with start/stop handled
in the silicon.

This adds a fallback mechanism that attempts to read a single byte from each
i2c address. It's less reliable than looking for an an ACK repsonse to a
start, because some devices will NAK an attempt to read that isn't preceeded
by a write of a register address. Writing to devices to probe them is too
dangerous to even consider. The user is told that a less-reliable scan is
being done, so even if the read-scan comes up empty too, it's still a vast
improvement over the old situation where it would just claim there were no
devices on the bus even though the devices were there and working fine.

If the i2c controller responds with a proper ENODEV (device doesn't support
operation) or an almost-proper EOPNOTSUPP, the START/STOP scan is switched
to a read-scan right away. Most controllers respond with ENXIO or EIO if
they don't support START/STOP, so no quick-out is available. For those,
if a scan of all 127 addresses and come up empty, the scan is re-done using
the read method.

Reported by: Maxim Filimonov <che@bein.link>
15:40:56 - r323929
(1 day 13 hours ago)
by ian
Affects: 
(7 files)
/stable/11/sys/modules/i2c/*
MFC r323642:

Add a missing header file to SRCS to fix out-of-kernel builds.

PR: 222354
Submitted by: eugen@
Pointy hat: ian@
15:27:50 - r323928
(1 day 13 hours ago)
by marius
Affects:  /releng/10.4/sys/conf/newvers.sh
Update releng/10.4 to RC2 again so the revision of sys/conf/newvers.sh
will reflect the (hopefully) final 10.4-RC2 builds.

Approved by: re (implicit)
15:27:02 - r323927
(1 day 13 hours ago)
by marius
Affects:  /releng/10.4/sys/conf/newvers.sh
Revert releng/10.4 to RC1 again.

Approved by: re (implicit)
14:56:43 - r323926
(1 day 13 hours ago)
by gjb
Affects: 
(2 files)
/releng/10.4/release/tools/arm.subr
MFS10 r323925:
 MFC r323924:
 Revert r323812 from release/tools/arm.subr, which has broken the
 build on arm/armv6 images.

Pointyhat: gjb (myself)
Approved by: re (marius)
Sponsored by: The FreeBSD Foundation
14:40:04 - r323925
(1 day 14 hours ago)
by gjb
Affects: 
(4 files)
/stable/10/release/tools/arm.subr
/stable/11/release/tools/arm.subr
MFC r323924:
 Revert r323812 from release/tools/arm.subr, which has broken the
 build on arm/armv6 images.

Pointyhat: gjb (myself)
MFC note: releng/10.4 has broken because of this
Sponsored by: The FreeBSD Foundation
14:34:27 - r323924
(1 day 14 hours ago)
by gjb
Affects:  /head/release/tools/arm.subr
Revert r323812 from release/tools/arm.subr, which has broken the
build on arm/armv6 images.

Pointyhat: gjb (myself)
MFC after: immediate
MFC note: releng/10.4 has broken because of this
Sponsored by: The FreeBSD Foundation
12:45:15 - r323923
(1 day 16 hours ago)
by mckusick
Affects: 
(17 files)
/head/lib/libufs/*
/head/sbin/*
/head/sys/*
Continuing efforts to provide hardening of FFS, this change adds a
check hash to cylinder groups. If a check hash fails when a cylinder
group is read, no further allocations are attempted in that cylinder
group until it has been fixed by fsck. This avoids a class of
filesystem panics related to corrupted cylinder group maps. The
hash is done using crc32c.

Check hases are added only to UFS2 and not to UFS1 as UFS1 is primarily
used in embedded systems with small memories and low-powered processors
which need as light-weight a filesystem as possible.

Specifics of the changes:

sys/sys/buf.h:
  Add BX_FSPRIV to reserve a set of eight b_xflags that may be used
  by individual filesystems for their own purpose. Their specific
  definitions are found in the header files for each filesystem
  that uses them. Also add fields to struct buf as noted below.

sys/kern/vfs_bio.c:
  It is only necessary to compute a check hash for a cylinder
  group when it is actually read from disk. When calling bread,
  you do not know whether the buffer was found in the cache or
  read. So a new flag (GB_CKHASH) and a pointer to a function to
  perform the hash has been added to breadn_flags to say that the
  function should be called to calculate a hash if the data has
  been read. The check hash is placed in b_ckhash and the B_CKHASH
  flag is set to indicate that a read was done and a check hash
  calculated. Though a rather elaborate mechanism, it should
  also work for check hashing other metadata in the future. A
  kernel internal API change was to change breada into a static
  fucntion and add flags and a function pointer to a check-hash
  function.

sys/ufs/ffs/fs.h:
  Add flags for types of check hashes; stored in a new word in the
  superblock. Define corresponding BX_ flags for the different types
  of check hashes. Add a check hash word in the cylinder group.

sys/ufs/ffs/ffs_alloc.c:
  In ffs_getcg do the dance with breadn_flags to get a check hash and
  if one is provided, check it.

sys/ufs/ffs/ffs_vfsops.c:
  Copy across the BX_FFSTYPES flags in background writes.
  Update the check hash when writing out buffers that need them.

sys/ufs/ffs/ffs_snapshot.c:
  Recompute check hash when updating snapshot cylinder groups.

sys/libkern/crc32.c:
lib/libufs/Makefile:
lib/libufs/libufs.h:
lib/libufs/cgroup.c:
  Include libkern/crc32.c in libufs and use it to compute check
  hashes when updating cylinder groups.

Four utilities are affected:

sbin/newfs/mkfs.c:
  Add the check hashes when building the cylinder groups.

sbin/fsck_ffs/fsck.h:
sbin/fsck_ffs/fsutil.c:
  Verify and update check hashes when checking and writing cylinder groups.

sbin/fsck_ffs/pass5.c:
  Offer to add check hashes to existing filesystems.
  Precompute check hashes when rebuilding cylinder group
  (although this will be done when it is written in fsutil.c
  it is necessary to do it early before comparing with the old
  cylinder group)

sbin/dumpfs/dumpfs.c
  Print out the new check hash flag(s)

sbin/fsdb/Makefile:
  Needs to add libufs now used by pass5.c imported from fsck_ffs.

Reviewed by: kib
Tested by: Peter Holm (pho)
12:07:03 - r323922
(1 day 16 hours ago)
by scottl
Affects:  /head/sys/dev/mpr/mpr_sas_lsi.c
/head/sys/dev/mps/mps_sas_lsi.c
Clean up error messages related to device discovery

Sponsored by: Netflix
10:51:32 - r323921
(1 day 17 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/x86/iommu/intel_drv.c
MFC r323326:
Use IOAPIC PCI rid as the interrupt TLP source id for DMAR interrupt
remapping.
10:49:04 - r323920
(1 day 17 hours ago)
by kib
Affects: 
(3 files)
/stable/11/sys/x86/include/apicvar.h
/stable/11/sys/x86/x86/io_apic.c
MFC r323325, r323450:
If IOAPIC has PCI binding, match the PCI device against MADT
enumerated IOAPIC.
10:45:51 - r323919
(1 day 18 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/vm/vm_object.c
MFC r323616:
Batch freeing of the pages in vm_object_page_remove().
08:27:27 - r323918
(1 day 20 hours ago)
by avg
Affects: 
(3 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
MFV r323917: 8648 Fix range locking in ZIL commit codepath

illumos/illumos-gate@42b14111721da2ebd5159e7b45012a3eb0e3384c
https://github.com/illumos/illumos-gate/commit/42b14111721da2ebd5159e7b45012a3eb0e3384c

https://www.illumos.org/issues/8648
  I'm opening this bug to track integration of the following ZFS on Linux
  commit into illumos:

  commit f763c3d1df569a8d6b60bcb5e95cf07aa7a189e6
  Author: LOLi <loli10K@users.noreply.github.com>
  Date: Mon Aug 21 17:59:48 2017 +0200

  Fix range locking in ZIL commit codepath

  Since OpenZFS 7578 (1b7c1e5) if we have a ZVOL with logbias=throughput
  we will force WR_INDIRECT itxs in zvol_log_write() setting itx->itx_lr
  offset and length to the offset and length of the BIO from
  zvol_write()->zvol_log_write(): these offset and length are later used
  to take a range lock in zillog->zl_get_data function: zvol_get_data().

  Now suppose we have a ZVOL with blocksize=8K and push 4K writes to
  offset 0: we will only be range-locking 0-4096. This means the
  ASSERTion we make in dbuf_unoverride() is no longer valid because now
  dmu_sync() is called from zilog's get_data functions holding a partial
  lock on the dbuf.

  Fix this by taking a range lock on the whole block in zvol_get_data().

  Reviewed-by: Chunwei Chen <tuxoko@gmail.com>
  Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
  Signed-off-by: loli10K <ezomori.nozomu@gmail.com>

Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Alexander Motin <mav@FreeBSD.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: LOLi <loli10K@users.noreply.github.com>

MFC after: 10 days
08:23:24 - r323917
(1 day 20 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c
/vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c
8648 Fix range locking in ZIL commit codepath

illumos/illumos-gate@42b14111721da2ebd5159e7b45012a3eb0e3384c
https://github.com/illumos/illumos-gate/commit/42b14111721da2ebd5159e7b45012a3eb0e3384c

https://www.illumos.org/issues/8648
  I'm opening this bug to track integration of the following ZFS on Linux
  commit into illumos:

  commit f763c3d1df569a8d6b60bcb5e95cf07aa7a189e6
  Author: LOLi <loli10K@users.noreply.github.com>
  Date: Mon Aug 21 17:59:48 2017 +0200

  Fix range locking in ZIL commit codepath

  Since OpenZFS 7578 (1b7c1e5) if we have a ZVOL with logbias=throughput
  we will force WR_INDIRECT itxs in zvol_log_write() setting itx->itx_lr
  offset and length to the offset and length of the BIO from
  zvol_write()->zvol_log_write(): these offset and length are later used
  to take a range lock in zillog->zl_get_data function: zvol_get_data().

  Now suppose we have a ZVOL with blocksize=8K and push 4K writes to
  offset 0: we will only be range-locking 0-4096. This means the
  ASSERTion we make in dbuf_unoverride() is no longer valid because now
  dmu_sync() is called from zilog's get_data functions holding a partial
  lock on the dbuf.

  Fix this by taking a range lock on the whole block in zvol_get_data().

  Reviewed-by: Chunwei Chen <tuxoko@gmail.com>
  Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
  Signed-off-by: loli10K <ezomori.nozomu@gmail.com>

Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Alexander Motin <mav@FreeBSD.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: LOLi <loli10K@users.noreply.github.com>
08:21:35 - r323916
(1 day 20 hours ago)
by hselasky
Affects:  /head/sys/dev/usb/usb_hub.c
Extend sysctl description for hw.usb.disable_enumeration .

PR: 222505
Submitted by: Julian H. Stacey <jhs@berklix.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
08:21:14 - r323915
(1 day 20 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
MFV r323914: 8661 remove "zil-cw2" dtrace probe

illumos/illumos-gate@bd9d3f904625846bdc61af8897a1072029c7aeb7
https://github.com/illumos/illumos-gate/commit/bd9d3f904625846bdc61af8897a1072029c7aeb7

https://www.illumos.org/issues/8661
  The "zil-cw1" dtrace probe was previously removed in 8558, and the "zil-cw2"
  probe should have been removed in that patch as well. Unfortunately, the "zil-
  cw2" was not removed in 8558, so this bug is to track it's removal.

Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

MFC after: 1 week
08:18:49 - r323914
(1 day 20 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c
8661 remove "zil-cw2" dtrace probe

illumos/illumos-gate@bd9d3f904625846bdc61af8897a1072029c7aeb7
https://github.com/illumos/illumos-gate/commit/bd9d3f904625846bdc61af8897a1072029c7aeb7

https://www.illumos.org/issues/8661
  The "zil-cw1" dtrace probe was previously removed in 8558, and the "zil-cw2"
  probe should have been removed in that patch as well. Unfortunately, the "zil-
  cw2" was not removed in 8558, so this bug is to track it's removal.

Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>
08:18:05 - r323913
(1 day 20 hours ago)
by avg
Affects: 
(9 files)
/vendor-sys/illumos/dist/uts/common/fs/zfs/*
/vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c
/vendor/illumos/dist/man/man1m/zfs-program.1m
8600 ZFS channel programs - snapshot

illumos/illumos-gate@2840dce1a029098fb784afd951d5f98089f850d8
https://github.com/illumos/illumos-gate/commit/2840dce1a029098fb784afd951d5f98089f850d8

https://www.illumos.org/issues/8600
  ZFS channel programs should be able to create snapshots.
  In addition to the base snapshot functionality, this will likely entail adding
  extra logic to handle edge cases which were formerly not possible, such as
  creating then destroying a snapshot in the same transaction sync.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Chris Williamson <chris.williamson@delphix.com>
08:15:35 - r323912
(1 day 20 hours ago)
by avg
Affects: 
(4 files)
/vendor-sys/illumos/dist/uts/common/fs/zfs/*
/vendor/illumos/dist/man/man1m/zfs-program.1m
8592 ZFS channel programs - rollback

illumos/illumos-gate@000cce6b6fad4a8b0eecef6e1251f6aca1719c55
https://github.com/illumos/illumos-gate/commit/000cce6b6fad4a8b0eecef6e1251f6aca1719c55

https://www.illumos.org/issues/8592
  ZFS channel programs should be able to perform a rollback. This logic will
  probably look pretty similar to zfs.sync.destroy().

Reviewed by: Chris Williamson <chris.williamson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Brad Lewis <brad.lewis@delphix.com>
08:13:09 - r323911
(1 day 20 hours ago)
by avg
Affects:  /vendor/illumos/dist/lib/libzfs/common/libzfs_mount.c
8502 illumos#7955 broke delegated datasets when libshare is not present

illumos/illumos-gate@1c18e8fbd8db41a9fb39bd3ef7a18ee71ece20da
https://github.com/illumos/illumos-gate/commit/1c18e8fbd8db41a9fb39bd3ef7a18ee71ece20da

https://www.illumos.org/issues/8502
  The code in lib/libzfs/common/libzfs_mount.c already basically handles
  the case when libshare is not installed. We just need to not fail in
  zfs_init_libshare_impl. I tested this in lx and things work as
  expected. I also tested there trying to set sharenfs and sharesmb on
  the delegated dataset. Neither is allowed from within a zone. The
  spew of msgs from a native zone is not ZFS specific. I see the same
  spew simply running the share command.

Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Yuri Pankov <yuripv@gmx.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Jerry Jelinek <jerry.jelinek@joyent.com>
08:12:08 - r323910
(1 day 20 hours ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/fs.h
/head/sys/compat/linuxkpi/common/src/linux_compat.c
/head/sys/sys/param.h
Add support for 32-bit compatibility IOCTLs in the LinuxKPI.

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

PR: 222504
Submitted by: Greg V <greg@unrelenting.technology>
MFC after: 1 week
Sponsored by: Mellanox Technologies
07:44:36 - r323909
(1 day 21 hours ago)
by tsoome
Affects:  /head/sys/boot/efi/libefi/efipart.c
libefi: define EISA PNP constants

Define EISA PNP constants and use them, also fix ID for 0x701
07:40:05 - r323908
(1 day 21 hours ago)
by tsoome
Affects:  /head/sys/boot/efi/libefi/efipart.c
libefi: efipart_hdinfo_add_filepath should check strtol result

Use errno for error checking.
07:37:42 - r323907
(1 day 21 hours ago)
by tsoome
Affects:  /head/sys/boot/efi/libefi/efipart.c
libefi: efipart.c cstyle fix for efipart_print_common()

The else statement should have { }
07:34:08 - r323906
(1 day 21 hours ago)
by tsoome
Affects:  /head/sys/boot/efi/libefi/efipart.c
libefi: efipart_strategy() should return ENXIO when there is no media

We should return ENXIO to indicate the situation with device present,
but no media.
07:29:26 - r323905
(1 day 21 hours ago)
by tsoome
Affects:  /head/sys/boot/efi/include/efilib.h
/head/sys/boot/efi/loader/main.c
libefi: pdinfo_t pd_unit and pd_open should be unsigned

The device index, partition index and reference counter are all positive
numbers. However, since our internal partition number may be negative
to indicate GPT table, the compare expression need to take care when comparing
pdinfo_t and partition data.
06:33:01 - r323904
(1 day 22 hours ago)
by tuexen
Affects:  /head/sys/netinet/sctp_input.c
Add missing locking. Found by Coverity while scanning the usrsctp
library.

MFC after: 1 week
06:16:21 - r323903
(1 day 22 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/usr.bin/grep/regex/fastmatch.h
MFC r323611: fastmatch.h: remove duplicate #defines
06:07:47 - r323902
(1 day 22 hours ago)
by tuexen
Affects:  /head/sys/netinet/sctp_pcb.c
Add missing socket lock.

MFC after: 1 week
05:14:11 - r323901
(1 day 23 hours ago)
by marius
Affects: 
(2 files)
/releng/10.4/release/Makefile
MF10: r323900

- Akin r302691 in head, synchronize the build stripping for the disc1
  image with that of the bootonly image (but similarly modulo games
  and groff(1)) as the amd64 disc1 image is overflowing. This also
  removes the defunct WITHOUT_ATF.
- Remove the misspelled WITHOUT_INSTALLIB (also in place with correct
  spelling, i. e. WITHOUT_INSTALLLIB) from the bootonly image build
  stripping.

This is a direct commit to stable/10 as the corresponding knobs have
different names in head and counterparts to e. g. MK_DEBUG_FILES and
MK_TESTS default to off in stable/10 in the first place.

Approved by: re (implicit)
04:57:42 - r323900
(1 day 23 hours ago)
by marius
Affects:  /stable/10/release/Makefile
- Akin r302691 in head, synchronize the build stripping for the disc1
  image with that of the bootonly image (but similarly modulo games
  and groff(1)) as the amd64 disc1 image is overflowing. This also
  removes the defunct WITHOUT_ATF.
- Remove the misspelled WITHOUT_INSTALLIB (also in place with correct
  spelling, i. e. WITHOUT_INSTALLLIB) from the bootonly image build
  stripping.

This is a direct commit to stable/10 as the corresponding knobs have
different names in head and counterparts to e. g. MK_DEBUG_FILES and
MK_TESTS default to off in stable/10 in the first place.
04:41:48 - r323899
(2 days ago)
by cem
Affects:  /head/tests/sys/opencrypto/cryptotest.py
cryptotest.py: Like r323869, skip SHA HMAC tests on non-SHA drivers

Sponsored by: Dell EMC Isilon
04:25:44 - r323898
(2 days ago)
by cem
Affects:  /head/tests/sys/opencrypto/cryptotest.py
cryptotest.py: Fix whitespace style errors

I accidentally introduced different whitespace style in r323878. I'm not
used to using tabs for indentation in Python scripts.

Whitespace only; no functional change.

Sponsored by: Dell EMC Isilon
02:58:47 - r323897
(2 days 1 hour ago)
by tsoome
Affects:  /head/sys/boot/efi/include/efilib.h
efilib.h: typo in structure member description

The link should be replaced by list.
02:56:26 - r323896
(2 days 1 hour ago)
by tsoome
Affects:  /head/sys/boot/efi/include/efilib.h
r323885 did miss efilib.h update

The efilib.h update was left out from r323885 by mistake.
02:53:01 - r323895
(2 days 1 hour ago)
by tsoome
Affects:  /head/sys/boot/efi/libefi/devpath.c
libefi: efi_devpath_match local len should be unsigned

DevicePathNodeLength() will always return unsigned value.
02:36:36 - r323894
(2 days 2 hours ago)
by imp
Affects:  /head/sys/cam/cam_iosched.c
cam iosched: Bettar account IOPS for smoother performance

Prevent cam_iosched_iops_tick() from discarding 'unspent' ios unless
it's a new accounting interval.

Previously ios that weren't used between ticks were lost, as a result
the iops limiter could enforce a limit below the configured maximum.

Obtained from: ElectroBSD
Submitted by: Fabian Keil
PR: 221974
02:36:32 - r323893
(2 days 2 hours ago)
by imp
Affects:  /head/sys/cam/cam_iosched.c
cam iosched: Enforce iop limits below the quanta value

Previously the iops limiter would always allow at least
quanta ios per second as cam_iosched_iops_tick() never set
ios->l_value1 below 1.

Submitted by: Fabian Keil <fk@fabiankeil.de>
Obtained from: ElectroBSD
PR: 221974
00:34:46 - r323892
(2 days 4 hours ago)
by jhb
Affects:  /head/sys/opencrypto/cryptodev.c
Support AEAD requests with non-GCM algorithms.

In particular, support chaining an AES cipher with an HMAC for a request
including AAD. This permits submitting requests from userland to encrypt
objects like IPSec packets using these algorithms.

In the non-GCM case, the authentication crypto descriptor covers both the
AAD and the ciphertext. The GCM case remains unchanged. This matches
the requests created internally in IPSec. For the non-GCM case, the
COP_F_CIPHER_FIRST is also supported since the ordering matters.

Note that while this can be used to simulate IPSec requests from userland,
this ioctl cannot currently be used to perform TLS requests using AES-CBC
and MAC-before-encrypt.

Reviewed by: cem
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D11759
00:21:58 - r323891
(2 days 4 hours ago)
by jhb
Affects:  /head/share/man/man4/crypto.4
/head/sys/opencrypto/cryptodev.c
/head/sys/opencrypto/cryptodev.h
Add a new COP_F_CIPHER_FIRST flag for struct crypt_op.

This requests that the cipher be performed before rather than after
the HMAC when both are specified for a single operation.

Reviewed by: cem
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D11757
00:16:46 - r323890
(2 days 4 hours ago)
by marius
Affects:  /releng/10.4/sys/conf/newvers.sh
Update releng/10.4 to RC2 in preparation for 10.4-RC2 builds.

Approved by: re (implicit)
00:15:54 - r323889
(2 days 4 hours ago)
by jhb
Affects:  /head/sys/opencrypto/cryptodev.c
Place the AAD before the plaintext/ciphertext for CIOCRYPTAEAD.

Software crypto implementations don't care how the buffer is laid out,
but hardware implementations may assume that the AAD is always before
the plain/cipher text and that the hash/tag is immediately after the end
of the plain/cipher text.

In particular, this arrangement matches the layout of both IPSec packets
and TLS frames. Linux's crypto framework also assumes this layout for
AEAD requests.

Reviewed by: cem
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D11758
2017 - 09 - 21   (3 days ago)
23:32:44 - r323888
(2 days 5 hours ago)
by imp
Affects:  /svnadmin/conf/access
Add Chuck Tuffli (chuck@). He'll be working on CAM and NVMe related
things.

Approved by: core@
23:27:35 - r323887
(2 days 5 hours ago)
by shurd
Affects:  /head/sys/kern/subr_gtaskqueue.c
Fix undeclared identifier error introduced in r323879

It doesn't appear to be safe to use gtask->gt_name.

Reported by: Mark Johnston, Jenkins
Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12448
23:22:18 - r323886
(2 days 5 hours ago)
by tsoome
Affects:  /head/sys/boot/efi/libefi/efipart.c
libefi: efipart.c should use calloc()

The device specific *_add functions are using malloc() + memset,
should use calloc instead.
23:14:07 - r323885
(2 days 5 hours ago)
by tsoome
Affects:  /head/sys/boot/efi/libefi/devpath.c
/head/sys/boot/efi/libefi/efipart.c
libefi: efi_devpath_match() should return bool

The current implementation of efi_devpath_match() is returning values 0 or 1,
so it should be updated to return bool.
23:10:59 - r323884
(2 days 5 hours ago)
by jhb
Affects: 
(3 files)
/stable/11/sys/dev/cxgbe/tom/t4_ddp.c
/stable/11/sys/dev/cxgbe/tom/t4_tom.h
MFC 323630: Avoid reusing the wrong buffer for a DDP AIO request.

To optimize the case of ping-ponging between two buffers, the DDP code
caches the last two buffers used keeping the pages wired and page pods
stored in the NIC's RAM. If a new aio_read() request uses one of the
same buffers, then the work of holding pages, etc. can be avoided.
However, the starting virtual address of an aio buffer was not saved,
only the page count, length, and initial page offset. Thus, an
aio_read() request could match a different buffer in the address
space. (Earlier during development vm_fault_hold_quick_pages() was
always called and the vm_page_t values were compared, but that was
eventually removed without being adequately replaced.) Fix by storing
the starting virtual address and comparing that (along with other
fields) to determine if a buffer can be reused.

Sponsored by: Chelsio Communications
23:10:56 - r323883
(2 days 5 hours ago)
by imp
Affects:  /head/tools/tools/nanobsd/defaults.sh
Always create usr/local/etc -> /etc/local symlink

/usr/local/etc gets created and populated by packages. However, if no
packages are installed when setup_nanobsd is run, this symlink won't
get created, causing problems if packages are installed later (say on
first boot). Therefore, always create the symlink and etc/local. It
does no harm and may help.

Inspired by crochet issue #183 (consuingly says NanoBSD, means crochet)
Sponsored by: Netflix
23:05:32 - r323882
(2 days 5 hours ago)
by jhb
Affects:  /head/sys/fs/devfs/devfs_vnops.c
/head/sys/kern/vfs_default.c
Only handle _PC_MAX_CANON, _PC_MAX_INPUT, and _PC_VDISABLE for TTY devices.

Move handling of these three pathconf() variables out of vop_stdpathconf()
and into devfs_pathconf() as TTY devices can only be devfs files. In
addition, only return settings for these three variables for devfs devices
whose device switch has the D_TTY flag set.

Discussed with: bde, kib
Sponsored by: Chelsio Communications
22:33:59 - r323881
(2 days 6 hours ago)
by jhb
Affects:  /head/sbin/fsck_ffs/suj.c
Use UFS_LINK_MAX instead of LINK_MAX.

Submitted by: bde
Sponsored by: Chelsio Communications
22:15:45 - r323880
(2 days 6 hours ago)
by markj
Affects:  /head/sys/dev/drm2/i915/i915_gem.c
Simplify i915_gem_wire_page() and avoid unneeded page-busying.

Reviewed by: alc, kib
MFC after: 1 week
21:14:48 - r323879
(2 days 7 hours ago)
by shurd
Affects:  /head/sys/kern/subr_gtaskqueue.c
Improved logging of gtaskqueue failues

Check the return code of intr_setaffinity() and log any errors
it returns. When a qid is not located, log an error before returning
failure. Also, use __func__ rather than hardcoding the function name

Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12436
21:07:21 - r323878
(2 days 7 hours ago)
by cem
Affects:  /head/tests/sys/opencrypto/cryptotest.py
cryptotest.py: Actually use NIST-KAT HMAC test vectors and test the right hashes

Previously, this test was entirely a no-op as no vector in the NIST-KAT file
has a precisely 20-byte key.

Additionally, not every vector in the file is SHA1. The length field
determines the hash under test, and is now decoded correctly.

Finally, due to a limitation I didn't feel like fixing in cryptodev.py, MACs
are truncated to 16 bytes in this test.

With this change and the uncommitted D12437 (to allow key sizes other than
those used in IPSec), the SHA tests in cryptotest.py actually test something
and e.g. at least cryptosoft passes the test.

Sponsored by: Dell EMC Isilon
20:59:36 - r323877
(2 days 7 hours ago)
by jhb
Affects: 
(4 files)
/stable/10/libexec/rtld-elf/rtld.c
/stable/11/libexec/rtld-elf/rtld.c
MFC 323025: Read max_stack_flags from correct object.

'obj' is not initialized here.

Sponsored by: DARPA / AFRL
20:34:33 - r323876
(2 days 8 hours ago)
by shurd
Affects:  /head/sys/kern/subr_gtaskqueue.c
Fix M_GTASKQUEUE definition

Previously had the same short and long description as taskqueues.
This could cause problems with memguard(9) and vmstat -m which use
the short description as a unique identifier.

Reviewed by: sbruno
Approved by: sbruno (mentor)
MFC after: 3 days
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12438
20:29:14 - r323875
(2 days 8 hours ago)
by marius
Affects: 
(3 files)
/releng/10.4/sys/crypto/aesni/aesni.c
/releng/10.4/sys/crypto/aesni/aesni.h
MF10: r323871

MFC: r285215

remove _NORMAL flag which isn't suppose to be used w/ _alloc_ctx...

MFC: r285289

address an issue where consumers, like IPsec, can reuse the same
session in multiple threads w/o locking.. There was a single fpu
context shared per session, if multiple threads were using the session,
and both migrated away, they could corrupt each other's fpu context...

MFC: r285297

upon further examination, it turns out that _unregister_all already
provides the guarantee that no threads will be in the _newsession code..

MFC: r298332

aesni(4): Initialize error before use [1]

Reported by: Coverity [1]
CID: 1331554 [1]

Approved by: re (gjb, kib)
20:27:43 - r323874
(2 days 8 hours ago)
by shurd
Affects: 
(4 files)
/head/sys/dev/bnxt/*
bnxt: Fix driver when attached to a VF

- Use HWRM_FUNC_VF_CFG instead of HWRM_FUNC_CFG on VFs
- Fix NPAR/VF detection
- Clean up flag definitions
- Don't allow WoL on VFs

Although the bnxt driver doesn't support SR-IOV so can create VFs yet,
the PF could be running Linux or ESCi with a VF passed through to a
FreeBSD guest. This fixes the driver for that use case.

Submitted by: Siva Kallam <siva.kallam@@broadcom.com>
Reviewed by: shurd, sbruno
Approved by: sbruno (mentor)
Sponsored by: Broadcom Limited
Differential Revision: https://reviews.freebsd.org/D12410
20:16:10 - r323873
(2 days 8 hours ago)
by eugen
Affects:  /head/sys/netgraph/ng_iface.c
Unprotected modification of ng_iface(4) private data leads to kernel panic.
Fix a race with per-node read-mostly lock and refcounting for a hook.

PR: 220076
Tested by: peixoto.cassiano
Approved by: avg (mentor), mav (mentor)
MFC after: 1 week
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12435
20:13:03 - r323872
(2 days 8 hours ago)
by marius
Affects: 
(15 files)
/releng/10.4/share/man/man9/*
/releng/10.4/sys/kern/*
/releng/10.4/sys/sys/*
MF10: r323870, MFC: r275751

Add _NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9).
A _NEW flag passed to _init_flags() to avoid check for double-init.

Approved by: re (gjb)
19:30:32 - r323871
(2 days 9 hours ago)
by marius
Affects: 
(3 files)
/stable/10/sys/crypto/aesni/aesni.c
/stable/10/sys/crypto/aesni/aesni.h
MFC: r285215

remove _NORMAL flag which isn't suppose to be used w/ _alloc_ctx...

MFC: r285289

address an issue where consumers, like IPsec, can reuse the same
session in multiple threads w/o locking.. There was a single fpu
context shared per session, if multiple threads were using the session,
and both migrated away, they could corrupt each other's fpu context...

MFC: r285297

upon further examination, it turns out that _unregister_all already
provides the guarantee that no threads will be in the _newsession code..

MFC: r298332

aesni(4): Initialize error before use [1]

Reported by: Coverity [1]
CID: 1331554 [1]
19:24:11 - r323870
(2 days 9 hours ago)
by marius
Affects: 
(15 files)
/stable/10/share/man/man9/*
/stable/10/sys/kern/*
/stable/10/sys/sys/*
MFC: r275751

Add _NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9).
A _NEW flag passed to _init_flags() to avoid check for double-init.
18:06:21 - r323869
(2 days 10 hours ago)
by cem
Affects:  /head/tests/sys/opencrypto/cryptotest.py
cryptotest.py: Do not run AES-CBC or AES-GCM tests on non-AES crypto(4) drivers

For some reason, we only skipped AES-XTS tests if a driver was not in the
aesmodules list. Skip other AES modes as well to prevent spurious failures
in non-AES drivers.

Sponsored by: Dell EMC Isilon
15:32:41 - r323868
(2 days 13 hours ago)
by alc
Affects:  /head/sys/dev/drm2/i915/i915_gem.c
/head/sys/dev/drm2/i915/i915_gem_gtt.c
Modernize calls to vm_page_unwire(). As of r288122, vm_page_unwire()
accepts PQ_NONE as the specified queue and returns a Boolean indicating
whether the page's wire count transitioned to zero. Use these features
in dev/drm2.

Reviewed by: kib, markj
MFC after: 1 week
15:30:20 - r323867
(2 days 13 hours ago)
by tsoome
Affects:  /head/sys/boot/efi/libefi/devicename.c
libefi: devicename.c cleanups

Remove duplicated free()+return statements, default unit to 0
and improve strtol error processing.
14:41:41 - r323866
(2 days 14 hours ago)
by oshogbo
Affects: 
(10 files)
/head/*
We use a few different ifdef's names to check if we are using Casper or not,
let's standardize this. Now we are always use WITH_CASPER name.

Discussed with: emaste@
MFC after: 1 month
14:14:49 - r323865
(2 days 14 hours ago)
by sevan
Affects:  /head/bin/cat/cat.c
/head/bin/cat/tests/Makefile
Ammend bin/cat/cat.c so the output is the same aside
from blank lines being numbered or unnumbered, depending on whether cat
was invoked with -ne or -be.

At present, when cat is invoked with -be, there is an aditional
difference that the '$' on blank lines is placed on the far left of the
output.

Discussed in bug 210607.

While here, revert the workaround from r304035 which skipped the unit test for
this issue previously.

PR: 210607
Submitted by: myself
Reviewed by: bdrewery
Obtained from: NetBSD
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12432
14:14:01 - r323864
(2 days 14 hours ago)
by kp
Affects:  /head/sys/net/if_bridge.c
bridge: Set module version

This ensures that the loader will not load the module if it's also built in to
the kernel.

PR: 220860
Submitted by: Eugene Grosbein <eugen@freebsd.org>
Reported by: Marie Helene Kvello-Aune <marieheleneka@gmail.com>
12:37:12 - r323863
(2 days 16 hours ago)
by markj
Affects: 
(2 files)
/stable/11/usr.bin/ktrdump/ktrdump.c
MFC r323439:
Provide an error message if KTR symbols in a vmcore cannot be resolved.
12:31:51 - r323862
(2 days 16 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/sys/contrib/octeon-sdk/cvmx-l2c.c
MFC r323587: octeon sdk: initialize variable to quiet Clang warning

Clang complains "variable 'dummy' is uninitialized when used here".

Sponsored by: The FreeBSD Foundation
11:56:31 - r323861
(2 days 16 hours ago)
by tuexen
Affects: 
(4 files)
/head/sys/netinet/*
Code cleanup, no functional change.

MFC after: 1 week
10:28:22 - r323860
(2 days 18 hours ago)
by oshogbo
Affects:  /head/sys/contrib/libnv/nvpair.c
Plug memory leak in case when nvlist allocation succeeds, but nvpair
allocation fails.

Submitted by: pjd@
MFC after: 1 month
Sponsored by: Wheel Systems
10:18:02 - r323859
(2 days 18 hours ago)
by oshogbo
Affects:  /head/sys/contrib/libnv/nvpair.c
Simplify the code by _not_ expecting success under 'fail'.

Submitted by: pjd@ and oshogbo@
MFC after: 1 month
Sponsored by: Wheel Systems
10:16:44 - r323858
(2 days 18 hours ago)
by oshogbo
Affects:  /head/sys/contrib/libnv/nvpair.c
IMHO it is possible that failure will be treated as success because we don't
initialize nvp on every loop iteration and the code under 'fail'(!) label
detects success by checking of nvp != NULL.

Submitted by: pjd@
MFC after: 1 month
Sponsored by: Wheel Systems
10:16:25 - r323857
(2 days 18 hours ago)
by kib
Affects: 
(3 files)
/stable/11/lib/libc/net/getaddrinfo.3
/stable/11/lib/libc/net/getaddrinfo.c
MFC r323597:
Handle freeaddrinfo(NULL).
10:14:43 - r323856
(2 days 18 hours ago)
by oshogbo
Affects:  /head/sys/contrib/libnv/nvpair.c
Free 'value' only once we are done freeing all individual

Submitted by: pjd@
MFC after: 1 month
Found by: scan-build
Sponsored by: Wheel Systems
10:13:48 - r323855
(2 days 18 hours ago)
by n_hibma
Affects:  /head/tools/tools/nanobsd/defaults.sh
/head/tools/tools/nanobsd/legacy.sh
Remove an 'unused' function.

This function was only set in legacy.sh and only at the very end after
the disk image had been successfully created. The only difference will be
that the message 'Error encountered. Please check...' will not appear if
nanobsd.sh exits with an error after the disk image has been created.
10:10:42 - r323854
(2 days 18 hours ago)
by oshogbo
Affects:  /head/sys/contrib/libnv/nvpair.c
Because nvp wasn't initialized on every loop iteration once we jumped
to 'fail' on error it was treated as success, because nvp!=NULL. Fix this
by not handling success under 'fail' label and by using separate variable
for parent nvpair.

If we succeeded to allocate nvlist, but failed to allocated nvpair we
would leak nvls[ii] on return. Destroy it when we cannot allocate nvpair,
before we goto fail.

Submitted by: pjd@ and oshogbo@ (minor changes)
Found by: scan-build
MFC after: 1 month
Sponsored by: Wheel Systems
10:06:00 - r323853
(2 days 18 hours ago)
by oshogbo
Affects:  /head/sys/contrib/libnv/nvlist.c
/head/sys/contrib/libnv/nvpair.c
Make the code consistent by always using 'fail' label.

Submitted by: pjd@ and oshogbo@
MFC after: 1 month
Sponsored by: Wheel Systems
10:03:14 - r323852
(2 days 18 hours ago)
by oshogbo
Affects:  /head/sys/contrib/libnv/nvlist.c
The 'while (array != NULL) { }' suggests scan-build that array may be
initially NULL, which is not possible. Change the loop to
'do {} while (array != NULL)' to satisfy scan-build and assert that
array really cannot be NULL just in case.

Submitted by: pjd@
Found by: scan-build
MFC after: 1 month
Sponsored by: Wheel Systems
10:00:16 - r323851
(2 days 18 hours ago)
by oshogbo
Affects:  /head/lib/libnv/msgio.c
/head/sys/contrib/libnv/nvlist.c
/head/sys/contrib/libnv/nvpair.c
Remove redundant initialization. Don't use variable - just return the value.
Make scan-build happy by casting to 'void *' instead of 'void **'.

Submitted by: pjd@
MFC after: 1 month
Found by: scan-build and cppcheck
Sponsored by: Wheel Systems
09:47:56 - r323850
(2 days 18 hours ago)
by tuexen
Affects:  /head/sys/netinet/sctp_indata.c
Free the control structure after using is, not before.
Found by Coverity while scanning the usrsctp library.
MFC after: 1 week
09:27:44 - r323849
(2 days 19 hours ago)
by n_hibma
Affects:  /head/tools/tools/nanobsd/defaults.sh
Fix up style for consistency.
09:22:41 - r323848
(2 days 19 hours ago)
by n_hibma
Affects:  /head/tools/tools/nanobsd/embedded/common
Speling mistakes.
09:18:05 - r323847
(2 days 19 hours ago)
by tuexen
Affects:  /head/sys/netinet/sctp_indata.c
No need to wakeup, since sctp_add_to_readq() does it.

MFC after: 1 week
08:20:33 - r323846
(2 days 20 hours ago)
by andrew
Affects: 
(2 files)
/stable/11/sys/arm64/arm64/pmap.c
MFC r322800:

Remove an unneeded call to pmap_invalidate_all. This was never called as
the anyvalid variable is never set.

Sponsored by: DARPA, AFRL
08:16:21 - r323845
(2 days 20 hours ago)
by andrew
Affects: 
(2 files)
/stable/11/sys/arm64/arm64/pmap.c
MFC r322797:

Fix a bug in pmap_protect where we invalidate the wrong page. With this we
can now remove an unneeded call to invalidate all entries.

Sponsored by: DARPA, AFRL
07:35:22 - r323844
(2 days 21 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c
MFC r323575: Add second entry to LUT on a link side in B2B mode.

Each of two entries on a virtual side should have its counterpart on a
peer's link side.
05:46:28 - r323843
(2 days 22 hours ago)
by cem
Affects:  /head/tests/sys/opencrypto/cryptotest.py
cryptotest.py: Add a seatbelt that we're actually testing anything

Without nist-kat installed, cryptotest.py is a no-op. Showing 'success' in
that case is unhelpful.

Sponsored by: Dell EMC Isilon
03:18:11 - r323842
(3 days 1 hour ago)
by cy
Affects: 
(4 files)
/stable/10/sys/contrib/ipfilter/netinet/ip_state.c
/stable/11/sys/contrib/ipfilter/netinet/ip_state.c
MFC r323715:

Don't use an apostrophe in a possesive pronoun.
00:41:12 - r323841
(3 days 4 hours ago)
by rmacklem
Affects:  /head/sys/fs/nfs/nfs.h
Add a few definitions for Flex File Layout for pNFS.

These definitions will be used by a future commit.
00:03:59 - r323840
(3 days 4 hours ago)
by jkim
Affects:  /head/sys/cam/scsi/scsi_all.c
Remove an ancient comment about the existence of READ(16) and WRITE(16).

MFC after: 3 days
2017 - 09 - 20   (4 days ago)
22:35:28 - r323839
(3 days 6 hours ago)
by ae
Affects:  /head/sys/netpfil/ipfw/ip_fw2.c
Use in_localip() function instead of unlocked access to addresses hash
to determine that an address is our local.

PR: 220078
MFC after: 1 week
22:14:51 - r323838
(3 days 6 hours ago)
by marius
Affects: 
(5 files)
/releng/10.4/sys/dev/ixgbe/*
MF10: r323830

Unbreak netmap(4) support in ixgbe(4) after r315333:
- Both ixgbe_netmap.c and ixv_netmap.c assumed a netmap(4) driver
  newer than what's actually in stable/10.
- Additionally, at the bottom line ixv_netmap.c did exactly the same
  as ixgbe_netmap.c, i. e. used IXGBE_TDH() as appropriate for PFs
  only instead of IXGBE_VFTDH() and tried to configure CRC stripping
  although the corresponding registers aren't available to VFs in the
  first place.

With these changes, the netmap(4) support in ixgbe(4) is in line
again with the code in sys/dev/netmap/ixgbe_netmap.h as of r295008.
Breakage reported by: Slawa Olhovchenkov

Just like r315333 that never existed in head, this is a direct commit
to stable/10. However, ixgbe(4) in head has a related bug in that it
assumes a netmap(4) driver API older than what's in head and also
does the wrong things for VFs as it uses the PF-only ixgbe_netmap.c
for both PFs and VFs in the first place.

MF10: r323835, MFC: r320916

Reset unsupported SFP tuneable back to original entry name.

Approved by: re (gjb)
22:11:01 - r323837
(3 days 6 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/sys/modules/Makefile
MFC r323539: qlnx: exclude if WITHOUT_SOURCELESS_UCODE set

PR: 222277
Submitted by: Fabian Keil
Obtained from: ElectroBSD
22:00:06 - r323836
(3 days 6 hours ago)
by ae
Affects: 
(5 files)
/head/sys/netpfil/ipfw/*
Do not acquire IPFW_WLOCK when a named object is created and destroyed.

Acquiring of IPFW_WLOCK is requried for cases when we are going to
change some data that can be accessed during processing of packets flow.
When we create new named object, there are not yet any rules, that
references it, thus holding IPFW_UH_WLOCK is enough to safely update
needed structures. When we destroy an object, we do this only when its
reference counter becomes zero. And it is safe to not acquire IPFW_WLOCK,
because noone references it. The another case is when we failed to finish
some action and thus we are doing rollback and destroying an object, in
this case it is still not referenced by rules and no need to acquire
IPFW_WLOCK.

This also fixes panic with INVARIANTS due to recursive IPFW_WLOCK acquiring.

MFC after: 1 week
Sponsored by: Yandex LLC
21:51:10 - r323835
(3 days 6 hours ago)
by marius
Affects: 
(2 files)
/stable/10/sys/dev/ixgbe/if_ix.c
MFC: r320916

Reset unsupported SFP tuneable back to original entry name.
21:42:25 - r323834
(3 days 7 hours ago)
by imp
Affects:  /head/sys/dev/nvme/nvme_ctrlr.c
Fix queue depth for nda.

1/4 of the number of queues times queue entries is too limiting. It
works up to about 4k IOPS / 3.0GB/s for hardware that can do
4.4k/3.2GB/s with nvd. 3/4 works better, though it highlights issues
in the fairness of nda's choice of TRIM vs READ. That will be fixed
separately.
21:29:54 - r323833
(3 days 7 hours ago)
by tuexen
Affects:  /head/sys/netinet/sctp_pcb.c
/head/sys/netinet/sctputil.c
Protect the address workqueue timer by a mutex.

MFC after: 1 week
21:26:01 - r323832
(3 days 7 hours ago)
by imp
Affects:  /head/sys/cam/cam_iosched.c
cam iosched: Call cam_iosched_limiter_init() after ios->current is set to the
default

Previously ios->current was set to 0 until the first
cam_iosched_cl_maybe_steer() call.

PR: 221954
Obtained from: ElectroBSD
Submitted by: Fabian Keil
Differential Revision: https://reviews.freebsd.org/D12349
21:25:56 - r323831
(3 days 7 hours ago)
by imp
Affects:  /head/sys/cam/cam_iosched.c
cam iosched: Schedule cam_iosched_ticker() quanta times per second

Previously callout_reset() was called with a "ticks" value that was
off by one. As a result cam_iosched_ticker() was called a bit too
frequently: On systems with hz=1000 a quanta value of 200 resulted in
~250 calls and a value of 100 in ~111 calls.

For the "queue_depth" and "bandwidth" limiters the difference doesn't
matter but the "iops" limiter depends on the scheduling to enforce the
correct maximum.

PR: 221956
Obtained from: ElectroBSD
Submitted by: Fabian Keil
Differential Revision: https://reviews.freebsd.org/D12350
21:22:20 - r323830
(3 days 7 hours ago)
by marius
Affects:  /stable/10/sys/dev/ixgbe/ixgbe_netmap.c
/stable/10/sys/dev/ixgbe/ixv_netmap.c
/stable/10/sys/dev/ixgbe/ixv_netmap.h
Unbreak netmap(4) support in ixgbe(4) after r315333:
- Both ixgbe_netmap.c and ixv_netmap.c assumed a netmap(4) driver
  newer than what's actually in stable/10.
- Additionally, at the bottom line ixv_netmap.c did exactly the same
  as ixgbe_netmap.c, i. e. used IXGBE_TDH() as appropriate for PFs
  only instead of IXGBE_VFTDH() and tried to configure CRC stripping
  although the corresponding registers aren't available to VFs in the
  first place.

With these changes, the netmap(4) support in ixgbe(4) is in line
again with the code in sys/dev/netmap/ixgbe_netmap.h as of r295008.
Breakage reported by: Slawa Olhovchenkov

Just like r315333 that never existed in head, this is a direct commit
to stable/10. However, ixgbe(4) in head has a related bug in that it
assumes a netmap(4) driver API older than what's in head and also
does the wrong things for VFs as it uses the PF-only ixgbe_netmap.c
for both PFs and VFs in the first place.
21:19:53 - r323829
(3 days 7 hours ago)
by imp
Affects:  /head/sys/cam/cam_iosched.c
cam iosched: Add a handler for the quanta sysctl to enforce valid values

Invalid values can result in devision-by-zero panics or other
undefined behaviour so lets not allow them.

PR: 221957
Obtained from: ElectroBSD
Submitted by: Fabian Keil
Differential Revision: https://reviews.freebsd.org/D12351
21:13:20 - r323828
(3 days 7 hours ago)
by imp
Affects:  /head/sys/cam/cam_iosched.c
cam iosched: Use the write queue for BIO_ZONE commands

Use the write queue for BIO_ZONE commands so they can't get executed
ahead of writes that were sent after them. More generally, since they
introduce strong ordering into the list, they need to go to the write
queue (which is the only queue that BIO_ORDERED is honored for at the
moment). In fact, fix mismatch between queueing and dequeueing code by
changing this to queue all non-reads (and non-trims) to the write
queue.

As a side effect this prevents the kernel message:
kernel: Found bio_cmd = 0x9
which cam_iosched_next_bio() emits when finding commands
other than BIO_READ in the read queue.

PR: 221973
Obtained from: ElectroBSD
Submitted by: Fabian Keil
Differential Revision: https://reviews.freebsd.org/D12353
20:59:28 - r323827
(3 days 7 hours ago)
by jhb
Affects: 
(2 files)
/stable/11/contrib/compiler-rt/lib/builtins/int_lib.h
MFC 322915: Extend the workaround for LLVM bug 11663 to MIPS N32.

This fixes infinite recursion in /sbin/init for MIPS N32.

Sponsored by: DARPA / AFRL
20:48:21 - r323826
(3 days 7 hours ago)
by jhb
Affects: 
(4 files)
/stable/10/sys/dev/mly/mly.c
/stable/11/sys/dev/mly/mly.c
MFC 322270: Fix a NULL pointer dereference in mly_user_command().

If mly_user_command fails to allocate a command slot it jumps to an 'out'
label used for error handling. The error handling code checks for a data
buffer in 'mc->mc_data' to free before checking if 'mc' is NULL. Fix by
just returning directly if we fail to allocate a command and only using
the 'out' label for subsequent errors when there is actual cleanup to
perform.

PR: 217747
Reported by: PVS-Studio
20:40:49 - r323825
(3 days 8 hours ago)
by shurd
Affects:  /head/sys/net/iflib.c
Fix iflib netmap RX

RXQ setup for netmap was broken because netmap_rxq_init was getting called
before IFDI_INIT - thus we ended up with ring tail pointer being reset to zero.

Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12140
20:07:45 - r323824
(3 days 8 hours ago)
by davidcs
Affects:  /head/sys/dev/qlxgbe/ql_hw.c
/head/sys/dev/qlxgbe/ql_os.c
1. ql_hw.c:
  In ql_hw_send() return EINVAL when TSO framelength exceeds max
  supported length by HW.(davidcs)
2. ql_os.c:
  In qla_send() call bus_dmamap_unload before freeing mbuf or
  recreating dmmamap.(davidcs)
  In qla_fp_taskqueue() Add additional checks for IFF_DRV_RUNNING
  Fix qla_clear_tx_buf() call bus_dmamap_sync() before freeing
  mbuf.

Submitted by:David.Bachu@netapp.com
MFC after:5 days
18:31:36 - r323823
(3 days 10 hours ago)
by cem
Affects:  /head/sys/crypto/aesni/aesni.c
aesni(4): Fix another trivial typo (aensi -> aesni)

Sponsored by: Dell EMC Isilon
18:30:37 - r323822
(3 days 10 hours ago)
by cem
Affects:  /head/sys/x86/include/specialreg.h
/head/sys/x86/include/x86_var.h
/head/sys/x86/x86/identcpu.c
x86: Decode AMD "Extended Feature Extensions ID EBX" bits

In particular, this determines CPU support for the CLZERO instruction.

(No, I am not making this name up.)

Sponsored by: Dell EMC Isilon
18:04:28 - r323821
(3 days 10 hours ago)
by gjb
Affects:  /releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r323333, pw(8) allow empty secondary group list.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
17:53:25 - r323820
(3 days 10 hours ago)
by cem
Affects:  /head/sys/crypto/aesni/aesni.c
aesni(4): Fix trivial typo (AQUIRE -> ACQUIRE)

Sponsored by: Dell EMC Isilon
17:49:57 - r323819
(3 days 10 hours ago)
by jkim
Affects: 
(5 files)
/stable/11/sys/dev/mrsas/*
MFC: r309284-r309294 (kadesai)

r309294
This patch upgrades driver version to 06.712.04.00-fbsd

r309293
This patch will add code to refire IOCTL commands after OCR.

r309292
This patch will unblock SYNCHRONIZE_CACHE command to firmware, i.e. don't
block the SYNCHRONIZE_CACHE command at driver instead of passing it to
firmware for all Gen3 controllers.

r309291
Wait for AEN task to be completed(if in queue) before resetting the
controller and return without processing event in AEN thread, if controller
reset is in progress.

r309290
This patch will add task management support in driver. Below is high level
description:
If a SCSI IO times out, then before initiating OCR, now the driver will try
to send a target reset to the particular target for which the IO is timed
out. If that also fails, then the driver will initiate OCR.

r309289
Process outstanding reply descriptors from all the reply descriptor post
queues before initiating OCR.

r309288
Clean up reference to AEN command if abort AEN is succesful as the command
is aborted. Did the same by setting sc->aen_cmd = NULL when aborting AEN is
successful.

r309287
Update controller properties(read OCR capability bit) when
MR_EVT_CTRL_PROP_CHANGED recieved.

r309286
Add sanity check in IO and IOCTL path not to process command further if
controller is in HW_CRITICAL_ERROR.

r309285
Use a variable to indicate Gen3 controllers and remove all PCI ids based
checks used for gen3 controllers.

r309284
High level description of new solution -
Free MFI and MPT command from same context.
Free both the command either from process (from where mfi-mpt pass-through
was called) or from ISR context. Do not split freeing of MFI and MPT,
because it creates the race condition which will do MFI/MPT list.
17:30:01 - r323818
(3 days 11 hours ago)
by gjb
Affects:  /releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml
Prune the majority of empty sections from the 10.4-RELEASE relnotes
page.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
17:23:45 - r323817
(3 days 11 hours ago)
by gjb
Affects: 
(3 files)
/releng/10.4/release/tools/arm.subr
/releng/10.4/release/tools/vmimage.subr
MFS10 r323815:
 MFC r323812:
 Bootstrap etcupdate(8) and mergemaster(8) databases when creating
 virtual machine images and embedded images, similar to what is
 done when extracting base.txz to the target root filesystem in
 a new installation.

Approved by: re (marius)
Sponsored by: The FreeBSD Foundation
17:15:58 - r323816
(3 days 11 hours ago)
by gjb
Affects: 
(2 files)
/stable/11/share/man/man4/siba.4
MFC r323557:
 Remove an unneeded sentence stop.

Sponsored by: The FreeBSD Foundation
17:09:04 - r323815
(3 days 11 hours ago)
by gjb
Affects: 
(6 files)
/stable/10/release/tools/*
/stable/11/release/tools/*
MFC r323812:
 Bootstrap etcupdate(8) and mergemaster(8) databases when creating
 virtual machine images and embedded images, similar to what is
 done when extracting base.txz to the target root filesystem in
 a new installation.

Approved by: re (marius, insta-MFC)
Sponsored by: The FreeBSD Foundation
16:31:06 - r323814
(3 days 12 hours ago)
by gnn
Affects: 
(4 files)
/stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d
/stable/11/cddl/lib/libdtrace/Makefile
/stable/11/cddl/lib/libdtrace/socket.d
MFC: 323253, 323499

Add D definitions for the named values in socket.h (gnn@)

Fix DTrace test tst_inet_ntop_d: remove definitions are already in libdtrace
(lwhsu@)
16:31:00 - r323813
(3 days 12 hours ago)
by asomers
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c
MFV r323789: 8473 scrub does not detect errors on active spares

illumos/illumos-gate@554675eee75dd2d7398d960aa5c81083ceb8505a
https://github.com/illumos/illumos-gate/commit/554675eee75dd2d7398d960aa5c81083ceb8505a

https://www.illumos.org/issues/8473
Scrubbing is supposed to detect and repair all errors in the pool. However,
it wrongly ignores active spare devices. The problem can easily be
reproduced in OpenZFS at git rev 0ef125d with these commands:

truncate -s 64m /tmp/a /tmp/b /tmp/c
sudo zpool create testpool mirror /tmp/a /tmp/b spare /tmp/c
sudo zpool replace testpool /tmp/a /tmp/c
/bin/dd if=/dev/zero bs=1024k count=63 oseek=1 conv=notrunc of=/tmp/c
sync
sudo zpool scrub testpool
zpool status testpool # Will show 0 errors, which is wrong
sudo zpool offline testpool /tmp/a
sudo zpool scrub testpool
zpool status testpool # Will show errors on /tmp/c,
  # which should've already been fixed

FreeBSD head is partially affected: the first scrub will detect some errors,
but the second scrub will detect more.

Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

MFC after: 1 week
Sponsored by: Spectra Logic Corp
15:49:12 - r323812
(3 days 12 hours ago)
by gjb
Affects:  /head/release/tools/arm.subr
/head/release/tools/vmimage.subr
Bootstrap etcupdate(8) and mergemaster(8) databases when creating
virtual machine images and embedded images, similar to what is
done when extracting base.txz to the target root filesystem in
an new installation.

Noticed by: marius
Tested with: head@r323729
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
15:00:00 - r323811
(3 days 13 hours ago)
by hselasky
Affects:  /head/etc/devd/usb.conf
Regenerate usb.conf .

MFC after: 1 week
14:46:24 - r323810
(3 days 13 hours ago)
by hselasky
Affects: 
(3 files)
/stable/9/sys/dev/usb/quirk/usb_quirk.c
/stable/9/sys/dev/usb/usbdevs
MFC r322530 and r323220:
Add new USB quirk(s).

PR: 221775
PR: 221328
Sponsored by: Mellanox Technologies
14:43:55 - r323809
(3 days 14 hours ago)
by hselasky
Affects: 
(3 files)
/stable/10/sys/dev/usb/quirk/usb_quirk.c
/stable/10/sys/dev/usb/usbdevs
MFC r322530 and r323220:
Add new USB quirk(s).

PR: 221775
PR: 221328
Sponsored by: Mellanox Technologies
14:42:21 - r323808
(3 days 14 hours ago)
by hselasky
Affects: 
(3 files)
/stable/11/sys/dev/usb/quirk/usb_quirk.c
/stable/11/sys/dev/usb/usbdevs
MFC r322530 and r323220:
Add new USB quirk(s).

PR: 221328
PR: 221775
Sponsored by: Mellanox Technologies
10:24:45 - r323807
(3 days 18 hours ago)
by pho
Affects:  /user/pho/stress2/misc/msdos4.sh
Added problem found. Return fsck status and limit runtime.
Style fix.

Sponsored by: Dell EMC Isilon
10:22:03 - r323806
(3 days 18 hours ago)
by pho
Affects:  /user/pho/stress2/misc/msdos.sh
Return the fsck status.

Sponsored by: Dell EMC Isilon
09:31:16 - r323805
(3 days 19 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/vm/vm_page.c
MFC r323562:
Remove inline specifier from vm_page_free_wakeup(), do not
micro-manage compiler.
09:29:03 - r323804
(3 days 19 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/vm/vm_object.c
MFC r323561:
Do not relock free queue mutex for each page, free whole terminating
object' page queue under the single mutex lock.
09:22:47 - r323803
(3 days 19 hours ago)
by kib
Affects: 
(3 files)
/stable/11/sys/vm/vm_object.c
/stable/11/sys/vm/vm_object.h
MFC r322571 (by br):
Add OBJ_PG_DTOR flag to VM object.
09:17:48 - r323802
(3 days 19 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/vm/vm_object.h
MFC r321330 (by br):
Style.
09:11:27 - r323801
(3 days 19 hours ago)
by kib
Affects: 
(3 files)
/stable/11/sys/vm/vm_page.c
/stable/11/sys/vm/vm_page.h
MFC r323559:
Split vm_page_free_toq().
08:51:03 - r323800
(3 days 19 hours ago)
by kib
Affects: 
(3 files)
/stable/11/sys/vm/vm_object.h
/stable/11/sys/vm/vm_page.h
MFC r323558:
Use existing tag name for the vm_object' memq.
08:45:42 - r323799
(3 days 20 hours ago)
by kib
Affects: 
(5 files)
/stable/11/lib/libpmc/libpmc.c
/stable/11/sys/dev/hwpmc/*
MFC r323230:
Skylake server core PMC support for hwpmc(4).
08:41:46 - r323798
(3 days 20 hours ago)
by kib
Affects: 
(2 files)
/stable/11/lib/libpmc/libpmc.c
MFC r323229:
Minor style changes to make forthcoming code stand out less.
08:36:31 - r323797
(3 days 20 hours ago)
by avg
Affects:  /head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c
add vfs_zfs.abd_chunk_size tunable

It is reported that the default value of 4KB results in a substantial
memory use overhead (at least, on some configurations). Using 1KB seems
to reduce the overhead significantly.

PR: 222377
Reported by: Sean Chittenden <sean@chittenden.org>
MFC after: 1 week
08:27:21 - r323796
(3 days 20 hours ago)
by avg
Affects:  /head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
fix memory leak in g_bio zone introduced in r320452, another ABD fallout

I overlooked the fact that that ZIO_IOCTL_PIPELINE does not include
ZIO_STAGE_VDEV_IO_DONE stage. We do allocate a struct bio for an ioctl
zio (a disk cache flush), but we never freed it.

This change splits bio handling into two groups, one for normal
read/write i/o that passes data around and, thus, needs the abd data
tranform; the other group is for "data-less" i/o such as trim and cache
flush.

PR: 222288
Reported by: Dan Nelson <dnelson@allantgroup.com>
Tested by: Borja Marcos <borjam@sarenet.es>
MFC after: 10 days
07:28:18 - r323795
(3 days 21 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c
/vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h
/vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c
8604 Avoid unnecessary work search in VFS when unmounting snapshots

illumos/illumos-gate@ed992b0aac4e5b70dc1273b1d055c0d471fbb4b1
https://github.com/illumos/illumos-gate/commit/ed992b0aac4e5b70dc1273b1d055c0d471fbb4b1

https://www.illumos.org/issues/8604
  Every time we want to unmount a snapshot (happens during snapshot deletion or
  renaming) we unnecessarily iterate through all the mountpoints in the VFS
layer
  (see zfs_get_vfs).
  Ideally we would just put a hold on the snapshot and access its respective VFS
  resource directly.
  gwilson_snap_unmount.svg - Flamegraph indicating the issue discussed (138 KB)
  Serapheim Dimitropoulos, 2017-09-14 06:36 PM

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Serapheim Dimitropoulos <serapheim@delphix.com>
07:27:45 - r323794
(3 days 21 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c
/vendor/illumos/dist/man/man1m/zfs-program.1m
8605 zfs channel programs: zfs.exists undocumented and non-working

illumos/illumos-gate@5f39f884e2035d671ec02148fc4d8420c670bcb4
https://github.com/illumos/illumos-gate/commit/5f39f884e2035d671ec02148fc4d8420c670bcb4

https://www.illumos.org/issues/8605
  zfs.exists() in channel programs doesn't return any result, and should have a
  man page entry.

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Chris Williamson <chris.williamson@delphix.com>
07:26:52 - r323793
(3 days 21 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h
MFV r323792: 8602 remove unused "dp_early_sync_tasks" field from "dsl_pool"
structure

illumos/illumos-gate@2bcb5458541cc6e8bf7dc541303da29297b82e8b
https://github.com/illumos/illumos-gate/commit/2bcb5458541cc6e8bf7dc541303da29297b82e8b

https://www.illumos.org/issues/8602
  When I landed the fix for 8558, I incorrectly added the "dp_early_sync_tasks"
  field to the "dsl_pool" structure. This field is used in DelphixOS, but not in
  illumos. It was incorrectly pulled into illumos, so this bug is to remove it
  from the structure.

Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

MFC after: 1 week
07:24:57 - r323792
(3 days 21 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h
8602 remove unused "dp_early_sync_tasks" field from "dsl_pool" structure

illumos/illumos-gate@2bcb5458541cc6e8bf7dc541303da29297b82e8b
https://github.com/illumos/illumos-gate/commit/2bcb5458541cc6e8bf7dc541303da29297b82e8b

https://www.illumos.org/issues/8602
  When I landed the fix for 8558, I incorrectly added the "dp_early_sync_tasks"
  field to the "dsl_pool" structure. This field is used in DelphixOS, but not in
  illumos. It was incorrectly pulled into illumos, so this bug is to remove it
  from the structure.

Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>
07:23:50 - r323791
(3 days 21 hours ago)
by avg
Affects: 
(4 files)
/head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
MFV r323790: 8567 Inconsistent return value in zpool_read_label

illumos/illumos-gate@c861bfbd77c4ae780a0341e9cb6926d8b74341cf
https://github.com/illumos/illumos-gate/commit/c861bfbd77c4ae780a0341e9cb6926d8b74341cf

https://www.illumos.org/issues/8567
  If fstat64 fails, pread64 fails, or the label is unintelligible,
  zpool_read_label will return 0. But if malloc fails, it will return -1. For
  consistency, it should always return -1 on failure or 0 on success.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alan Somers <asomers@gmail.com>

MFC after: 2 weeks
07:18:09 - r323790
(3 days 21 hours ago)
by avg
Affects:  /vendor/illumos/dist/cmd/zpool/zpool_main.c
/vendor/illumos/dist/lib/libzfs/common/libzfs_import.c
8567 Inconsistent return value in zpool_read_label

illumos/illumos-gate@c861bfbd77c4ae780a0341e9cb6926d8b74341cf
https://github.com/illumos/illumos-gate/commit/c861bfbd77c4ae780a0341e9cb6926d8b74341cf

https://www.illumos.org/issues/8567
  If fstat64 fails, pread64 fails, or the label is unintelligible,
  zpool_read_label will return 0. But if malloc fails, it will return -1. For
  consistency, it should always return -1 on failure or 0 on success.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alan Somers <asomers@gmail.com>
06:34:48 - r323789
(3 days 22 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_mirror.c
8473 scrub does not detect errors on active spares

illumos/illumos-gate@554675eee75dd2d7398d960aa5c81083ceb8505a
https://github.com/illumos/illumos-gate/commit/554675eee75dd2d7398d960aa5c81083ceb8505a

https://www.illumos.org/issues/8473
  Scrubbing is supposed to detect and repair all errors in the pool. However, it
  wrongly ignores active spare devices. The problem can easily be reproduced in
  OpenZFS at git rev 0ef125d with these commands:

  truncate -s 64m /tmp/a /tmp/b /tmp/c
  sudo zpool create testpool mirror /tmp/a /tmp/b spare /tmp/c
  sudo zpool replace testpool /tmp/a /tmp/c
  /bin/dd if=/dev/zero bs=1024k count=63 oseek=1 conv=notrunc of=/tmp/c
  sync
  sudo zpool scrub testpool
  zpool status testpool # Will show 0 errors, which is wrong
  sudo zpool offline testpool /tmp/a
  sudo zpool scrub testpool
  zpool status testpool # Will show errors on /tmp/c, which should've already
been fixed

  FreeBSD head is partially affected: the first scrub will detect some errors,
  but the second scrub will detect more.

Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Alan Somers <asomers@gmail.com>
06:29:11 - r323788
(3 days 22 hours ago)
by avg
Affects: 
(2 files)
/stable/10/sys/dev/jedec_ts/jedec_ts.c
MFC r323540: jedec_ts: add many more devices from various vendors

The new IDs are taken from the hardware to which I have access
and from open datasheets.

Also, the hardware probing is moved to the device probe method.
06:28:41 - r323787
(3 days 22 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/dev/jedec_ts/jedec_ts.c
MFC r323540: jedec_ts: add many more devices from various vendors

The new IDs are taken from the hardware to which I have access
and from open datasheets.

Also, the hardware probing is moved to the device probe method.
04:59:52 - r323786
(3 days 23 hours ago)
by alc
Affects:  /head/sys/net/bpf_zerocopy.c
In r288122, we changed vm_page_unwire() so that it returns a Boolean
indicating whether the page's wire count transitioned to zero. Use that
return value in zbuf_page_free() rather than checking the wire count.

MFC after: 1 week
04:19:49 - r323785
(4 days ago)
by alc
Affects:  /head/sys/riscv/riscv/pmap.c
Sync with amd64/arm/arm64/i386/mips pmap change r288256:

Exploit r288122 to address a cosmetic issue. Since PV chunk pages don't
belong to a vm object, they can't be paged out. Since they can't be paged
out, they are never enqueued in a paging queue. Nonetheless, passing
PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages
are being enqueued in the inactive queue. As of r288122, we can avoid
this false impression by passing PQ_NONE.

MFC after: 1 week
2017 - 09 - 19   (5 days ago)
23:41:55 - r323784
(4 days 5 hours ago)
by cognet
Affects:  /head/sys/arm/include/pmap-v4.h
Define CPU_XSCALE_CORE3 when relevant.
It was lost when cpuconf.h was deobirted.
23:28:22 - r323783
(4 days 5 hours ago)
by rmacklem
Affects:  /head/sys/fs/nfs/nfs_var.h
/head/sys/fs/nfsclient/nfs_clrpcops.c
Make the nfsrpc_layoutget() function a static.

Make the NFSv4 pNFS client function nfsrpc_layoutget() a static, since it
is only used in sys/fs/nfsclient/nfs_clrpcops.c.
This prepares the code for future patches that add Flex File layout
support.
23:26:27 - r323782
(4 days 5 hours ago)
by davidcs
Affects:  /head/sys/dev/qlxgbe/ql_def.h
/head/sys/dev/qlxgbe/ql_os.c
Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval

MFC after:5 days
22:17:30 - r323781
(4 days 6 hours ago)
by davidcs
Affects:  /head/sys/dev/qlxgbe/ql_minidump.c
Update minidump template for version 5.4.66

MFC after:5 days
21:31:36 - r323780
(4 days 7 hours ago)
by rmacklem
Affects:  /head/sys/fs/nfs/nfs_var.h
/head/sys/fs/nfsclient/nfs_clcomsubs.c
Add a new function called nfsm_uiombuflist(), similar to nfsm_uiombuf().

This patch adds a new function called nfsm_uiombuflist(), which is
similar to nfsm_uiombuf(), but doesn't not use the fields in
struct nfsrv_descript. This new function will be used by the pNFS client
for writing to mirrors using Flex Files layout.
The function is not yet called anywhere.
Also, get rid of #ifndef APPLE, which is ancient cruft left over from
the Mac OSX port of the NFSv4 client.
20:45:25 - r323779
(4 days 8 hours ago)
by rmacklem
Affects:  /head/sys/fs/nfs/nfs_var.h
/head/sys/fs/nfsclient/nfs_clrpcops.c
/head/sys/fs/nfsclient/nfs_clstate.c
Simplify nfsrpc_layoutreturn() args.

Simplify nfsrpc_layoutreturn() args. in preparation for the addition
of Flex File layout support, since File layout uses a 0 length field.
Flex Files does use a longer field, but that will be added in a
subsequent commit.
20:40:05 - r323778
(4 days 8 hours ago)
by jpaetzel
Affects: 
(5 files)
/head/sys/*
Fix indentation for r323068

PR: 220170
Reported by: lidl
MFC after: 3 days
Pointyhat to: jpaetzel
20:33:22 - r323777
(4 days 8 hours ago)
by cognet
Affects:  /head/sys/arm/xscale/i8134x/std.i81342
i81342 is little endian, not big endian.
20:24:13 - r323776
(4 days 8 hours ago)
by tuexen
Affects:  /head/sys/netinet/sctp_input.c
Fix a warning.

MFC after: 1 week
20:18:41 - r323775
(4 days 8 hours ago)
by rmacklem
Affects:  /head/sys/fs/nfs/nfs_var.h
/head/sys/fs/nfsclient/nfs_clrpcops.c
/head/sys/fs/nfsclient/nfs_clstate.c
Simplify nfsrpc_layoutcommit() args.

Simplify nfsrpc_layoutcommit() args. in preparation for the addition
of Flex File layout support, since it also uses a 0 length field.
20:09:58 - r323774
(4 days 8 hours ago)
by tuexen
Affects:  /head/sys/netinet/sctp_input.c
Avoid an overflow when computing the staleness.
This issue was found by running libfuzz on the userland stack.

MFC after: 1 week
18:18:24 - r323773
(4 days 10 hours ago)
by nwhitehorn
Affects:  /projects/powernv/conf/Makefile.powerpc
/projects/powernv/conf/ldscript.powerpc64
Instead of relying on extra linker options present only in post-tree binutils,
suppress PT_INTERP using the linker script.
17:57:04 - r323772
(4 days 10 hours ago)
by kib
Affects:  /head/sys/amd64/amd64/sys_machdep.c
/head/sys/i386/i386/sys_machdep.c
Do not do torn writes to active LDTs.

Care must be taken when updating the active LDT, since parallel
threads might try to load a segment descriptor which is currently
updated. Since the results are undefined, this cannot be ignored by
claiming to be an application race.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D12413
17:12:18 - r323771
(4 days 11 hours ago)
by nwhitehorn
Affects:  /projects/powernv/powerpc/powerpc/clock.c
Avoid going into an infinite decrementer interrupt loop if the kernel
starts with a small or negative decrementer value.
16:51:51 - r323770
(4 days 11 hours ago)
by jpaetzel
Affects: 
(7 files)
/stable/11/sys/*
MFC: 323068

  Allow kldload tcpmd5

PR: 220170
16:49:45 - r323769
(4 days 11 hours ago)
by kib
Affects:  /head/sys/kern/vfs_mount.c
Do not vrele() covered vnode under the mp mutex.

If vrele() changes the hold count to zero, it needs to acquire the
vnode lock.

Sponsored by: The FreeBSD Foundation
Discussed with: avg
X-MFC with: r323578
16:46:37 - r323768
(4 days 11 hours ago)
by kib
Affects:  /head/sys/kern/vfs_subr.c
/head/sys/vm/vm_object.c
For unlinked files, do not msync(2) or sync on the vnode deactivation.

One consequence of the patch is that msyncing unlinked file mappings
no longer reduces the amount of the dirty memory in the system, but I
do not think that there are users of msync(2) that utilize it for such
side-effect.

Reported and tested by: tjil
PR: 222356
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D12411
16:38:54 - r323767
(4 days 12 hours ago)
by eugen
Affects:  /head/share/misc/committers-ports.dot
/head/share/misc/committers-src.dot
Add myself and mentorship status to committers files.
This was not done right when I got my ports bit, so do them both in one commit:

my ports mentors were az@ and vsevolod@ and my src mentors are avg@ and mav@

Approved by: avg (mentor)
15:50:18 - r323766
(4 days 12 hours ago)
by pho
Affects:  /user/pho/stress2/misc/truncate6.sh
lidl@ suggested collapsing the 'grep' into the 'awk' invocation.
Removed a redundant 'rm' from the last commit.

Sponsored by: Dell EMC Isilon
15:39:47 - r323765
(4 days 13 hours ago)
by gjb
Affects:  /releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml
Wordsmith entries for r318430 and r313433 for clarification.

Submitted by: rpokala
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
15:08:31 - r323764
(4 days 13 hours ago)
by danfe
Affects:  /head/sbin/geom/class/part/gpart.8
Provide an articulate example of how to properly delete partitions and
partitioning scheme.

Users often get confused and frustrated when trying to delete partition
table and getting ``Device busy'' error because they forgot (or did not
ever know that they have) to delete all its partitions first, and while
the manual page mentions this briefly, it does not stress it out enough.

Approved by: ae, manpages (bjk)
PR (as inspiration): 196102
Differential Revision: https://reviews.freebsd.org/D12336
15:00:19 - r323763
(4 days 13 hours ago)
by tuexen
Affects:  /head/sys/netinet/sctp_indata.c
Remove a no longer used variable.

Reported by: Felix Weinrank
MFC after: 1 week
12:43:47 - r323762
(4 days 16 hours ago)
by avg
Affects: 
(2 files)
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
MFC r323482: zfs_ctldir: remove obsolete / bogus ARGSUSED lint directives

None of the tagged functions had unused parameters.
09:39:48 - r323761
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
MFC r323482: zfs_ctldir: remove obsolete / bogus ARGSUSED lint directives

None of the tagged functions had unused parameters.
09:35:07 - r323760
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c
MFC r323435: MFV r323111: 8569 problem with inline functions in abd.h

illumos/illumos-gate@37e84ab74e939caf52150fc3352081786ecc0c29
https://github.com/illumos/illumos-gate/commit/37e84ab74e939caf52150fc3352081786ecc0c29

https://www.illumos.org/issues/8569
  C [C99] has peculiar rules for inline functions that are different from the
  C++ rules. Unlike C++ where inline is "fire and forget", in C a programmer
  must pay attention to the function's storage class / visibility. The main
  problem is with the case where a compiler decides to not inline a call to the
  function declared as inline.
  Some relevant links:
  -
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15831.html
  - http://www.drdobbs.com/the-new-c-inline-functions/184401540
  The summary is that either the inline functions should be declared 'static
  inline' or one of the compilation units (.c files) must provide a callable
  externally visible function definition. In the former case, the compiler
would
  automatically create a local non-inlined function instance in every
compilation
  unit where it's needed. In the latter case the single external definition is
  used to satisfy any non-inlined calls in all compilation units. As things
  stand right now, we can get an undefined reference error under certain
  combinations of compilers and compiler options. For example, this is what I
  get on FreeBSD when compiling with clang 4.0.0 and -O1:
  In function `abd_free':
/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c:385:
  undefined reference to `abd_is_linear'

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andriy Gapon <avg@FreeBSD.org>
09:26:13 - r323759
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h
MFC r322241: MFV r322240: 8491 uberblock on-disk padding to reserve space for
smoothly merging zpool checkpoint & MMP in ZFS

illumos/illumos-gate@79c2b812ee2010ebf20fdd92dc5f06b59000a94c
https://github.com/illumos/illumos-gate/commit/79c2b812ee2010ebf20fdd92dc5f06b59000a94c

https://www.illumos.org/issues/8491
  The zpool checkpoint feature in DxOS added a new field in the uberblock.
  The Multi-Modifier Protection Pull Request from ZoL adds two new fields in the
  uberblock (Reference: https://github.com/zfsonlinux/zfs/pull/6279).
  As these two changes come from two different sources and once upstreamed and
  deployed will introduce an incompatibility with each other we want
  to upstream a change that will reserve the padding for both of them so
  integration goes smoothly and everyone gets both features.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Olaf Faaland <faaland1@llnl.gov>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Serapheim Dimitropoulos <serapheim@delphix.com>
09:23:39 - r323758
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h
MFC r322241: MFV r322240: 8491 uberblock on-disk padding to reserve space for
smoothly merging zpool checkpoint & MMP in ZFS

illumos/illumos-gate@79c2b812ee2010ebf20fdd92dc5f06b59000a94c
https://github.com/illumos/illumos-gate/commit/79c2b812ee2010ebf20fdd92dc5f06b59000a94c

https://www.illumos.org/issues/8491
  The zpool checkpoint feature in DxOS added a new field in the uberblock.
  The Multi-Modifier Protection Pull Request from ZoL adds two new fields in the
  uberblock (Reference: https://github.com/zfsonlinux/zfs/pull/6279).
  As these two changes come from two different sources and once upstreamed and
  deployed will introduce an incompatibility with each other we want
  to upstream a change that will reserve the padding for both of them so
  integration goes smoothly and everyone gets both features.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Olaf Faaland <faaland1@llnl.gov>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Serapheim Dimitropoulos <serapheim@delphix.com>
09:19:19 - r323757
(4 days 19 hours ago)
by avg
Affects: 
(7 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
/stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/*
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r322230: MFV r322229: 7600 zfs rollback should pass target snapshot to
kernel

illumos/illumos-gate@77b171372ed21642e04c873ef1e87fe2365520df
https://github.com/illumos/illumos-gate/commit/77b171372ed21642e04c873ef1e87fe2365520df

https://www.illumos.org/issues/7600
  At present, the kernel side code seems to blindly rollback to whatever happens
  to be the latest snapshot at the time when the rollback task is processed.
  The expected target's name should be passed to the kernel driver and the sync
  task should validate that the target exists and that it is the latest snapshot
  indeed.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andriy Gapon <avg@FreeBSD.org>
09:15:07 - r323756
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c
MFC r322228: MFV r322227: 8377 Panic in bookmark deletion

illumos/illumos-gate@42418f9e73f0d007aa87675ecc206c26fc8e073e
https://github.com/illumos/illumos-gate/commit/42418f9e73f0d007aa87675ecc206c26fc8e073e

https://www.illumos.org/issues/8377
  The problem is that when dsl_bookmark_destroy_check() is executed from open
  context (the pre-check), it fills in dbda_success based on the existence of
the
  bookmark.
  But the bookmark (or containing filesystem as in this case) can be destroyed
  before we get to syncing context. When we re-run dsl_bookmark_destroy_check()
  in syncing
  context, it will not add the deleted bookmark to dbda_success, intending for
  dsl_bookmark_destroy_sync() to not process it. But because the bookmark is
  still in dbda_success
  from the open-context call, we do try to destroy it.
  The fix is that dsl_bookmark_destroy_check() should not modify dbda_success
  when called from open context.

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
09:11:07 - r323755
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c
MFC r322228: MFV r322227: 8377 Panic in bookmark deletion

illumos/illumos-gate@42418f9e73f0d007aa87675ecc206c26fc8e073e
https://github.com/illumos/illumos-gate/commit/42418f9e73f0d007aa87675ecc206c26fc8e073e

https://www.illumos.org/issues/8377
  The problem is that when dsl_bookmark_destroy_check() is executed from open
  context (the pre-check), it fills in dbda_success based on the existence of
the
  bookmark.
  But the bookmark (or containing filesystem as in this case) can be destroyed
  before we get to syncing context. When we re-run dsl_bookmark_destroy_check()
  in syncing
  context, it will not add the deleted bookmark to dbda_success, intending for
  dsl_bookmark_destroy_sync() to not process it. But because the bookmark is
  still in dbda_success
  from the open-context call, we do try to destroy it.
  The fix is that dsl_bookmark_destroy_check() should not modify dbda_success
  when called from open context.

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
09:07:51 - r323754
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
MFC r322222: MFV r322221: 7910 l2arc_write_buffers() may write beyond target_sz

FreeBD note: the essence of this change was committed to FreeBSD in
r314274. This commit catches up with differences between what was
committed to FreeBSD and what was committed to OpenZFS, mainly more
logical variable names.

illumos/illumos-gate@16a7e5ac116c85d965007a5f201104b564e82210
https://github.com/illumos/illumos-gate/commit/16a7e5ac116c85d965007a5f201104b564e82210

https://www.illumos.org/issues/7910
  It seems that the change in issue #6950 resurrected the problem that was
  earlier fixed by the change in issue #5219.
  Please also see the following FreeBSD bug report:
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216178

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andriy Gapon <avg@FreeBSD.org>
09:04:29 - r323753
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
MFC r322234: zfs: no need for __DECONST after abd constification in r322233

Note that vdev_label_write_pad2() is FreeBSD specific.
09:02:26 - r323752
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
MFC r322239: MFV r322238: 7915 checks in l2arc_evict could use some cleaning up

illumos/illumos-gate@267ae6c3a88d2fc39276af66caafa978b0935b82
https://github.com/illumos/illumos-gate/commit/267ae6c3a88d2fc39276af66caafa978b0935b82

https://www.illumos.org/issues/7915
  l2arc_evict() is strictly serialized with respect to
  l2arc_write_buffers() and l2arc_write_done(). Normally, l2arc_evict()
  and l2arc_write_buffers() are called from the same thread, so they can
  not be concurrent. Also, l2arc_write_buffers() uses zio_wait() on the
  parent zio of all cache zio-s. That ensures that l2arc_write_done()
  is completed before l2arc_write_buffers() returns. Finally, if a
  cache device is removed, then l2arc_evict() is called under SCL_ALL in
  the exclusive mode. That ensures that it can not be concurrent with
  the normal L2ARC accesses to the device (including writing and
  evicting buffers). Given the above, some checks and actions in
  l2arc_evict() do not make sense. For instance, it must never
  encounter the write head header let alone remove it from the buffer
  list.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Andriy Gapon <avg@FreeBSD.org>
08:59:11 - r323751
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
MFC r322218: MFV r322217: 8418 zfs_prop_get_table() call in zfs_validate_name()
is a no-op

illumos/illumos-gate@e09ba01dcda5e24964b8632718777b39166d86e4
https://github.com/illumos/illumos-gate/commit/e09ba01dcda5e24964b8632718777b39166d86e4

https://www.illumos.org/issues/8418
  The following line in zfs_validate_name() is just a no-op and it
  should be removed:
  108 (void) zfs_prop_get_table();

Reviewed by: Vitaliy Gusev <gusev.vitaliy@icloud.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Marcel Telka <marcel@telka.sk>
08:57:19 - r323750
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
MFC r322237: MFV r322236: 8126 ztest assertion failed in dbuf_dirty due to
dn_nlevels changing

illumos/illumos-gate@dcb6872c565819ac88acbc2ece999ef241c8b982
https://github.com/illumos/illumos-gate/commit/dcb6872c565819ac88acbc2ece999ef241c8b982

https://www.illumos.org/issues/8126
  The sync thread is concurrently modifying dn_phys->dn_nlevels
  while dbuf_dirty() is trying to assert something about it, without
  holding the necessary lock. We need to move this assertion further down
  in the function, after we have acquired the dn_struct_rwlock.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
08:54:41 - r323749
(4 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h
MFC r322233: MFV r322232: 8426 mark immutable buffer arguments as such in abd.h

illumos/illumos-gate@9b195260e22529ac0e2580faaf89402420589c1c
https://github.com/illumos/illumos-gate/commit/9b195260e22529ac0e2580faaf89402420589c1c

https://www.illumos.org/issues/8426
  abd_copy_from_buf and abd_cmp_buf do not modify their void *buf arguments, so
  qualify them with const.
  abd_copy_from_buf_off and abd_cmp_buf_off already had that type for the
  corresponding arguments.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andriy Gapon <avg@FreeBSD.org>
08:53:13 - r323748
(4 days 19 hours ago)
by avg
Affects: 
(5 files)
/stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r322226: MFV r322223: 8378 crash due to bp in-memory modification of
nopwrite block

illumos/illumos-gate@b7edcb940884114e61382937505433c4c38c0278
https://github.com/illumos/illumos-gate/commit/b7edcb940884114e61382937505433c4c38c0278

https://www.illumos.org/issues/8378
  The problem is that zfs_get_data() supplies a stale zgd_bp to dmu_sync(),
which
  we then nopwrite against.
  zfs_get_data() doesn't hold any DMU-related locks, so after it copies
db_blkptr
  to zgd_bp, dbuf_write_ready()
  could change db_blkptr, and dbuf_write_done() could remove the dirty record.
  dmu_sync() then sees the stale
  BP and that the dbuf it not dirty, so it is eligible for nop-writing.
  The fix is for dmu_sync() to copy db_blkptr to zgd_bp after acquiring the
  db_mtx. We could still see a stale
  db_blkptr, but if it is stale then the dirty record will still exist and thus
  we won't attempt to nopwrite.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
08:43:45 - r323747
(4 days 20 hours ago)
by avg
Affects: 
(2 files)
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
MFC r321471: spa_import_rootpool should be able to handle an imported root pool

That is required to support reboot -r with a new root filesystem being
on an already imported pool.

PR: 210721
08:43:16 - r323746
(4 days 20 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
MFC r321471: spa_import_rootpool should be able to handle an imported root pool

That is required to support reboot -r with a new root filesystem being
on an already imported pool.

PR: 210721
08:39:54 - r323745
(4 days 20 hours ago)
by avg
Affects: 
(4 files)
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c
MFC r320352: zfs: port vdev_file part of illumos change 3306

3306 zdb should be able to issue reads in parallel
illumos/illumos-gate/31d7e8fa33fae995f558673adb22641b5aa8b6e1
https://www.illumos.org/issues/3306

The upstream change was made before we started to import upstream commits
individually. It was imported into the illumos vendor area as r242733.
That commit was MFV-ed in r260138, but as the commit message says
vdev_file.c was left intact.

This commit actually implements the parallel I/O for vdev_file using a
taskqueue with multiple thread. This implementation does not depend on
the illumos or FreeBSD bio interface at all, but uses zio_t to pass
around all the relevent data. So, the code looks a bit different from
the upstream.

This commit also incorporates ZoL commit
zfsonlinux/zfs/bc25c9325b0e5ced897b9820dad239539d561ec9 that fixed
https://github.com/zfsonlinux/zfs/issues/2270
We need to use a dedicated taskqueue for exactly the same reason as ZoL
as we do not implement TASKQ_DYNAMIC.
08:34:13 - r323744
(4 days 20 hours ago)
by avg
Affects: 
(2 files)
/stable/10/contrib/tcp_wrappers/scaffold.c
MFC r320151: remove bogus declaration of malloc from tcp_wrappers

The declaration was already inactive when INET6 was enabled
and it causes a build error in the other case because of
a conflict with the correct definition in stdlib.h.
08:34:03 - r323743
(4 days 20 hours ago)
by avg
Affects: 
(2 files)
/stable/11/contrib/tcp_wrappers/scaffold.c
MFC r320151: remove bogus declaration of malloc from tcp_wrappers

The declaration was already inactive when INET6 was enabled
and it causes a build error in the other case because of
a conflict with the correct definition in stdlib.h.
08:29:53 - r323742
(4 days 20 hours ago)
by avg
Affects: 
(2 files)
/stable/10/sys/dev/jedec_ts/jedec_ts.c
MFC r320266: jedec_ts: add support for devices manufactured by IDT

Full manufacturer name is Integrated Device Technology, Inc.
Supported devices include TSE2002B3C and TS3000B3A.
08:29:08 - r323741
(4 days 20 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/dev/jedec_ts/jedec_ts.c
MFC r320266: jedec_ts: add support for devices manufactured by IDT

Full manufacturer name is Integrated Device Technology, Inc.
Supported devices include TSE2002B3C and TS3000B3A.
08:19:47 - r323740
(4 days 20 hours ago)
by avg
Affects: 
(2 files)
/stable/11/usr.sbin/bhyveload/bhyveload.c
MFV r320195: bhyveload: correctly query size of disks

On FreeBSD fstat(2) works fine for querying sizes of plain files,
but not so much for character devices.
So, use DIOCGMEDIASIZE to try to get the correct size for disks
and disk-like devices (e.g. zvols).

PR: 220186
08:19:20 - r323739
(4 days 20 hours ago)
by avg
Affects: 
(2 files)
/stable/10/usr.sbin/bhyveload/bhyveload.c
MFV r320195: bhyveload: correctly query size of disks

On FreeBSD fstat(2) works fine for querying sizes of plain files,
but not so much for character devices.
So, use DIOCGMEDIASIZE to try to get the correct size for disks
and disk-like devices (e.g. zvols).

PR: 220186
07:56:24 - r323738
(4 days 20 hours ago)
by n_hibma
Affects: 
(2 files)
/stable/11/tools/tools/nanobsd/embedded/common
MFC 323197:

  Bug fix: Don't treat NANO_IMAGES as a directory.

  This was accidentally broken in r295377 .

  Submitted by: Igor Serikov
07:39:39 - r323737
(4 days 21 hours ago)
by avg
Affects: 
(2 files)
/stable/10/sys/cam/ata/ata_xpt.c
MFV r318962: Allow PROBE_SPINUP to fail in CAM ATA transport

The motivation for this is two-fold.

1. Some old WD SATA disks may appear as if they need to be spun up
when they are already spinning. Those disks would respond with
an error to the spin-up request.

2. Even if we really fail to spin up the disk, we still can try to
proceed to the subsequent phases. If we fail later on, then no
difference. Otherwise we get a chance to communicate with the
disk which is better than completely ignoring it, because a user
can try to recover the disk.
07:39:32 - r323736
(4 days 21 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cam/ata/ata_xpt.c
MFV r318962: Allow PROBE_SPINUP to fail in CAM ATA transport

The motivation for this is two-fold.

1. Some old WD SATA disks may appear as if they need to be spun up
when they are already spinning. Those disks would respond with
an error to the spin-up request.

2. Even if we really fail to spin up the disk, we still can try to
proceed to the subsequent phases. If we fail later on, then no
difference. Otherwise we get a chance to communicate with the
disk which is better than completely ignoring it, because a user
can try to recover the disk.
07:31:53 - r323735
(4 days 21 hours ago)
by avg
Affects: 
(4 files)
/stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d
/stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out
/stable/10/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile
MFC r319746,r319747,r319769: 8269 dtrace stddev aggregation is normalized
incorrectly

illumos/illumos-gate@79809f9cf402f130667349b2d4007ecd65d63c6f
https://github.com/illumos/illumos-gate/commit/79809f9cf402f130667349b2d4007ecd65d63c6f

https://www.illumos.org/issues/8269
  It seems that currently normalization of stddev aggregation is done
  incorrectly.
  We divide both the sum of values and the sum of their squares by the
  normalization factor. But we should divide the sum of squares by the
  normalization factor squared to scale the original values properly.

FreeBSD note: the actual change was committed in r316853, this commit
adds the test files and record merge information.

Reviewed by: Bryan Cantrill <bryan@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andriy Gapon <avg@FreeBSD.org>

Sponsored by: Panzura
07:31:21 - r323734
(4 days 21 hours ago)
by avg
Affects: 
(4 files)
/stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d
/stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out
/stable/11/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile
MFC r319746,r319747,r319769: 8269 dtrace stddev aggregation is normalized
incorrectly

illumos/illumos-gate@79809f9cf402f130667349b2d4007ecd65d63c6f
https://github.com/illumos/illumos-gate/commit/79809f9cf402f130667349b2d4007ecd65d63c6f

https://www.illumos.org/issues/8269
  It seems that currently normalization of stddev aggregation is done
  incorrectly.
  We divide both the sum of values and the sum of their squares by the
  normalization factor. But we should divide the sum of squares by the
  normalization factor squared to scale the original values properly.

FreeBSD note: the actual change was committed in r316853, this commit
adds the test files and record merge information.

Reviewed by: Bryan Cantrill <bryan@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andriy Gapon <avg@FreeBSD.org>

Sponsored by: Panzura
07:19:27 - r323733
(4 days 21 hours ago)
by avg
Affects: 
(2 files)
/stable/10/sys/x86/x86/identcpu.c
MFC r319212: fix indentation
07:18:22 - r323732
(4 days 21 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/x86/x86/identcpu.c
MFC r319212: fix indentation
07:02:02 - r323731
(4 days 21 hours ago)
by pho
Affects:  /user/pho/stress2/misc/fs.sh
Limit runtime for each FS type test. Return fsck(8) status.

Sponsored by: Dell EMC Isilon
06:54:01 - r323730
(4 days 21 hours ago)
by pho
Affects:  /user/pho/stress2/misc/gnop.sh
Improve error handling and return fsck(8) errors.

Sponsored by: Dell EMC Isilon
06:46:00 - r323729
(4 days 22 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hnvar.h
hyperv/hn: Incease max supported MTU

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D12365
06:38:57 - r323728
(4 days 22 hours ago)
by sephe
Affects: 
(4 files)
/head/sys/dev/hyperv/netvsc/*
hyperv/hn: Fix MTU setting

- Add size of an ethernet header to the value configured to NVS. This
  does not seem to have any effects if MTU is 1500, but fix hypervisor
  side's setting if MTU > 1500.
- Override the MTU setting according to the view from the hypervisor
  side.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D12352
06:29:38 - r323727
(4 days 22 hours ago)
by sephe
Affects: 
(4 files)
/head/sys/dev/hyperv/netvsc/*
hyperv/hn: Apply VF's RSS setting

Since in Azure SYN and SYN|ACK go through the synthetic parts while the
rest of the same TCP flow goes through the VF, apply VF's RSS settings
to synthetic parts to have a consistent hash value/type for the same TCP
flow.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D12333
05:48:53 - r323726
(4 days 22 hours ago)
by pho
Affects:  /user/pho/stress2/misc/truncate6.sh
Handle a leading space in the inode number.

Sponsored by: Dell EMC Isilon
05:47:24 - r323725
(4 days 22 hours ago)
by pho
Affects:  /user/pho/stress2/misc/truss.sh
Core dumps from truss(1) seen. Check for this.

Sponsored by: Dell EMC Isilon
2017 - 09 - 18   (6 days ago)
23:50:34 - r323724
(5 days 4 hours ago)
by jhb
Affects:  /head/sys/dev/cxgbe/firmware/t6fw_cfg.txt
/head/sys/dev/cxgbe/t4_main.c
Enable support for lookaside crypto operations by default.

This permits ccr(4) to be used with the default firmware configuration
file.

Discussed with: np
Sponsored by: Chelsio Communications
23:30:39 - r323723
(5 days 5 hours ago)
by jhb
Affects:  /head/sys/ufs/ffs/ffs_softdep.c
/head/sys/ufs/ufs/dinode.h
/head/sys/ufs/ufs/ufs_vnops.c
Add UFS_LINK_MAX for the UFS-specific limit on link counts.

ino64 expanded nlink_t to 64 bits, but the on-disk format for UFS is still
limited to 16 bits. This is a nop currently but will matter if LINK_MAX is
increased in the future.

Reviewed by: kib
Sponsored by: Chelsio Communications
20:22:42 - r323722
(5 days 8 hours ago)
by kib
Affects: 
(9 files)
/head/sys/i386/*
/head/sys/kern/imgact_aout.c
Fix handling of the segment registers on i386.

Suppose that userspace is executing with the non-standard segment
descriptors. Then, until exception or interrupt handler executed
SET_KERNEL_SEGS, kernel is still executing with user %ds, %es and %fs.
If an interrupt occurs in this window, the interrupt handler is
executed unsafely, relying on usability of the usermode registers. If
the interrupt results in the context switch on return, the
contamination of the kernel state spreads to the thread we switched
to. As result, kernel data accesses might fault or, if only the base
is changed, completely messed up.

More, if the user segment was allocated in LDT, another thread might
mark the descriptor as invalid before doreti code tried to reload
them. In this case kernel panics.

The issue exists for all exception entry points which use trap gate,
and thus do not automatically disable interrupts on entry, and for
lcall_handler.

Fix is two-fold: first, we need to disable interrupts for all kernel
entries, changing the IDT descriptor types from trap gate to interrupt
gate. Interrupts are re-enabled not earlier than the kernel segments
are loaded into the segment registers. Second, we only load the
segment registers from the trap frame when returning to usermode. For
the later, all interrupt return paths must happen through the doreti
common code.

There is no way to disable interrupts on call gate, which is the
supposed mode of servicing for lcall $7,$0 syscalls. Change the LDT
descriptor 0 into a code segment type and point it to the userspace
trampoline which redirects the syscall to int $0x80.

All the measures make the segment register handling similar to that of
amd64. We do not apply amd64 optimizations of not reloading segment
registers on return from the syscall.

Reported by: Maxime Villard <max@m00nbsd.net>
Tested by: pho (the non-lcall part)
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D12402
20:17:08 - r323721
(5 days 8 hours ago)
by kibab
Affects:  /head/sys/cam/mmc/mmc_xpt.c
Add kern.features flag for MMCCAM

kern.features.mmcam will be present and equal to 1 if the kernel has been
compiled with option MMCCAM.
This will help sdio-related userland tools to fail-fast if running on the kernel
without MMCCAM enabled.

Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D12386
20:09:17 - r323720
(5 days 8 hours ago)
by rlibby
Affects: 
(2 files)
/stable/11/sys/conf/kern.mk
MFC r323574:

  gcc builds: reenable -Wstrict-overflow for kern.mk
20:07:48 - r323719
(5 days 8 hours ago)
by rlibby
Affects:  /stable/11
MFC r304877,r323573:

  r304877 (by bapt):
  Remove warning on struct-overflow on gcc 5.3.0 as zic(8) dies on it
  r323573:
  gcc builds: reenable -Wstrict-overflow for bsd.sys.mk

  This effectively reverts r304877, after having relegated the warning
  suppression to the zic(8) makefile in r323572.

Effectively this is a record-only merge of r304877 and r323573.
20:01:16 - r323718
(5 days 8 hours ago)
by rlibby
Affects: 
(2 files)
/stable/11/usr.sbin/zic/zic/Makefile
MFC r323572:

  zic: -Wno-error=strict-overflow
20:01:01 - r323717
(5 days 8 hours ago)
by kibab
Affects: 
(9 files)
/head/usr.bin/sdiotool/*
Make basic Broadcom I/O space reading functions work

It's now possible to use Broadcom functions to read the I/O registers of
SDIO card. The functions were copied from the BSD-licensed Broadcom Linux driver
as-is. To make it possible, a small Linux compatibility layer was introduced.

Currently the card responds with the correct version number ("magic")
when reading the corresponding address.

Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D12111
19:56:05 - r323716
(5 days 8 hours ago)
by gjb
Affects:  /releng/10.4/release/doc/en_US.ISO8859-1/Makefile
Reconnect errata.html back to the build, accidentally removed as
part of r323618. This directory needs to be included, as it is
used by the 'reldoc' target of release/Makefile.

Approved by: re (implicit, relnotes-related)
Sponsored by: The FreeBSD Foundation
19:16:41 - r323715
(5 days 9 hours ago)
by cy
Affects:  /head/sys/contrib/ipfilter/netinet/ip_state.c
Don't use an apostrophe in a possesive pronoun.

MFC after: 3 days
19:09:40 - r323714
(5 days 9 hours ago)
by rlibby
Affects:  /head/sys/compat/linsysfs/linsysfs.c
linsysfs: quiet gcc -Wformat after r323692

Reviewed by: cem
Sponsored by: Dell EMC Isilon
18:44:45 - r323713
(5 days 10 hours ago)
by nwhitehorn
Affects:  /projects/powernv/powerpc/ofw/ofw_machdep.c
Work around yet another kexec-lite bug: no reserved entry is added for the
memory of the FDT itself. This is at worst redundant, and at best works
around buggy bootloaders.
18:42:28 - r323712
(5 days 10 hours ago)
by scottl
Affects:  /head/sys/dev/ppc/ppc.c
Hide a normal probe warning message under bootverbose, similar to atkbdc

Sponsored by: Netflix
17:26:47 - r323711
(5 days 11 hours ago)
by gjb
Affects:  /releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r313433, bsdinstall(8) 4096k alignment on new partitions.
Document r318430, ifconfig(8) reports persistent NIC MAC addresses.

Submitted by: rpokala
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
17:14:13 - r323710
(5 days 11 hours ago)
by cem
Affects:  /head/sys/compat/linsysfs/linsysfs.c
linsysfs(5): Fix two unrelated issues

1. Swap the order of device_get_ivars with device_get_devclass and devclass
  name validation. This bug was introduced in r323692.

2. Error check device_get_children and free the returned list. This bug was
  introduced in the original linsysfs commit.

Reported by: Oleg V. Nauman <oleg AT theweb.org.ua>, hselasky (1); hselasky (2)
Reviewed by: hselasky
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12407
16:42:13 - r323709
(5 days 12 hours ago)
by gordon
Affects:  /head/usr.sbin/tcpdump/tcpdump/Makefile
/head/usr.sbin/tcpdump/tcpdump/tcpdump.1
Revert tcpdump to using the source manpage instead of having a copy here.

This helps future maintainability of tcpdump so we don't forget to update
the manpage (like we have previously).

Stolen from: usr.bin/file/Makefile
Reviewed by: jilles
Approved by: delphij (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D12403
15:17:07 - r323708
(5 days 13 hours ago)
by gjb
Affects: 
(4 files)
/stable/10/release/doc/en_US.ISO8859-1/errata/article.xml
/stable/10/release/doc/share/xml/*
- Prune stale entries from 10.3-RELEASE.
- Prune entries from errata.xml and security.xml.
- Update versions to reflect 10.4-RELEASE.

Sponsored by: The FreeBSD Foundation
15:17:01 - r323707
(5 days 13 hours ago)
by tsoome
Affects:  /head/sys/boot/i386/libi386/biosmem.c
loader: biosmem allocate heap just below 4GB

The current biosmem code is walking bios smap entries and looking for smap
entry just below 4GB line, if there is such entry, its base and size is set
for heap base and size. Instead of entry base, we should use last HEAP_MIN
(currently 64MB) bytes just below 4GB, to make maximum space for kernel and
modules.

The problem was revealed on ASUS B350M-A system board, an AMD Ryzen 3 1200 CPU

memory map:

SMAP type=01 base=0000000000000000 len=000000000009d400 attr=01
SMAP type=02 base=000000000009d400 len=0000000000002c00 attr=01
SMAP type=02 base=00000000000e0000 len=0000000000020000 attr=01
SMAP type=01 base=0000000000100000 len=0000000009c00000 attr=01
SMAP type=02 base=0000000009d00000 len=0000000000300000 attr=01
SMAP type=01 base=000000000a000000 len=00000000be69b000 attr=01
SMAP type=03 base=00000000c869b000 len=0000000000016000 attr=01
SMAP type=01 base=00000000c86b1000 len=00000000124e7000 attr=01
SMAP type=02 base=00000000dab98000 len=0000000000138000 attr=01
SMAP type=03 base=00000000dacd0000 len=0000000000008000 attr=01
SMAP type=01 base=00000000dacd8000 len=0000000000100000 attr=01
SMAP type=04 base=00000000dadd8000 len=00000000003b3000 attr=01
SMAP type=02 base=00000000db18b000 len=0000000000d42000 attr=01
SMAP type=01 base=00000000dbecd000 len=0000000002133000 attr=01
SMAP type=01 base=0000000100000000 len=000000011f380000 attr=01
SMAP type=02 base=00000000de000000 len=0000000002000000 attr=01
SMAP type=02 base=00000000f8000000 len=0000000004000000 attr=01
SMAP type=02 base=00000000fdf00000 len=0000000000100000 attr=01
SMAP type=02 base=00000000fea00000 len=0000000000010000 attr=01
SMAP type=02 base=00000000feb80000 len=0000000000082000 attr=01
SMAP type=02 base=00000000fec10000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fec30000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fed00000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fed40000 len=0000000000005000 attr=01
SMAP type=02 base=00000000fed80000 len=0000000000010000 attr=01
SMAP type=02 base=00000000fedc2000 len=000000000000e000 attr=01
SMAP type=02 base=00000000fedd4000 len=0000000000002000 attr=01
SMAP type=02 base=00000000fee00000 len=0000000000100000 attr=01
SMAP type=02 base=00000000ff000000 len=0000000001000000 attr=01

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D12368
13:39:51 - r323706
(5 days 15 hours ago)
by hselasky
Affects:  /head/sys/sys/param.h
Bump the __FreeBSD_version after recent LinuxKPI changes.

MFC after: 1 week
Sponsored by: Mellanox Technologies
13:37:14 - r323705
(5 days 15 hours ago)
by hselasky
Affects: 
(5 files)
/head/sys/compat/linuxkpi/common/include/asm/*
/head/sys/compat/linuxkpi/common/include/linux/bitops.h
/head/sys/compat/linuxkpi/common/src/linux_tasklet.c
The LinuxKPI atomics do not have acquire nor release semantics unless
specified. Fix code to use READ_ONCE() and WRITE_ONCE() where appropriate.

Suggested by: kib @
MFC after: 1 week
Sponsored by: Mellanox Technologies
13:23:59 - r323704
(5 days 15 hours ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/mm.h
/head/sys/compat/linuxkpi/common/src/linux_page.c
Only wire pages in the LinuxKPI instead of holding and wiring them.
This prevents the page daemon from regularly scanning the held pages.

Suggested by: kib @
MFC after: 1 week
Sponsored by: Mellanox Technologies
13:17:23 - r323703
(5 days 15 hours ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/fs.h
/head/sys/compat/linuxkpi/common/src/linux_page.c
Add support for shared memory functions to the LinuxKPI.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
08:46:07 - r323702
(5 days 20 hours ago)
by pho
Affects:  /user/pho/stress2/misc/marcus5.sh
Timeout on umount. Return fsck status.

Sponsored by: Dell EMC Isilon
08:44:50 - r323701
(5 days 20 hours ago)
by pho
Affects:  /user/pho/stress2/misc/marcus2.sh
Added timeout and return fsck status.

Sponsored by: Dell EMC Isilon
08:42:04 - r323700
(5 days 20 hours ago)
by pho
Affects:  /user/pho/stress2/default.cfg
Move start mdconfig unit number to avoid possible collisions.
Trust fsck to report if file system was modified.

Sponsored by: Dell EMC Isilon
08:38:38 - r323699
(5 days 20 hours ago)
by pho
Affects:  /user/pho/stress2/misc/marcus.sh
Added timeout to test. Return fsck status.

Sponsored by: Dell EMC Isilon
05:59:47 - r323698
(5 days 22 hours ago)
by nwhitehorn
Affects:  /projects/powernv/conf/Makefile.powerpc
/projects/powernv/conf/ldscript.powerpc64
Work around odd behavior in kexec-lite: it requires that there be no INTERP
section (just an assertion, no good reason for this) and ignores the
defined entry point for the executable, beginning execution at the beginning
of the first PT_LOAD section.

Solve these by (if possible) dropping INTERP and arranging things such that
the first instruction of the first PT_LOAD section is, in fact, the entry
point. This allows stock kexec-lite, and thus petitboot, to directly load
and start the FreeBSD kernel from Linux.

Still panics a little ways in with an SMP error, but that is a problem for
another day.
04:12:46 - r323697
(6 days ago)
by gordon
Affects:  /vendor/tcpdump/4.9.2
Tag tcpdump-4.9.2.

Approved by: emaste (mentor)
04:10:54 - r323696
(6 days ago)
by gordon
Affects: 
(401 files)
/vendor/tcpdump/dist/*
Vendor import of tcpdump 4.9.2.

Approved by: emaste (mentor)
04:09:59 - r323695
(6 days ago)
by gordon
Affects:  /svnadmin/conf/sizelimit.conf
Add myself to import new tcpdump image.

Approved by: emaste (mentor)
00:17:53 - r323694
(6 days 4 hours ago)
by cy
Affects: 
(4 files)
/stable/10/sys/contrib/ipfilter/netinet/ip_state.c
/stable/11/sys/contrib/ipfilter/netinet/ip_state.c
MFC r323478:

Improve the wording of a comment describing why EAGAIN is the error code.
00:13:48 - r323693
(6 days 4 hours ago)
by cy
Affects: 
(4 files)
/stable/10/kerberos5/lib/libkafs5/Makefile
/stable/11/kerberos5/lib/libkafs5/Makefile
MFC r322112:

krb5_err.h is generated from a .et file in kerberos5/lib/libkrb5.
As kerberos5/lib/krb5 include files are already referenced it makes
no sense to generate it again here.

 


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 17 ms, 270 revisions printed. Current time is 2017-09-24 04:46:10. All times are in UTC/GMT.