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.

2016 - 12 - 03   (today)
05:29:35 - r309478
(6 hours 1 minute ago)
by bdrewery
Affects:  /head/share/mk/bsd.confs.mk
/head/share/mk/bsd.files.mk
/head/share/mk/bsd.incs.mk
DIRDEPS_BUILD: Fix '/' in group names creating a bad cookie.

This is reworking the change in r296585 but to still properly install
the files. This limits the change to only the DIRDEPS_BUILD logic
for what it considers the name of the staging set, which is what the
cookie name is based off of.

Sponsored by: Dell EMC Isilon
MFC after: 1 week
05:29:31 - r309477
(6 hours 1 minute ago)
by bdrewery
Affects:  /head/share/mk/bsd.confs.mk
/head/share/mk/bsd.files.mk
/head/share/mk/bsd.incs.mk
Revert r296585.

This broke installing dtrace test files. It was poorly tested.

Reported by: markj
Pointyhat to: bdrewery
MFC after: 1 week
05:29:12 - r309476
(6 hours 1 minute ago)
by bdrewery
Affects:  /head/include/Makefile
Create the /usr/lib/include symlink as relative.

This ugly code is done to avoid assuming LIBDIR is 2 components
deep.

Reported by: jhb
03:59:24 - r309475
(7 hours 31 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/contrib/netbsd-tests/lib/libc/gen/t_vis.c
MFC r309474:

Don't build :strvis_locale if VIS_NOLOCALE is undefined

The copy of contrib/libc-vis on ^/stable/10 doesn't contain all of the features
in the ^/stable/11 // ^/head version, including VIS_NOLOCALE. The risk is lower
in conditionally running the test instead of backporting the newer version of
libc-vis
03:56:20 - r309474
(7 hours 34 minutes ago)
by ngie
Affects:  /head/contrib/netbsd-tests/lib/libc/gen/t_vis.c
Don't build :strvis_locale if VIS_NOLOCALE is undefined

The copy of contrib/libc-vis on ^/stable/10 doesn't contain all of the features
in the ^/stable/11 // ^/head version, including VIS_NOLOCALE. The risk is lower
in conditionally running the test instead of backporting the newer version of
libc-vis

MFC after: now
03:15:09 - r309473
(8 hours 15 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/contrib/netbsd-tests/games/t_factor.sh
MFC r309472:

Restore pathing for factor(1), which unnecessarily diverged in r278616

factor lives in /usr/games/, not /usr/bin, in NetBSD.

The correct way to handle this is do on-the-fly manipulation of the test
script via ATF_TESTS_SH_SED_<foo>, not by modify the pathing directly in
the test script.

This is being done to resolve an unnecessary conflict made when pulling
back ^/head@r309469 (contrib/netbsd-tests update) to ^/stable/10.

No functional change
03:13:32 - r309472
(8 hours 17 minutes ago)
by ngie
Affects:  /head/contrib/netbsd-tests/games/t_factor.sh
Restore pathing for factor(1), which unnecessarily diverged in r278616

factor lives in /usr/games/, not /usr/bin, in NetBSD.

The correct way to handle this is do on-the-fly manipulation of the test
script via ATF_TESTS_SH_SED_<foo>, not by modify the pathing directly in
the test script.

This is being done to resolve an unnecessary conflict made when pulling
back ^/head@r309469 (contrib/netbsd-tests update) to ^/stable/10.

No functional change

MFC after: now
03:05:44 - r309471
(8 hours 25 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/lib/libc/tests/db/Makefile
MFC r305449:

Install h_db to unbreak some of the lib/libc/db testcases after
r305358
03:04:20 - r309470
(8 hours 26 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
MFC r305451:

Fix lib/libc/rpc test assumptions added in r305358

- Require root in the tcp/udp subtests (it's needed on FreeBSD when
  registering services).
- Skip the tests if service registration fails.
02:55:19 - r309469
(8 hours 35 minutes ago)
by ngie
Affects: 
(25 files)
/stable/11/*
MFC r304797,r305467,r305468,r305483:

r304797 (by jmmv):

Make use of Kyua's work directories.

Change the vnode tests to use the current directory when creating temporary
files, which we can assume is a volatile work directory, and then make the
kqueue_test.sh driver _not_ abandon the directory created by Kyua.

This makes the various kqueue tests independent of each other, and ensures
the temporary file is cleaned up on failure.

Problem spotted by asomers@ when reviewing D4254.

r305467:

Move tests/sys/kqueue/... to tests/sys/kqueue/libkqueue/...

This is being done to clearly distinguish the libkqueue tests
from the (soon to be imported) NetBSD tests.

r305468:

Port contrib/netbsd-tests/kernel/kqueue/... as tests/sys/kqueue/...

proc2_test must be skipped because the invariant tested
(`ke.fflags & NOTE_TRACKERR`) doesn't pass.

r305483:

Fix tests/sys/kqueue NetBSD tests on 32-bit platforms by using proper
format specifier for pointers when printing them out with printf(3)

Pointyhat to: ngie
02:48:55 - r309468
(8 hours 42 minutes ago)
by ngie
Affects: 
(3 files)
/stable/11/lib/libc/tests/stdio/open_memstream2_test.c
/stable/11/lib/libc/tests/stdio/open_wmemstream_test.c
MFC r305921:

Similar to r305920, remove spurious newlines from ATF_REQUIRE_MSG calls
02:47:41 - r309467
(8 hours 43 minutes ago)
by adrian
Affects:  /head/sys/dev/ath/if_ath_tx_ht.c
[ath] use the correct AMPDU frame limit for the given node, rather than the
global config.

This is important in hostap, ibss, (11s at some magical future date, etc)
where different nodes may have smaller limits.

Oops!

MFC after: 1 week
Relnotes: Yes
02:47:16 - r309466
(8 hours 43 minutes ago)
by ngie
Affects: 
(202 files)
/stable/11/bin/cat/tests/Makefile
/stable/11/contrib/netbsd-tests/*
/stable/11/lib/*
MFC r305358:

Update contrib/netbsd-tests with new content from NetBSD

This updates the snapshot from 09/30/2014 to 08/11/2016

This brings in a number of new testcases from upstream, most
notably:

- bin/cat
- lib/libc
- lib/msun
- lib/libthr
- usr.bin/sort

lib/libc/tests/stdio/open_memstream_test.c was moved to
lib/libc/tests/stdio/open_memstream2_test.c to accomodate
the new open_memstream test from NetBSD.

Tested on: amd64 (VMware fusion VM; various bare metal platforms); i386 (VMware
fusion VM); make tinderbox
02:45:18 - r309465
(8 hours 45 minutes ago)
by adrian
Affects:  /head/sys/net80211/ieee80211.c
/head/sys/net80211/ieee80211_var.h
[net80211] prepare for 11ac aware NICs that want to know per-vdev channel and
centre frequencies.

* ic_freq is the centre of the primary channel, not the centre of the
  HT40/HT80/etc channel. Add a method to access that.
* Add a method to access the centre of the primary channel, including
  knowing the centre of the 5/10/20/40/80, versus the primary channel.
  Ie, it's the centre of the 40, 80, 160MHz channel.
* Add a method to access the centre frequency of the secondary 80MHz
  channel - we don't support VHT yet, but when we do.
* Add methods to access the current channel and the per-dev desired
  channel. Ideally drivers that do full offload with a per-vap channel
  configuration should use the vap channel, NOT ic_curchan.
  Non-offload drivers that require net80211 to change the channel should
  be accessing ic_curchan.
02:24:15 - r309464
(9 hours 6 minutes ago)
by ngie
Affects:  /head/tests/sys/acl/01.sh
Expect 01:main to fail

Changes were made to ZFS in the past year with respect to how ACLs
are handled, causing failures in this test. Mark it TODO so (hopefully)
someone more knowledgeable (like mav or trasz) will fix the code or the
test.

PR: 212323
02:17:50 - r309463
(9 hours 13 minutes ago)
by ngie
Affects:  /head/tests/sys/kern/coredump_phnum_test.sh
Expect :coredump_phnum to fail

The number of program headers on my system (GENERIC-NODEBUG) don't match the
expected (hardcoded) number in the test

PR: 215019
02:09:23 - r309462
(9 hours 21 minutes ago)
by ngie
Affects:  /head/tests/sys/kern/coredump_phnum_test.sh
Fix test coredump_phnum_test:coredump_phnum require.config specification

The requirement is set via `atf_set "require.config"
"allow_sysctl_side_effects"',
not `atf_set "require.config" "allow_sysctl_side_effects"'

X-MFC with: r308177
Pointyhat to: cmeyer
01:55:38 - r309461
(9 hours 35 minutes ago)
by loos
Affects:  /head/sys/dev/etherswitch/etherswitch.c
Allow simultaneous access to switch device, there is no reason to prevent
it.

Remove bogus wrappers and use the kernel defaults.

While here, use DEVMETHOD_END.

Obtained from: pfSense
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (Netgate)
01:14:21 - r309460
(10 hours 16 minutes ago)
by vangyzen
Affects:  /head/lib/libc/sys/thr_set_name.2
/head/share/man/man3/pthread_set_name_np.3
/head/sys/kern/kern_thr.c
thr_set_name(): silently truncate the given name as needed

Instead of failing with ENAMETOOLONG, which is swallowed by
pthread_set_name_np() anyway, truncate the given name to MAXCOMLEN+1
bytes. This is more likely what the user wants, and saves the
caller from truncating it before the call (which was the only
recourse).

Polish pthread_set_name_np(3) and add a .Xr to thr_set_name(2)
so the user might find the documentation for this behavior.

Reviewed by: jilles
MFC after: 3 days
Sponsored by: Dell EMC
01:10:45 - r309459
(10 hours 20 minutes ago)
by jhb
Affects: 
(4 files)
/stable/10/sys/dev/cxgbe/t4_main.c
/stable/11/sys/dev/cxgbe/t4_main.c
MFC 303348:
cxgbe(4): Initialize the adapter queues (fwq and mgmtq) instead of
returning EAGAIN if they aren't available when the user tries to program
a filter. Do this after validating the filter so that the driver
doesn't bring up the queues if it doesn't have to.
01:04:59 - r309458
(10 hours 26 minutes ago)
by jhb
Affects: 
(14 files)
/stable/10/sys/dev/cxgbe/*
/stable/11/sys/dev/cxgbe/*
MFC 302440,304873,305704,305985,306787,307531: Fixes for sysctls.

302440:
cxgbe(4): Add sysctl to display the RSS indirection table size for an
interface.

dev.cxl.<n>.rss_size
dev.vcxl.<n>.rss_size

304873:
cxgbe(4): Provide more details about the card in the sysctl MIB.

dev.t5nex.0.%desc: Chelsio T580-CR
dev.t5nex.0.hw_revision: 1
dev.t5nex.0.sn: PT13140042
dev.t5nex.0.pn: 110117150A0
dev.t5nex.0.ec: 0000000000000000
dev.t5nex.0.na: 0007432AF490
dev.t5nex.0.vpd_version: 3
dev.t5nex.0.scfg_version: 53255
dev.t5nex.0.bs_version: 1.1.0.0
dev.t5nex.0.er_version: 1.0.0.68
dev.t5nex.0.tp_version: 0.1.4.9
dev.t5nex.0.firmware_version: 1.16.2.0

305704:
cxgbe(4): Rename the debug_flags driver tunable/sysctl to dflags.
Tunables that end with _flags are special.

305985:
cxgbe(4): Fixes to wrq stats.

- Increment tx_wrs_copied in the correct place.
- Add tx_wrs_sspace to the sysctl MIB.

306787:
cxgbe(4): Fix whitespace in the pm_stats display.

307531:
cxgbe(4): Adjust whitespace to line up the column titles in cim_qcfg
with the values displayed.

Sponsored by: Chelsio Communications
00:46:18 - r309457
(10 hours 44 minutes ago)
by pfg
Affects: 
(3 files)
/stable/9/sys/fs/ext2fs/ext2_vfsops.c
MFC r309179:
ext2fs: avoid possible overflow when calculating malloc size.

This is inspired on r308064 for the case of mounting UFS.
00:45:13 - r309456
(10 hours 45 minutes ago)
by pfg
Affects: 
(2 files)
/stable/10/sys/fs/ext2fs/ext2_vfsops.c
MFC r309179:
ext2fs: avoid possible overflow when calculating malloc size.

This is inspired on r308064 for the case of mounting UFS.
00:43:11 - r309455
(10 hours 47 minutes ago)
by pfg
Affects: 
(2 files)
/stable/11/sys/fs/ext2fs/ext2_vfsops.c
MFC r309179:
ext2fs: avoid possible overflow when calculating malloc size.

This is inspired on r308064 for the case of mounting UFS.
00:40:08 - r309454
(10 hours 50 minutes ago)
by ngie
Affects: 
(2 files)
/stable/10/lib/libc/tests/Makefile
MFstable/11 r309453:

MFC r307700:

Only build lib/libc/tests/iconv if MK_ICONV != no
00:38:35 - r309453
(10 hours 52 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/lib/libc/tests/Makefile
MFC r307700:

Only build lib/libc/tests/iconv if MK_ICONV != no
00:37:00 - r309452
(10 hours 54 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/tools/build/mk/OptionalObsoleteFiles.inc
MFC r307713:

Remove /usr/libexec/bsdinstall/hardening if MK_BSDINSTALL == no
00:24:34 - r309451
(11 hours 6 minutes ago)
by pfg
Affects:  /head/usr.bin/indent/indent.1
Document undocumented indent(1) options badp/nbadp, bs/nbs, and lc.

Submitted by: Piotr Stefaniak
Differential Revision: https://reviews.freebsd.org/D8690
00:18:38 - r309450
(11 hours 12 minutes ago)
by jhb
Affects: 
(12 files)
/stable/10/*
/stable/11/*
MFC 304854: cxgbe/iw_cxgbe: Various fixes to the iWARP driver.

- Return appropriate error code instead of ENOMEM when sosend() fails in
  send_mpa_req.
- Fix for problematic race during destroy_qp.
- Abortive close in the failure of send_mpa_reject() instead of normal close.
- Remove the unnecessary doorbell flowcontrol logic.

Sponsored by: Chelsio Communications
2016 - 12 - 02   (yesterday)
23:05:14 - r309449
(12 hours 25 minutes ago)
by jhb
Affects: 
(3 files)
/stable/10/sys/dev/cxgbe/t4_sge.c
/stable/10/sys/dev/cxgbe/t4_vf.c
MFC 303859,305851: Fix a typo and some whitespace nits.
23:01:19 - r309448
(12 hours 29 minutes ago)
by jhb
Affects: 
(2 files)
/stable/10/sys/dev/cxgbe/t4_sge.c
MFC 303454: Mark spg_len and fl_pktshift static.

These variables are no longer exported to t4_netmap.c after r296478.
22:53:33 - r309447
(12 hours 37 minutes ago)
by jhb
Affects: 
(23 files)
/stable/10/share/man/man4/*
/stable/10/sys/*
MFC 303522,303647,303860,303880,304168-304170,304479,304482,304485,305548,
305549:
Chelsio T4/T5 VF driver.

303522:
Various fixes to the t4/5nex character device.

- Remove null open/close methods.
- Don't set d_flags to 0 explicitly.
- Remove t5_cdevsw as the .d_name member isn't really used and doesn't
  warrant a separate cdevsw just for the name.
- Use ENOTTY as the error value for an unknown ioctl request.
- Use make_dev_s() to close race with setting si_drv1.

303647:
Store the offset of the KDOORBELL and GTS registers in the softc.

VF devices use a different register layout than PF devices. Storing
the offset in a value in the softc allows code to be shared between the
PF and VF drivers.

303860:
Reserve an adapter flag IS_VF to mark VF devices vs PF devices.

303880:
Track the base absolute ID of ingress and egress queues.

Use this to map an absolute queue ID to a logical queue ID in interrupt
handlers. For the regular cxgbe/cxl drivers this should be a no-op as
the base absolute ID should be zero. VF devices have a non-zero base
absolute ID and require this change. While here, export the absolute ID
of egress queues via a sysctl.

304168:
Make SGE parameter handling more VF-friendly.

Add fields to hold the SGE control register and free list buffer sizes to
the sge_params structure. Populate these new fields in
t4_init_sge_params() for PF devices and change t4_read_chip_settings() to
pull these values out of the params structure instead of reading
registers directly. This will permit t4_read_chip_settings() to be reused
for VF devices which cannot read SGE registers directly.

While here, move the call to t4_init_sge_params() to
get_params__post_init(). The VF driver will populate the SGE parameters
structure via a different method before calling t4_read_chip_settings().

304169:
Update mailbox writes to work with VF devices.

- Use alternate register locations for the data and control registers for
  VFs.
- Do a dummy read to force the writes to the mailbox data registers to
  post before the write to the control register on VFs.
- Do not check the PCI-e firmware register for errors on VFs.

304170:
Add support for register dumps on VF devices.

- Add handling of VF register sets to t4_get_regs_len() and t4_get_regs().
- While here, use t4_get_regs_len() in the ioctl handler for regdump
  instead of inlining it.

304479:
Add structures for VF-specific adapter parameters.

While here, mark which parameters are PF-specific and which are
VF-specific.

304482:
Adjust t4_port_init() to work with VF devices.

Specifically, the FW_PORT_CMD may or may not work for a VF (the PF
driver can choose whether or not to permit access to this command),
so don't attempt to fetch port information on a VF if permission is
denied by the PF.

304485:
Reorder sysctls so that nodes shared with the VF driver are added first.

This permits a single early return for VF devices in the routines that
add sysctl nodes.

305548:
Don't break out of the m_advance() loop if len drops to zero.

If a packet contains the Ethernet header (14 bytes) in the first mbuf
and the payload (IP + UDP + data) in the second mbuf, then the attempt
to fetch the l3hdr will return a NULL pointer. The first loop iteration
will drop len to zero and exit the loop without setting 'p'. However,
the desired data is at the start of the second mbuf, so the correct
behavior is to loop around and let the conditional set 'p' to m_data of
the next mbuf (and leave offset as 0).

305549:
Chelsio T4/T5 VF driver.

The cxgbev/cxlv driver supports Virtual Function devices for Chelsio
T4 and T4 adapters. The VF devices share most of their code with the
existing PF4 driver (cxgbe/cxl) and as such the VF device driver
currently depends on the PF4 driver.

Similar to the cxgbe/cxl drivers, the VF driver includes a t4vf/t5vf
PCI device driver that attaches to the VF device. It then creates
child cxgbev/cxlv devices representing ports assigned to the VF.
By default, the PF driver assigns a single port to each VF.

t4vf_hw.c contains VF-specific routines from the shared code used to
fetch VF-specific parameters from the firmware.

t4_vf.c contains the VF-specific PCI device driver and includes its
own attach routine.

VF devices are required to use a different firmware request when
transmitting packets (which in turn requires a different CPL message
to encapsulate messages). This alternate firmware request does not
permit chaining multiple packets in a single message, so each packet
results in a firmware request. In addition, the different CPL message
requires more detailed information when enabling hardware checksums,
so parse_pkt() on VF devices must examine L2 and L3 headers for all
packets (not just TSO packets) for VF devices. Finally, L2 checksums
on non-UDP/non-TCP packets do not work reliably (the firmware trashes
the IPv4 fragment field), so IPv4 checksums for such packets are
calculated in software.

Most of the other changes in the non-VF-specific code are to expose
various variables and functions private to the PF driver so that they
can be used by the VF driver.

Note that a limited subset of cxgbetool functions are supported on VF
devices including register dumps, scheduler classes, and clearing of
statistics. In addition, TOE is not supported on VF devices, only for
the PF interfaces.

Sponsored by: Chelsio Communications
22:27:54 - r309446
(13 hours 3 minutes ago)
by jhb
Affects: 
(4 files)
/stable/10/sys/kern/sched_4bsd.c
/stable/11/sys/kern/sched_4bsd.c
MFC 308564: Don't place threads on the run queue after waking up other CPUs.

The other CPU might resume and see a still-empty runq and go back to
sleep before sched_add() adds the thread to the runq. This results
in a lost wakeup and a potential hang if the system is otherwise
completely idle.

The race originated due to a micro-optimization (my fault) in 4BSD in
that it avoided putting a thread on the run queue if the scheduler was
going to preempt to the new thread. To avoid complexity while fixing
this race, just drop this optimization. 4BSD now always sets the
"owepreempt" flag when a preemption is warranted and defers the actual
preemption to the thread_unlock of the caller the same as ULE.
22:25:11 - r309445
(13 hours 5 minutes ago)
by jhb
Affects:  /stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c
/stable/10/sys/dev/cxgbe/tom/t4_tom.c
Fix build without INVARIANTS.

This is a direct commit to stable/10.
21:36:21 - r309444
(13 hours 54 minutes ago)
by jhb
Affects: 
(2 files)
/stable/10/sys/dev/cxgbe/t4_sge.c
MFC 303204: Install a handler for firmware work request error messages.

If a driver sends an malformed or disallowed work request, the firmware
responds with a work request error. Previously the driver treated this is
as an unexpected message and panicked. Now it decodes the error message
to aid in debugging.
21:35:14 - r309443
(13 hours 55 minutes ago)
by jhb
Affects: 
(4 files)
/stable/10/sys/x86/cpufreq/hwpstate.c
/stable/11/sys/x86/cpufreq/hwpstate.c
MFC 308005: Add powerd(8) support for several families of AMD CPUs.

Use the same logic to calculate the nominal CPU frequency from the P-state
MSRs on family 0x12, 0x15, and 0x16 CPUs as is used for family 0x10.
Family 0x14 was included in the original patch in the PR but I left that
out as the BIOS writer's guide for family 0x14 CPUs show a different layout
for the relevant MSR and include a different formulate for calculating the
frequency.

While here, simplify a few expressions and print out the family of
unsupported CPUs in hex rather than decimal.

PR: 212020
21:29:52 - r309442
(14 hours 1 minute ago)
by jhb
Affects: 
(17 files)
/stable/10/sys/dev/cxgbe/*
MFC 302339:
cxgbe(4): Changes to the CPL-handler registration mechanism and code
related to "shared" CPLs.

a) Combine t4_set_tcb_field and t4_set_tcb_field_rpl into a single
function. Allow callers to direct the response to any iq. Tidy up
set_ulp_mode_iscsi while there to use names from t4_tcb.h instead of
magic constants.

b) Remove all CPL handler tables from struct adapter. This reduces its
size by around 2KB. All handlers are now registered at MOD_LOAD instead
of attach or some kind of initialization/activation. The registration
functions do not need an adapter parameter any more.

c) Add per-iq handlers to deal with CPLs whose destination cannot be
determined solely from the opcode. There are 2 such CPLs in use right
now: SET_TCB_RPL and L2T_WRITE_RPL. The base driver continues to send
filter and L2T_WRITEs over the mgmtq and solicits the reply on fwq.
t4_tom (including the DDP code) now uses the port's ctrlq to send
L2T_WRITEs and SET_TCB_FIELDs and solicits the reply on an ofld_rxq.
fwq and ofld_rxq have different handlers that know what kind of tid to
expect in the reply. Update t4_write_l2e and callers to to support any
wrq/iq combination.

Sponsored by: Chelsio Communications
20:17:41 - r309441
(15 hours 13 minutes ago)
by dim
Affects: 
(4 files)
/projects/clang391-import/contrib/compiler-rt/lib/builtins/gcc_personality_v0.c
/projects/clang391-import/contrib/compiler-rt/lib/builtins/unwind-ehabi-helpers.h
/projects/clang391-import/lib/libcompiler_rt/Makefile
Update compiler-rt to release_39 branch r288513. Since this contains a
rather unfortunate upstream workaround for an unwind header problem that
does not exist on FreeBSD, but which causes an unnecessary warning for
us, add some flags to the compiler-rt Makefile to suppress the warning.
20:16:52 - r309440
(15 hours 14 minutes ago)
by jhb
Affects: 
(8 files)
/stable/10/sys/dev/cxgbe/*
MFC 292736:
cxgbe(4): Updates to the base NIC driver and t4_tom to support the iSCSI
offload driver. These changes come from projects/cxl_iscsi.

Note that these changes make use of the mbufq API from 11.0, but that
API is not present in 10.x in the same form. Borrow an implementation
from the CAM CTL ha code that uses m_nextpkt to implement mbufq for use
in 10.
19:47:23 - r309439
(15 hours 43 minutes ago)
by pfg
Affects: 
(12 files)
/head/sys/fs/ext2fs/*
ext2fs: renumber the license clauses to avoid skipping #3.

This is to keep consistency with other files, and help license-checking
utilities determine the number of clauses that apply.

No functional change.
19:40:00 - r309438
(15 hours 51 minutes ago)
by dim
Affects:  /projects/clang391-import/lib/clang/headers/Makefile
/projects/clang391-import/lib/clang/include/clang/Basic/Version.inc
/projects/clang391-import/tools/build/mk/OptionalObsoleteFiles.inc
Update build glue for clang 3.9.1 r288513.
19:36:28 - r309437
(15 hours 54 minutes ago)
by dim
Affects: 
(21 files)
/projects/clang391-import/contrib/llvm/include/llvm/Support/Threading.h
/projects/clang391-import/contrib/llvm/lib/*
/projects/clang391-import/contrib/llvm/tools/*
Update llvm, clang, lld and lldb to release_39 branch r288513.
19:23:20 - r309436
(16 hours 7 minutes ago)
by dim
Affects:  /vendor/lldb/lldb-release_39-r288513
Tag lldb release_39 branch r288513.
19:23:16 - r309435
(16 hours 7 minutes ago)
by dim
Affects:  /vendor/lld/lld-release_39-r288513
Tag lld release_39 branch r288513.
19:23:12 - r309434
(16 hours 7 minutes ago)
by dim
Affects:  /vendor/lld/dist/COFF/CMakeLists.txt
Vendor import of lld release_39 branch r288513:
https://llvm.org/svn/llvm-project/lld/branches/release_39@288513
19:23:09 - r309433
(16 hours 7 minutes ago)
by dim
Affects:  /vendor/libc++/libc++-release_39-r288513
Tag libc++ release_39 branch r288513.
19:20:29 - r309432
(16 hours 10 minutes ago)
by dim
Affects:  /vendor/compiler-rt/compiler-rt-release_39-r288513
Tag compiler-rt release_39 branch r288513.
19:20:26 - r309431
(16 hours 10 minutes ago)
by dim
Affects:  /vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
Vendor import of compiler-rt release_39 branch r288513:
https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@288513
19:20:23 - r309430
(16 hours 10 minutes ago)
by dim
Affects:  /vendor/clang/clang-release_39-r288513
Tag clang release_39 branch r288513.
19:20:19 - r309429
(16 hours 10 minutes ago)
by dim
Affects: 
(13 files)
/vendor/clang/dist/include/clang/*
/vendor/clang/dist/lib/*
/vendor/clang/dist/test/*
Vendor import of clang release_39 branch r288513:
https://llvm.org/svn/llvm-project/cfe/branches/release_39@288513
19:20:14 - r309428
(16 hours 10 minutes ago)
by dim
Affects:  /vendor/llvm/llvm-release_39-r288513
Tag llvm release_39 branch r288513.
19:20:10 - r309427
(16 hours 10 minutes ago)
by dim
Affects: 
(17 files)
/vendor/llvm/dist/include/llvm/Support/Threading.h
/vendor/llvm/dist/lib/*
/vendor/llvm/dist/test/*
Vendor import of llvm release_39 branch r288513:
https://llvm.org/svn/llvm-project/llvm/branches/release_39@288513
19:02:12 - r309426
(16 hours 28 minutes ago)
by jhb
Affects: 
(9 files)
/stable/10/sys/*
/stable/11/sys/*
MFC 303753,308004: Add bounds checking on addresses used with /dev/mem.

303753:
Don't permit mappings of invalid physical addresses on amd64 via /dev/mem.

308004:
MFamd64: Add bounds checks on addresses used with /dev/mem.

Reject attempts to read from or memory map offsets in /dev/mem that are
beyond the maximum-supported physical address of the current CPU.
18:03:15 - r309425
(17 hours 27 minutes ago)
by mjg
Affects:  /head/sys/kern/vfs_lookup.c
vfs: provide fake locking primitives for the crossmp vnode

Since the vnode is only expected to be shared locked, we can save a
little overhead by only pretending we are locking in the first place.

Reviewed by: kib
Tested by: pho
17:08:27 - r309424
(18 hours 22 minutes ago)
by uqs
Affects:  /user/uqs/git_conv/base-head.git
You got to be kidding me ...
17:06:37 - r309423
(18 hours 24 minutes ago)
by uqs
Affects:  /user/uqs/git_conv/base-head.git
Ignore everything but the git config in this dir.

Ceterum censeo SVN esse delendam
16:51:09 - r309422
(18 hours 39 minutes ago)
by uqs
Affects:  /user/uqs/git_conv/src-head.git
Sigh, remove empty directories explicitly.

Ceterum censeo SVN esse delendam
16:49:25 - r309421
(18 hours 41 minutes ago)
by uqs
Affects: 
(9 files)
/user/uqs/git_conv/*
Update git configs to reflect reality

- gitorious and code.google.com are gone
- only push master and stable/* to bitbucket, we're close to the 2GB limit
  (essentially, the bitbucket mirror will stop working very soon)
- rename "src" to "base" to match the ill designed SVN repo names
- use fake github hostnames, as we no longer can use the same SSH key for
  multiple repos (wtf?)
16:43:16 - r309420
(18 hours 47 minutes ago)
by uqs
Affects:  /user/uqs/git_conv/dosync.sh
Add svn sync script copied from the cluster machines.

Turns out svnsync is non-atomic and we now have bad metadata in the git
conversion as export on Github.

Ceterum censeo SVN esse delendam
16:42:45 - r309419
(18 hours 48 minutes ago)
by pfg
Affects:  /head/usr.bin/indent/parse.c
indent(1): Avoid out-of-bound accesses of array ps.p_stack.

Submitted by: Piotr Stefaniak
16:41:08 - r309418
(18 hours 49 minutes ago)
by pfg
Affects:  /head/usr.bin/indent/io.c
indent(1): Avoid out-of-bound accesses of arrays.

ps.paren_indents:
When ps.paren_level was 0, this was accessing paren_indents[-1].

in_buffer:
This fragment checks if "*/" was read, but there's no guarantee that there
is more than one byte in the array (actually, this happens frequently for
the "{" in things like "int main(void) {").

Submitted by: Piotr Stefaniak
16:32:14 - r309417
(18 hours 58 minutes ago)
by pfg
Affects:  /head/usr.bin/indent/parse.c
indent(1): Remove an extra newline added in a previous commit.

It doesn't math the remaining of the case statement.
16:29:30 - r309416
(19 hours 1 minute ago)
by alc
Affects:  /head/sys/vm/vm_radix.c
Eliminate a stale comment; vm_radix_prealloc() was replaced in r254141.

MFC after: 3 days
16:28:18 - r309415
(19 hours 2 minutes ago)
by pfg
Affects:  /head/usr.bin/indent/parse.c
indent(1): Optimize parser stack usage.

When special else-if processing is enabled (-ei), we can assume "else if"
and "if" to be equivalent for indentation purposes.
This reduction saves a lot of stack space in case of a long "if-else-if
... else-if" sequence; with this change,
Postgres/src/bin/psql/tab-complete.c as of 9.6beta3
requires minimum of the stack length to be 31 instead of 444.

Submitted by: Piotr Sephaniak
15:38:34 - r309414
(19 hours 52 minutes ago)
by rstone
Affects:  /head/sys/sys/buf_ring.h
Revert r309372

The bug intended to be fixed by r309372 was already addressed by r296178,
so revert my change.

Reported by: seph
14:44:45 - r309413
(20 hours 46 minutes ago)
by imp
Affects:  /head/sbin/nvmecontrol/logpage.c
Flag the vendor specific pages as such. This allows different decoding
for the same page number as different vendors encode vendor specific
pages differently.
14:44:38 - r309412
(20 hours 46 minutes ago)
by imp
Affects: 
(11 files)
/head/Makefile.inc1
/head/sys/boot/*
dd is currently a bootstrap tool. It really doesn't have any business
being a bootstrap tool. However, for reproducible build output,
FreeBSD added dd status=none because it was otherwise difficult to
suppress the status information, but retain any errors that might
happen. There's no real reason that dd has to be a build tool, other
than we use status=none unconditional. Remove dd from a bootstrap tool
entirely by only using status=none when available. This may also help
efforts to build the system on non-FreeBSD hosts as well.

Differential Revision: https://reviews.freebsd.org/D8605
14:23:26 - r309411
(21 hours 7 minutes ago)
by emaste
Affects: 
(4 files)
/head/libexec/rtld-elf/*
Retire long-broken/unused static rtld support

rtld-elf has some vestigial support for building as a static executable.
r45501 introduced a partial implementation with a prescient note that it
"might never be enabled." r153515 introduced ELF symbol versioning
support, and removed part of the unused build infrastructure for static
rtld.

GNU ld populates rela relocation addends and GOT entries with the same
values, and rtld's run-time dynamic executable check relied on this.
Alternate toolchains may not populate the GOT entries, which caused
RTLD_IS_DYNAMIC to return false. Simplify rtld by just removing the
unused check.

If we want to restore static rtld support later on we ought to introduce
a build-time #ifdef flag.

PR: 214972
Reviewed by: kan
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8687
11:32:11 - r309410
(23 hours 58 minutes ago)
by n_hibma
Affects:  /head/share/man/man4/iic.4
Fix man page:

- It should say 'read' in the I2CREAD section.
- last in the struct indicates the last command in a sequence, not the
  reverse.

Reviewed by: imp
MFC after: 3 days
11:30:21 - r309409
(1 day ago)
by n_hibma
Affects:  /head/usr.sbin/i2c/i2c.c
More typos in strings.

Submitted by: bde
MFC after: 3 days
10:47:10 - r309408
(1 day ago)
by julian
Affects:  /head/share/man/man4/ng_patch.4
/head/sys/netgraph/ng_patch.c
/head/sys/netgraph/ng_patch.h
Changes to allow the patching of packets with an offset (and other changes..
see man page)

PR: 206185
Submitted by: Dmitry Vagin <daemon-hammer@ya.ru>
MFC after: 1 week
Relnotes: yes (also ng_checksum node)
09:51:12 - r309407
(1 day 1 hour ago)
by julian
Affects:  /head/share/man/man4/ng_checksum.4
A little light wordsmithing only.

Sponsored by: FreeBSD
09:41:54 - r309406
(1 day 1 hour ago)
by hselasky
Affects:  /head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
/head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
Remove useless NULL checks.

NULL is not returned when allocating memory passing the M_WAITOK flag.

Submitted by: trasz @
Differential Revision: https://reviews.freebsd.org/D5772
Sponsored by: Mellanox Technologies
MFC after: 1 week
09:30:13 - r309405
(1 day 2 hours ago)
by mm
Affects: 
(4 files)
/head/contrib/libarchive/libarchive/archive_read_support_filter_uu.c
/head/contrib/libarchive/libarchive/archive_read_support_format_cab.c
/head/contrib/libarchive/libarchive/archive_read_support_format_tar.c
MFV r309403:

Sync libarchive with vendor.

Vendor bugfixes:
Fix for heap-buffer-overflow in archive_le16dec()
Fix for heap-buffer-overflow in uudecode_bidder_bid()
Reworked fix for compatibility with archives created by Perl Archive::Tar

MFC after: 1 week
09:29:22 - r309404
(1 day 2 hours ago)
by hselasky
Affects:  /head/sys/netgraph/ng_base.c
Fix return value from ng_uncallout().

callout_stop() recently started returning -1 when the callout is already
stopped, which is not handled by the netgraph code. Properly filter
the return value. Netgraph callers only want to know if the callout
was cancelled and not draining or already stopped.

Discussed with: julian, glebius
MFC after: 2 weeks
09:26:51 - r309403
(1 day 2 hours ago)
by mm
Affects:  /vendor/libarchive/dist/libarchive/archive_read_support_filter_uu.c
/vendor/libarchive/dist/libarchive/archive_read_support_format_cab.c
/vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c
Update vendor/libarchive to git 53d73345410d69e68171f05facaf4523e38e72bb

Vendor bugfixes:
Fix for heap-buffer-overflow in archive_le16dec()
Fix for heap-buffer-overflow in uudecode_bidder_bid()
Reworked fix for compatibility with archives created by Perl Archive::Tar
08:24:00 - r309402
(1 day 3 hours ago)
by julian
Affects: 
(2 files)
/stable/11/usr.sbin/bhyve/dbgport.c
MFH: r309295

bhyve: stability and performance improvement for dbgport

The TCP server implementation in dbgport does not track clients, so it
may try to write to a disconected socket resulting in SIGPIPE.
Avoid that by setting SO_NOSIGPIPE socket option.

Because dbgport emulates an I/O port to guest, the communication is done
byte by byte. Reduce latency of the TCP/IP transfers by using
TCP_NODELAY option. In my tests that change improves performance of
kgdb commands with lots of output (e.g. info threads) by two orders of
magnitude.

A general note. Since we have a uart emulation in bhyve, that can be
used for the console and gdb access to guests. So, bvmconsole and bvmdebug
could be de-orbited now. But there are many existing deployments that
still dependend on those.

Discussed with: julian, jhb
Sponsored by: Panzura
08:21:25 - r309401
(1 day 3 hours ago)
by julian
Affects: 
(2 files)
/stable/10/usr.sbin/bhyve/dbgport.c
MFH: r309295

bhyve: stability and performance improvement for dbgport

The TCP server implementation in dbgport does not track clients, so it
may try to write to a disconected socket resulting in SIGPIPE.
Avoid that by setting SO_NOSIGPIPE socket option.

Because dbgport emulates an I/O port to guest, the communication is done
byte by byte. Reduce latency of the TCP/IP transfers by using
TCP_NODELAY option. In my tests that change improves performance of
kgdb commands with lots of output (e.g. info threads) by two orders of
magnitude.

A general note. Since we have a uart emulation in bhyve, that can be
used for the console and gdb access to guests. So, bvmconsole and bvmdebug
could be de-orbited now. But there are many existing deployments that
still dependend on those.

Discussed with: julian, jhb
Sponsored by: Panzura
08:21:08 - r309400
(1 day 3 hours ago)
by hselasky
Affects:  /head/sys/dev/acpica/acpi_ec.c
Fix for endless recursion in the ACPI GPE handler during boot.

When handling a GPE ACPI interrupt object the EcSpaceHandler()
function can be called which checks the EC_EVENT_SCI bit and then
recurse on the EcGpeQueryHandler() function. If there are multiple GPE
events pending the EC_EVENT_SCI bit will be set at the next call to
EcSpaceHandler() causing it to recurse again via the
EcGpeQueryHandler() function. This leads to a slow never ending
recursion during boot which prevents proper system startup, because
the EC_EVENT_SCI bit never gets cleared in this scenario.

The behaviour is reproducible with the ALASKA AMI in combination with
a newer Skylake based mainboard in the following way:

Enter BIOS and adjust the clock one hour forward. Save and exit the
BIOS. System fails to boot due to the above mentioned bug in
EcGpeQueryHandler() which was observed recursing multiple times.

This patch adds a simple recursion guard to the EcGpeQueryHandler()
function and also also adds logic to detect if new GPE events occurred
during the execution of EcGpeQueryHandler() and then loop on this
function instead of recursing.

Reviewed by: jhb
MFC after: 2 weeks
08:15:52 - r309399
(1 day 3 hours ago)
by julian
Affects: 
(2 files)
/stable/10/usr.sbin/bhyve/dbgport.c
MFH: r307917

accept4 actually expect SOCK_NONBLOCK and not O_NONBLOCK

Reported by: jhb
Pointyhat to: bapt
08:12:51 - r309398
(1 day 3 hours ago)
by julian
Affects: 
(2 files)
/stable/10/usr.sbin/bhyve/dbgport.c
MFH: r306554

Use accept4 with O_NONBLOCK rather than accept + fcntl
08:02:31 - r309397
(1 day 3 hours ago)
by tuexen
Affects:  /head/sys/netinet/tcp_input.c
Fix the handling of TCP FIN-segments in the CLOSED state

When a TCP segment with the FIN bit set was received in the CLOSED state,
a TCP RST-ACK-segment is sent. When computing SEG.ACK for this, the
FIN counts as one byte. This accounting was missing and is fixed by this
patch.

Reviewed by: hiren
MFC after: 1 month
Sponsored by: Netflix, Inc.
Differential Revision: https://svn.freebsd.org/base/head
06:27:54 - r309396
(1 day 5 hours ago)
by julian
Affects: 
(2 files)
/stable/10/share/man/man9/SYSCALL_MODULE.9
MFH: r297015

Change a little to match what appears to be the right way of specifying an
argument
(from looking at other man pages)

Sponsored by: Panzura inc
06:27:14 - r309395
(1 day 5 hours ago)
by julian
Affects: 
(2 files)
/stable/10/share/man/man9/SYSCALL_MODULE.9
MFH: r297012

Add a few details that make it easier to use this macro.

Sponsored by: Panzura inc
06:15:59 - r309394
(1 day 5 hours ago)
by marcel
Affects:  /head/sys/netpfil/pf/if_pfsync.c
Fix use-after-free bugs in pfsync(4)

Use after free happens for state that is deleted. The reference
count is what prevents the state from being freed. When the
state is dequeued, the reference count is dropped and the memory
freed. We can't dereference the next pointer or re-queue the
state.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8671
06:07:27 - r309393
(1 day 5 hours ago)
by araujo
Affects: 
(4 files)
/head/usr.sbin/ypldap/*
Use memset(3) instead of bzero(3).

Obtained from: OpenBSD (r1.12, r1.20, r1.18 and r1.37)
05:49:22 - r309392
(1 day 5 hours ago)
by araujo
Affects:  /head/usr.sbin/ypldap/aldap.c
String terminators are called NUL, not NULL, also the variable
mentioned in the comment is p and not u.

Obtained from: OpenBSD (r1.34)
05:47:52 - r309391
(1 day 5 hours ago)
by julian
Affects: 
(2 files)
/stable/11/sys/sys/sysent.h
MFH: r303287

Split MAKE_SYSENT into two parts so that the initializer part can be
used separately if one wants to embed the sysent into a larger structure.
05:42:49 - r309390
(1 day 5 hours ago)
by julian
Affects: 
(3 files)
/stable/11/sys/netgraph/ng_patch.c
/stable/11/sys/netgraph/ng_patch.h
MFH: r303611

slite style changes. There is an incoming patch that rewrites a
lot of this module and I want to get the style and whitespace changes in
a separate commit (or maybe more).

PR: 206185
Submitted by: Dmitry Vagin
05:42:04 - r309389
(1 day 5 hours ago)
by julian
Affects: 
(3 files)
/stable/10/sys/netgraph/ng_patch.c
/stable/10/sys/netgraph/ng_patch.h
MFH: r303611

slite style changes. There is an incoming patch that rewrites a
lot of this module and I want to get the style and whitespace changes in
a separate commit (or maybe more).

PR: 206185
Submitted by: Dmitry Vagin
05:39:10 - r309388
(1 day 5 hours ago)
by julian
Affects: 
(2 files)
/stable/10/share/man/man4/ng_checksum.4
MFH: r303613

Man page for the new checksum netgraph module.

PR: 206186
Submitted by: Dmitry Vagin <daemon.hammer@ya.ru>
05:38:25 - r309387
(1 day 5 hours ago)
by julian
Affects: 
(4 files)
/stable/10/sys/modules/netgraph/checksum
/stable/10/sys/netgraph/ng_checksum.c
/stable/10/sys/netgraph/ng_checksum.h
MFH: r303612

netgraph module for reconstructing checksums

PR: 206108
Submitted by: Dmitry Vagin daemon.hammer@ya.ru
05:37:32 - r309386
(1 day 5 hours ago)
by julian
Affects: 
(2 files)
/stable/11/share/man/man4/ng_checksum.4
MFH: r303613

Man page for the new checksum netgraph module.

PR: 206186
Submitted by: Dmitry Vagin <daemon.hammer@ya.ru>
05:36:37 - r309385
(1 day 5 hours ago)
by julian
Affects: 
(4 files)
/stable/11/sys/modules/netgraph/checksum
/stable/11/sys/netgraph/ng_checksum.c
/stable/11/sys/netgraph/ng_checksum.h
MFH: r303612

netgraph module for reconstructing checksums

PR: 206108
Submitted by: Dmitry Vagin daemon.hammer@ya.ru
05:25:32 - r309384
(1 day 6 hours ago)
by julian
Affects: 
(2 files)
/stable/11/sys/kern/kern_descrip.c
MFH: r306306

Give the user a clue as to which process hit maxfiles.

Sponsored by: Panzura
05:24:51 - r309383
(1 day 6 hours ago)
by julian
Affects: 
(2 files)
/stable/10/sys/kern/kern_descrip.c
MFH: r306306

Give the user a clue as to which process hit maxfiles.

Sponsored by: Panzura
01:52:32 - r309382
(1 day 9 hours ago)
by pfg
Affects:  /head/usr.bin/indent/lexi.c
indent(1): Do not define opchar unless it will be used.

"opchar" is only used once depending on "undef" macro being defined.
Conditionalize it in the same way.

Submitted by: Piotr Sephaniak
01:38:40 - r309381
(1 day 9 hours ago)
by gonzo
Affects: 
(3 files)
/stable/11/share/man/man4/Makefile
/stable/11/share/man/man4/bytgpio.4
MFC r308941:

[bytgpio] Add bytgpio(4) man page with general description of the driver
01:25:51 - r309380
(1 day 10 hours ago)
by pfg
Affects:  /head/usr.bin/indent/indent.c
/head/usr.bin/indent/indent_codes.h
/head/usr.bin/indent/lexi.c
indent(1): Fix indent's confusion about custom FreeBSD macros.

Teach indent(1) about storage-class specifiers. Don't assume
"in_parameter_declaration" state if "in_decl" hasn't been set. Don't set
"in_decl" for storage-class specifiers.

That set of changes helps with recognizing the difference between file
scope declarations like this:

static LIST_HEAD(, alq) ald_active;
static int ald_shuttingdown = 0;
struct thread *ald_thread;

and old style function declarators like this:

static int
do_execve(td, args, mac_p)
  struct thread *td;
  struct image_args *args;
  struct mac *mac_p;
{

Unfortunately, at the same time this change makes indent(1) require
explicit int in declarations like "static a;", in order to understand that
it's part of a declaration. On the other hand, declarations like in the
first example are no longer indented as if ald_shuttingdown and ald_thread
were parameters of a function named LIST_HEAD.

Submitted by: Piotr Stefaniak
00:23:10 - r309379
(1 day 11 hours ago)
by jhb
Affects: 
(2 files)
/stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt
MFC 297797:
cxgbe(4): Provide an explicit value for nqpcq in the firmware
configuration file.

Sponsored by: Chelsio Communications
2016 - 12 - 01   (2 days ago)
23:38:52 - r309378
(1 day 11 hours ago)
by jhb
Affects: 
(29 files)
/stable/10/contrib/ofed/*
/stable/10/sys/dev/*
/stable/10/sys/ofed/*
MFC 273806,289103,289201,289338,289578,293185,294474,294610,297124,297368,
297406,300875,300888,301158,301896,301897,304838:

Pull in most of the Chelsio and iWARP related changes from stable/11 into
stable/10. A few changes from 278886 (OFED 1.2) were also included though
the full merge is not:
- The find_gid_port() function in infiband/core/cma.c.
- Addition of the 'ord' and 'ird' fields to 'struct iw_cm_event'.

273806:
Userspace library for Chelsio's Terminator 5 based iWARP RNICs (pretty
much every T5 card that does _not_ have "-SO" in its name is RDMA
capable).

This plugs into the OFED verbs framework and allows userspace RDMA
applications to work over T5 RNICs. Tested with rping.

289103:
iw_cxgbe: fix for page fault in cm_close_handler().

This is roughly the iw_cxgbe equivalent of
https://github.com/torvalds/linux/commit/be13b2dff8c4e41846477b22cc5c164ea5a6ac2e
-----------------
RDMA/cxgb4: Connect_request_upcall fixes

When processing an MPA Start Request, if the listening endpoint is
DEAD, then abort the connection.

If the IWCM returns an error, then we must abort the connection and
release resources. Also abort_connection() should not post a CLOSE
event, so clean that up too.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-----------------

289201:
iw_cxgbe: MPA v2 is always available.

289338:
iw_cxgbe: use correct RFC number.

289578:
Merge LinuxKPI changes from DragonflyBSD:
- Define the kref structure identical to the one found in Linux.
- Update clients referring inside the kref structure.
- Implement kref_sub() for FreeBSD.

293185:
iw_cxgbe: Shut down the socket but do not close the fd in case of error.
The fd is closed later in this case. This fixes a "SS_NOFDREF on enter"
panic.

294474:
iw_cxgbe: fix a couple of problems int the RDMA_TERMINATE handler.

a) Look for the CPL in the payload buffer instead of the descriptor.
b) Retrieve the socket associated with the tid with the inpcb lock held.

294610:
Fix for iWARP servers that listen on INADDR_ANY.

The iWARP Connection Manager (CM) on FreeBSD creates a TCP socket to
represent an iWARP endpoint when the connection is over TCP. For
servers the current approach is to invoke create_listen callback for
each iWARP RNIC registered with the CM. This doesn't work too well for
INADDR_ANY because a listen on any TCP socket already notifies all
hardware TOEs/RNICs of the new listener. This patch fixes the server
side of things for FreeBSD. We've tried to keep all these modifications
in the iWARP/TCP specific parts of the OFED infrastructure as much as
possible.

297124:
iw_cxgbe/libcxgb4: Pull in many applicable fixes from the upstream Linux
iWARP driver and userspace library to the FreeBSD iw_cxgbe and libcxgb4.

This commit includes internal changesets 6785 8111 8149 8478 8617 8648
8650 9110 9143 9440 9511 9894 10164 10261 10450 10980 10981 10982 11730
11792 12218 12220 12222 12223 12225 12226 12227 12228 12229 12654.

297368:
cxgbe/iw_cxgbe: Fix for stray "start_ep_timer timer already started!"
messages.

297406:
Remove unnecessary dequeue_mutex (added in r294610) from the iWARP
connection manager. Examining so_comp without synchronization with
iw_so_event_handler is a harmless race.

300875:
iw_cxgbe: Use vmem(9) to manage PBL and RQT allocations.

300888:
iw_cxgbe: Plug a lock leak in process_mpa_request().

If the parent is DEAD or connect_request_upcall() fails, the parent
mutex is left locked. This leads to a hang when process_mpa_request()
is called again for another child of the listening endpoint.

301158:
iw_cxgbe: Fix panic that occurs when c4iw_ev_handler tries to acquire
comp_handler_lock but c4iw_destroy_cq has already freed the CQ memory
(which is where the lock resides).

301896:
Fix bug in iwcm that caused a panic in iw_cm_wq when krping is run
repeatedly in a tight loop.

301897:
iw_cxgbe: Make sure that send_abort results in a TCP RST and not a FIN.
Release the hold on ep->com immediately after sending the RST. This
fixes a bug that sometimes leaves userspace iWARP tools hung when the
user presses ^C.

304838:
Do not free an uninitialized pointer on soaccept failure in the iWARP
connection manager.

Submitted by: Krishnamraju Eraparaju @ Chelsio (original patch)
Sponsored by: Chelsio Communications
23:37:17 - r309377
(1 day 11 hours ago)
by shurd
Affects: 
(13 files)
/stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml
/stable/11/share/man/man4/*
/stable/11/sys/*
MFC r308696, r308729, r308787, r308813, r309028, r309073, r309078:

 r308696:
  New driver for Broadcom NetXtreme-C and NetXtreme-E devices.

 r308729:
  Add bnxt(4) to the hardware notes.

 r308787:
  Add missing newline in error mesage

 r308813:
  Check link status after init

 r309028:
  Add missing break to switch statement

 r309073:
  Fix version string

 r309078:
  Add new device IDs

Approved by: sbruno
Relnotes: yes
Sponsored by: Broadcom Limited
23:27:59 - r309376
(1 day 12 hours ago)
by jhb
Affects: 
(2 files)
/stable/11/sys/ofed/drivers/infiniband/core/iwcm.c
MFC 304838:
Do not free an uninitialized pointer on soaccept failure in the iWARP
connection manager.

Sponsored by: Chelsio Communications
22:22:19 - r309375
(1 day 13 hours ago)
by gonzo
Affects: 
(5 files)
/stable/11/sys/dev/gpio/bytgpio.c
/stable/11/sys/modules/Makefile
/stable/11/sys/modules/bytgpio/Makefile
MFC r308898, r308940, r308942, r308944, r309112

r308898:
[bytgpio] Fix USB disconnect event after listsing pins on gpioc2

- Do not set input flag when reading value from GPIO pin, it is not
  required and for gpioc2(S5 bank) setting both input and output flags
  leads to some kind of electric interference (curren drop?) that
  causes USB devices to disconnect

- Check pad configuration when attaching device and provide IN/OUT
  capabilities only for pads that are configured as GPIO. Do not let
  user code to configure or change value of non-GPIO pads. There is
  no information for NC bank in intel's datasheet so for now function
  check is ignored for pins in it

Reported by: Frank H.
MFC after: 3 days

r308940:
[bytgpio] prepare bytgpio(4) for modularization

- Add detach method
- module should depend on gpiobus, not gpio

r308942:
[bytgpio] Add module for bytgpio(4)

MFC after: 3 days

r308944 by hiren@:
r308942 broke kernel build.
Add acpi_if.h to module makefile to fix it.

Submitted by: peter

r309112:
[bytgpio] Fix pc98 build by disabling bytgpio module for this platform

Reported by: dim
22:20:27 - r309374
(1 day 13 hours ago)
by ken
Affects: 
(7 files)
/head/sbin/camcontrol/*
/head/sys/cam/scsi/*
Add SCSI REPORT TIMESTAMP and SET TIMESTAMP support.

This adds support to camcontrol(8) and libcam(3) for getting and setting
the time on SCSI protocol drives. This is more commonly found on tape
drives, but is a SPC (SCSI Primary Commands) command, and may be found
on any device that speaks SCSI.

The new camcontrol timestamp subcommand allows getting the current device
time or setting the time to the current system time or any arbitrary time.

sbin/camcontrol/Makefile:
  Add timestamp.c.

sbin/camcontrol/camcontrol.8:
  Document the new timestamp subcommand.

sbin/camcontrol/camcontrol.c:
  Add the timestamp subcommand to camcontrol.

sbin/camcontrol/camcontrol.h:
  Add the timestamp() function prototype.

sbin/camcontrol/timestamp.c:
  Timestamp setting and reporting functionality.

sys/cam/scsi/scsi_all.c:
  Add two new CCB building functions, scsi_set_timestamp() and
  scsi_report_timestamp(). Also, add a new helper function,
  scsi_create_timestamp().

sys/cam/scsi/scsi_all.h:
  Add CDB and parameter data for the the set and report timestamp
  commands.

  Add function declarations for the new CCB building and helper
  functions.

Submitted by: Sam Klopsch
Sponsored by: Spectra Logic
MFC After: 2 weeks
22:12:58 - r309373
(1 day 13 hours ago)
by bdrewery
Affects: 
(4 files)
/head/contrib/netbsd-tests/lib/libc/sys/*
/head/lib/libc/tests/sys/Makefile
/head/lib/libc/tests/sys/mlock_helper.c
Fix setrlimit_test:setrlimit_memlock when the system has exceeded vm.max_wired.

This uses the same fix as r294894 did for the mlock test. The code from
that commit is moved into a common object file which PROGS supports
building first.

Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8689
21:08:42 - r309372
(1 day 14 hours ago)
by rstone
Affects:  /head/sys/sys/buf_ring.h
Fix a false positive in a buf_ring assert

buf_ring contains an assert that checks whether an item being
enqueued already exists on the ring. There is a subtle bug in
this assert. An item can be returned by a peek() function and
freed, and then the consumer thread can be preempted before
calling advance(). If this happens the item appears to still be
on the queue, but another thread may allocate the item from the
free pool and wind up trying to enqueue it again, causing the
assert to trigger incorrectly.

Fix this by skipping the head of the consumer's portion of the
ring, as this index is what will be returned by peek().

Sponsored by: Dell EMC Isilon
MFC After: 1 week
Differential Revision: https://reviews.freebsd.org/D8685
Reviewed by: hselasky
20:36:48 - r309371
(1 day 14 hours ago)
by jhb
Affects: 
(6 files)
/stable/10/libexec/rtld-elf/*
/stable/11/libexec/rtld-elf/*
MFC 308456: Pass the correct flag to find_symdef() from _rtld_bind().

When symbol versioning was added to rtld, the boolean 'in_plt' argument
to find_symdef() was converted to a bitmask of flags. The first flag
added was 'SYMLOOK_IN_PLT' which replaced the 'in_plt' bool. This
happened to still work by accident as SYMLOOK_IN_PLT had the value of 1
which is the same as 'true', so there should be no functional change.
20:31:37 - r309370
(1 day 14 hours ago)
by tsoome
Affects: 
(2 files)
/stable/11/sys/boot/zfs/zfsimpl.c
Backing out r309368 as it got commited prematurely as we still do not
provide skein feature support in boot loader.

Approved by: allanjude (mentor)
19:19:20 - r309369
(1 day 16 hours ago)
by tsoome
Affects:  /head/lib/libstand/dosfs.c
libstand: dosfs cstyle cleanup for return keyword.

Reviewed by: bapt, imp, allanjude
Approved by: imp (mentor), allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8678
19:06:09 - r309368
(1 day 16 hours ago)
by tsoome
Affects: 
(2 files)
/stable/11/sys/boot/zfs/zfsimpl.c
MFC r308776

loader: zfs toplevel vdev must have spa set.

PR: 214375
Reported by: lstewart
Reviewed by: allanjude, imp
Approved by: allanjude (mentor), imp (mentor)
Differential Revision: https://reviews.freebsd.org/D8487
17:36:31 - r309367
(1 day 17 hours ago)
by vangyzen
Affects:  /head/usr.bin/locale/Makefile
/head/usr.bin/locale/locale.c
locale: enable more warnings; fix them

Do not set WARNS, so it gets the current default of 6.
Fix the warnings by sprinkling static, const, or strdup.
Make some constant data tables const. Fix whitespace.

MFC after: 1 week
Sponsored by: Dell EMC
17:28:45 - r309366
(1 day 18 hours ago)
by cem
Affects:  /head/lib/libcapsicum/capsicum_helpers.h
capsicum_helpers: Squash errors from closed fds

Squash EBADF from closed stdin, stdout, or stderr in caph_limit_stdio().
Any program used during special shell scripts may commonly be forked
from a parent process with closed standard stream. Do the common sense
thing for this common use.

Reported by: Iblis Lin <iblis AT hs.ntnu.edu.tw>
Reviewed by: oshogbo@ (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8657
17:26:37 - r309365
(1 day 18 hours ago)
by alc
Affects:  /head/sys/vm/_vm_radix.h
/head/sys/vm/vm_object.c
/head/sys/vm/vm_radix.c
During vm_page_cache()'s call to vm_radix_insert(), if vm_page_alloc() was
called to allocate a new page of radix trie nodes, there could be a call to
vm_radix_remove() on the same trie (of PG_CACHED pages) as the in-progress
vm_radix_insert(). With the removal of PG_CACHED pages, we can simplify
vm_radix_insert() and vm_radix_remove() by removing the flags on the root of
the trie that were used to detect this case and the code for restarting
vm_radix_insert() when it happened.

Reviewed by: kib, markj
Tested by: pho
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8664
16:54:02 - r309364
(1 day 18 hours ago)
by vangyzen
Affects:  /head/usr.bin/locale/locale.c
locale: fix buffer management

Also, handle signed and unsigned chars, and more gracefully handle
invalid input.

Submitted by: bde in response to r309331
MFC after: 1 week
Sponsored by: Dell EMC
15:46:26 - r309363
(1 day 19 hours ago)
by mm
Affects: 
(11 files)
/head/contrib/libarchive/libarchive/*
/head/contrib/libarchive/tar/*
/head/lib/libarchive/tests/Makefile
MFC r309362:

Sync libarchive with vendor.
Small improvements, style fixes, bugfixes.
Restores compatibility with tar archives created with Perl Archive::Tar (1)

MFC after: 1 week
Reported by: Matthew Seaman <matthew@freebsd.org> (1)
15:39:33 - r309362
(1 day 19 hours ago)
by mm
Affects: 
(12 files)
/vendor/libarchive/dist/Makefile.am
/vendor/libarchive/dist/libarchive/*
/vendor/libarchive/dist/tar/*
Update vendor/libarchive to git 2d2b3e928605f795515b03f060fd638c265b0778

Small improvements, style fixes, bugfixes.

Important vendor bugfixes:
Restore compatibility with Perl Archive::Tar that was broken with #825
14:31:05 - r309361
(1 day 20 hours ago)
by danfe
Affects:  /head/sys/x86/cpufreq/hwpstate.c
- Mention mismatching numbers in MSR vs. ACPI _PSS count warning: seeing
  actual numbers would help debugging (also, `MSR' and `ACPI' are standard
  abbreviations and thus should be properly capitalized)
- Rephrase unsupported AMD CPUs message and wrap as an overly long line:
  `sorry' 1) is wrongly spelled after period (starts with a small letter)
  and 2) carries emotional "tinge" that is unnecessary and even bogus in
  debug message; `implemented' is not the best word as `supported' suits
  better in this context
- Improve readability when reporting resulted P-state transition (debug)

Approved by: jhb
14:28:37 - r309360
(1 day 21 hours ago)
by emaste
Affects:  /head/sys/boot/common/self_reloc.c
EFI loaders: parse rela relocations on amd64

Prior to this change the loader self relocation code interpreted amd64's
rela relocations as if they were rel relocations, discarding the addend.
This "works" because GNU ld 2.17.50 stores the addend value in both the
r_addend field of the relocation (as expected) and at the target of the
relocation.

Other linkers, and possibly other versions of GNU ld, won't have this
behaviour, so interpret the relocations correctly.

Reported by: George Rimar
Reviewed by: andrew
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8681
12:32:52 - r309359
(1 day 22 hours ago)
by ae
Affects:  /projects/ipsec/sys/netipsec/key.c
Add key_allocsa_tcpmd5() to do lookup for SA used to store password
for TCP MD5 signature.

In key_allocsa() add assert that the functions is used only
for ESP/AH/IPcomp.
11:57:15 - r309358
(1 day 23 hours ago)
by ae
Affects:  /projects/ipsec/sys/netipsec/ipsec.c
Add ipsec_setsockaddrs_inpcb() function to fill sockaddr_union unions
using information from INPCB. Add direction argument, it is used to
choose local or foreign addresses as source or destination.
Change ipsec_setspidx_inpcb() function to use ipsec_setsockaddrs_inpcb().
09:14:58 - r309357
(2 days 2 hours ago)
by n_hibma
Affects:  /head/usr.sbin/i2c/i2c.c
Speling fixes and fix line endings for err_msg output.

In some cases there was not \n, in other cases there was.
07:50:44 - r309356
(2 days 3 hours ago)
by peter
Affects: 
(42 files)
/head/contrib/subversion/*
Update from subversion 1.9.4 to 1.9.5.

This includes a security fix for a component that we do not build, and
two potentially useful client side fixes for reintegrate merges and tree
conflict handling. See CHANGES for full details.
07:46:24 - r309355
(2 days 3 hours ago)
by peter
Affects:  /vendor/subversion/subversion-1.9.5
Tag import of subversion-1.9.5
07:45:05 - r309354
(2 days 3 hours ago)
by peter
Affects: 
(41 files)
/vendor/subversion/dist/*
Import subversion-1.9.5.
This includes a security fix for a component that we do not build, and
two potentially useful client side fixes for reintegrate merges and tree
conflict handling. See CHANGES for full details.
05:37:29 - r309353
(2 days 5 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
/head/sys/modules/hyperv/netvsc/Makefile
hyperv/hn: Add 'options RSS' support.

Reviewed by: adrian
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8676
05:16:27 - r309352
(2 days 6 hours ago)
by imp
Affects:  /head/etc/defaults/rc.conf
/head/etc/rc.subr
Finish incomplete comments in prior revision. I was going to fix this
after I tested it, but didn't.
04:35:43 - r309351
(2 days 6 hours ago)
by imp
Affects:  /head/etc/defaults/rc.conf
Revert the 'performance' setting to 'NONE' from C2. C2 has issues with
USB in places, as well as having the potential for reducing
performance. Since this is used even when powerd isn't enabled, these
two problems can cause on servers. Supermicro X9 motherboards, for
example, have problems with the virtual IPMI USB keyboards and mice
attaching and detaching repeatedly. Since there are issues on some
CPUs with C2, fail safe by defaulting to not altering it.

MFC After: 3 days
04:35:41 - r309350
(2 days 6 hours ago)
by imp
Affects:  /head/etc/rc.subr
If the kenv variable rc_debug is set, turn on rc_debug.
04:35:38 - r309349
(2 days 6 hours ago)
by imp
Affects:  /head/sbin/devd/devd.cc
Simplify test.
03:39:34 - r309348
(2 days 7 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Don't hold txdesc, if no BPFs are attached.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8675
03:34:04 - r309347
(2 days 7 hours ago)
by loos
Affects:  /head/sys/arm/ti/cpsw/if_cpsw.c
/head/sys/arm/ti/cpsw/if_cpswvar.h
MDIO_PHYACCESS_ACK is only valid for read access, remove it from
miibus_writereg.

Reduce the DELAY() between reads while waiting for MII access.

Spotted by: yongari
Sponsored by: Rubicon Communications, LLC (Netgate)
03:27:16 - r309346
(2 days 8 hours ago)
by sephe
Affects:  /head/sys/conf/options
/head/sys/dev/hyperv/netvsc/if_hn.c
/head/sys/modules/hyperv/netvsc/Makefile
hyperv/hn: Add HN_DEBUG kernel option.

If bufring is used for per-TX ring descs, don't update "available"
counter, which is only used to help debugging.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8674
02:35:15 - r309345
(2 days 8 hours ago)
by loos
Affects:  /head/sys/arm/ti/cpsw/if_cpsw.c
The RX_FREEBUFFER registers are a write to increment field.

Writing the full queue size to it every time was makeing it overflow with a
lot of bogus values.

This fixes the interrupt storms on irq 40.

Sponsored by: Rubicon Communications, LLC (Netgate)
02:21:36 - r309344
(2 days 9 hours ago)
by cem
Affects:  /head/lib/libutil/flopen.c
Remove a death threat from the FreeBSD sources

Reported by: koobs@, araujo@, linimon@, bjk@, emaste@, jhb@, ngie@, cem@
Maintainer timeout: des@
01:56:34 - r309343
(2 days 9 hours ago)
by pfg
Affects:  /head/usr.bin/indent/pr_comment.c
indent(1): Don't unnecessarily add a blank before a comment ends.

pr_comment() did avoid adding surplus space character when a comment
contained it at the end. Now it's also paying attention to tabs.

Taken from: Piotr Stefaniak
01:48:56 - r309342
(2 days 9 hours ago)
by pfg
Affects:  /head/usr.bin/indent/indent.c
indent(1): Don't ignore newlines after comments that follow braces.

indent.c has a special loop that stores tokens from between an if () and
the next statement into a buffer. The loop ignored all newlines, but that
resulted in not calling dump_line() when it was needed to produce the
final line of the buffered up comment.

Taken from: Piotr Stefaniak
01:32:13 - r309341
(2 days 9 hours ago)
by pfg
Affects:  /head/usr.bin/indent/io.c
/head/usr.bin/indent/pr_comment.c
indent(1): Avoid out of bound access of array in_buffer

Work-around a somewhat complex interaction within the code. From
Piotr's commit [1]:

When pr_comment() calls dump_line() for the first line of a multiline
comment, it doesn't include any indentation - it starts with the "/*".
This is consistent for both boxed and not boxed comments. Where the logic
diverges is in how it treats the rest of the lines of the comment. For box
comments indent assumes that it must not change anything, so lines are
dumped as they were, including the indentation where it exists. For the
rest of comments, it will first remove the indentation to store plain text
of the comment and then add it again where indent thinks it's appropriate
-- this is part of comment re-indenting process.

For continuations of multi-line comments, the code that handles comments
in dump_line() will use pad_output() to create indentation from the
beginning of the line (what indent calls the first column) and then write
string pointed by s_com afterwards. But if it's a box comment, the string
will include original indentation, unless it's the first line of the
comment. This is why tab characters from s_com have to be considered when
calculating how much padding is needed and the "while (*com_st == '\t')
com_st++, target += 8;" does that.

In dump_line(), /target/ is initially set to ps.com_col, so it always
assumes that indentation needs to be produced in this function, regardless
of which line of a box comment it is. But for the first line of a box
comment it is not true, so pr_comment() signals it by setting
ps.n_comment_delta, the negative comment delta, to a negative number which
is then added to /target/ in dump_line() on all lines except the first
one, so that the function produces adequate indentation in this special
case.

The bug was in how that negative offset was calculated: pr_comment() used
count_spaces() on in_buffer, which pr_comment() expected to contain
non-null terminated sequence of characters, originating from whatever
originally was on the left side of the comment. Understanding that
count_spaces() requires a string, pr_comment() temporarily set buf_ptr[-2]
to 0 in hope that it would nul-terminate the right thing in in_buffer and
calling count_spaces() would be safe and do the expected thing. This was
false whenever buf_ptr would point into save_com, an entirely different
char array than in_buffer.

The short-term fix is to recognize whether buf_ptr points into in_buffer
or save_com.

Reference:
[1]
https://github.com/pstef/freebsd_indent/commit/ea486a2aa3b056b146bdfbb8e94843159750f200

Taken from: Piotr Stefaniak
2016 - 11 - 30   (3 days ago)
22:20:23 - r309340
(2 days 13 hours ago)
by vangyzen
Affects: 
(5 files)
/stable/10/sys/netinet/*
/stable/10/usr.sbin/arp/arp.4
MFC r306577 r306652 306830

Add GARP retransmit capability

A single gratuitous ARP (GARP) is always transmitted when an IPv4
address is added to an interface, and that is usually sufficient.
However, in some circumstances, such as when a shared address is
passed between cluster nodes, this single GARP may occasionally be
dropped or lost. This can lead to neighbors on the network link
working with a stale ARP cache and sending packets destined for
that address to the node that previously owned the address, which
may not respond.

To avoid this situation, GARP retransmissions can be enabled by setting
the net.link.ether.inet.garp_rexmit_count sysctl to a value greater
than zero. The setting represents the maximum number of retransmissions.
The interval between retransmissions is calculated using an exponential
backoff algorithm, doubling each time, so the retransmission intervals
are: {1, 2, 4, 8, 16, ...} (seconds).

Due to the exponential backoff algorithm used for the interval
between GARP retransmissions, the maximum number of retransmissions
is limited to 16 for sanity. This limit corresponds to a maximum
interval between retransmissions of 2^16 seconds ~= 18 hours.
Increasing this limit is possible, but sending out GARPs spaced
days apart would be of little use.

Update arp(4) to document the net.link.ether.inet.garp_rexmit_count sysctl.

Submitted by: dab
Relnotes: yes
Sponsored by: Dell EMC
22:00:25 - r309339
(2 days 13 hours ago)
by gjb
Affects:  /head/Makefile.inc1
/head/release/scripts/make-pkg-package.sh
/head/share/mk/bsd.own.mk
Revert r309314, which breaks installing ports.

Requested by: antoine
Differential Revision: https://reviews.freebsd.org/D8120 (related)
Sponsored by: The FreeBSD Foundation
21:59:52 - r309338
(2 days 13 hours ago)
by cem
Affects:  /head/sys/dev/ioat/ioat.c
/head/sys/dev/ioat/ioat_internal.h
ioat(4): Fix 'bogus completion_pending' KASSERT

Fix ioat_release to only set is_completion_pending if DMAs were actually
queued. Otherwise, the spurious flag could trigger an assert in the
reset path on INVARIANTS kernels.

Reviewed by: bdrewery, Suraj Raju @ Isilon
Sponsored by: Dell EMC Isilon
21:53:06 - r309337
(2 days 13 hours ago)
by vangyzen
Affects: 
(5 files)
/stable/11/sys/netinet/*
/stable/11/usr.sbin/arp/arp.4
MFC r306577 r306652 306830

Add GARP retransmit capability

A single gratuitous ARP (GARP) is always transmitted when an IPv4
address is added to an interface, and that is usually sufficient.
However, in some circumstances, such as when a shared address is
passed between cluster nodes, this single GARP may occasionally be
dropped or lost. This can lead to neighbors on the network link
working with a stale ARP cache and sending packets destined for
that address to the node that previously owned the address, which
may not respond.

To avoid this situation, GARP retransmissions can be enabled by setting
the net.link.ether.inet.garp_rexmit_count sysctl to a value greater
than zero. The setting represents the maximum number of retransmissions.
The interval between retransmissions is calculated using an exponential
backoff algorithm, doubling each time, so the retransmission intervals
are: {1, 2, 4, 8, 16, ...} (seconds).

Due to the exponential backoff algorithm used for the interval
between GARP retransmissions, the maximum number of retransmissions
is limited to 16 for sanity. This limit corresponds to a maximum
interval between retransmissions of 2^16 seconds ~= 18 hours.
Increasing this limit is possible, but sending out GARPs spaced
days apart would be of little use.

Update arp(4) to document the net.link.ether.inet.garp_rexmit_count sysctl.

Submitted by: dab
Relnotes: yes
Sponsored by: Dell EMC
20:51:51 - r309336
(2 days 14 hours ago)
by vangyzen
Affects: 
(2 files)
/stable/10/usr.bin/ncal/ncal.c
MFC r308340

ncal: fix a reference to an out-of-scope stack buffer

PR: 214237
Submitted by: Jonathan de Boyne Pollard
Sponsored by: Dell EMC
20:51:14 - r309335
(2 days 14 hours ago)
by vangyzen
Affects: 
(2 files)
/stable/11/usr.bin/ncal/ncal.c
MFC r308340

ncal: fix a reference to an out-of-scope stack buffer

PR: 214237
Submitted by: Jonathan de Boyne Pollard
Sponsored by: Dell EMC
20:48:44 - r309334
(2 days 14 hours ago)
by vangyzen
Affects: 
(4 files)
/stable/10/lib/libc/locale/wcstod.c
/stable/10/lib/libc/locale/wcstof.c
/stable/10/lib/libc/locale/wcstold.c
MFC r308904

Fix error reporting from wcstof()

When wcstof() skipped initial space and then parsing failed, it set
endptr to the first non-space character. Fix it to correctly report
failure by setting endptr to the beginning of the input string.
The fix is from theraven@, who fixed this bug in wcstod() and
wcstold() in r227753.

While I'm here:

Move assignments out of declarations in wcstod() and wcstold().
This is against my personal preference, but it is our agreed style(9).

Set endptr correctly on malloc() failure in all three functions.

Remove an incorrect comment: This is pointer arithmetic,
so the code was not actually making that assumption.

wcstold() advanced the wcp pointer beyond leading whitespace
and then reset it back to the beginning of the string.
Do not reset it. This seems to have no functional effect,
since strtold_l() also skips leading whitespace. I'm making
the change to keep this function consistent with wcstof() and
wcstod(), and because the C11 spec prescribes the use of iswspace()
to skip leading space.

Reported by: libc++ unit test for std::stof(std::wstring)
Sponsored by: Dell EMC
20:47:54 - r309333
(2 days 14 hours ago)
by vangyzen
Affects: 
(4 files)
/stable/11/lib/libc/locale/wcstod.c
/stable/11/lib/libc/locale/wcstof.c
/stable/11/lib/libc/locale/wcstold.c
MFC r308904

Fix error reporting from wcstof()

When wcstof() skipped initial space and then parsing failed, it set
endptr to the first non-space character. Fix it to correctly report
failure by setting endptr to the beginning of the input string.
The fix is from theraven@, who fixed this bug in wcstod() and
wcstold() in r227753.

While I'm here:

Move assignments out of declarations in wcstod() and wcstold().
This is against my personal preference, but it is our agreed style(9).

Set endptr correctly on malloc() failure in all three functions.

Remove an incorrect comment: This is pointer arithmetic,
so the code was not actually making that assumption.

wcstold() advanced the wcp pointer beyond leading whitespace
and then reset it back to the beginning of the string.
Do not reset it. This seems to have no functional effect,
since strtold_l() also skips leading whitespace. I'm making
the change to keep this function consistent with wcstof() and
wcstod(), and because the C11 spec prescribes the use of iswspace()
to skip leading space.

Reported by: libc++ unit test for std::stof(std::wstring)
Sponsored by: Dell EMC
19:06:47 - r309332
(2 days 16 hours ago)
by dim
Affects:  /head/Makefile.inc1
Cleanup old debug dirs in delete-old-dirs target

Any .debug or .symbols files under /usr/lib/debug which correspond to
OLD_FILES entries in ObsoleteFiles.inc are also automatically cleaned up
by the delete-old target. Make this also apply to any OLD_DIRS entries.

Reviewed by: emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D8683
18:34:40 - r309331
(2 days 16 hours ago)
by vangyzen
Affects:  /head/usr.bin/locale/locale.c
Include limits.h for CHAR_MAX

This was needed on stable/10. Apparently, sys/param.h supplies CHAR_MAX
on head. Include limits.h anyway, for consistency, and because C says so.

Sponsored by: Dell EMC
18:26:22 - r309330
(2 days 17 hours ago)
by vangyzen
Affects: 
(2 files)
/stable/11/usr.bin/locale/locale.c
MFC r308824

locale: fix display of "grouping" and "mon_grouping" values

The "grouping" and "mon_grouping" values are arrays of one-byte
integers, not arrays of ASCII characters. Display them in a format
similar to GNU and MacOS.

Sponsored by: Dell EMC
18:11:35 - r309329
(2 days 17 hours ago)
by vangyzen
Affects: 
(2 files)
/stable/10/usr.bin/locale/locale.c
MFC r308824

locale: fix display of "grouping" and "mon_grouping" values

The "grouping" and "mon_grouping" values are arrays of one-byte
integers, not arrays of ASCII characters. Display them in a format
similar to GNU and MacOS.

Sponsored by: Dell EMC
14:18:52 - r309328
(2 days 21 hours ago)
by andrew
Affects:  /head/sys/dev/pci/pci_host_generic_fdt.c
Fix the PCI host generic FDT driver to call into the common code and not
recurse into itself.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
14:17:06 - r309327
(2 days 21 hours ago)
by andrew
Affects:  /head/sys/arm64/cavium/thunder_pcie_common.c
Fix the alloc function the ThunderX PCIe driver calls, the previous
function may not exist when FDT is removed from the kernel.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
14:02:36 - r309326
(2 days 21 hours ago)
by rwatson
Affects:  /head/usr.bin/login/login_audit.c
Clarify warning message when failing to configure audit on user login:
when au_user_mask() fails, it's not a failure to set the audit mask,
but to calculate the audit mask -- and hence a condfiguration-file
issue (of some sort).

MFC after: 3 days
Sponsored by: DARPA, AFRL
12:06:03 - r309325
(2 days 23 hours ago)
by bapt
Affects: 
(2 files)
/stable/11/lib/libstand/bootp.c
MFC r308129:

When issuing a PXE dhcp request, always issue a param request (DHCP option 55)
with all dhcp parameters we might be interested in.

Some DHCP server like the new kea (by ISC) expect it.

This makes pxeboot functional with ISC kea.

Submitted by: Vincent Legout <vincent.legout@gandi.net>
Sponsored by: Gandi.net
10:17:03 - r309324
(3 days 1 hour ago)
by andrew
Affects:  /head/sys/conf/files
Mark the Alpine ethernet driver as FDT only. It calls
alpine_serdes_resource_get which is defined in an FDT only file.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
09:47:29 - r309323
(3 days 1 hour ago)
by andrew
Affects:  /head/sys/arm/arm/gic.h
/head/sys/arm/arm/gic_fdt.c
Move the FDT specific parts of the GIC diver softc to the FDT attachment.
This allows the driver to be built in a kernel with no FDT support, e.g.
on arm64 with just ACPI.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
09:45:18 - r309322
(3 days 1 hour ago)
by andrew
Affects:  /head/sys/arm/arm/gic.c
Only include FDT headders when building for FDT.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
09:27:08 - r309321
(3 days 2 hours ago)
by mav
Affects: 
(5 files)
/head/sbin/geom/class/mirror/*
/head/sys/geom/mirror/*
Add `gmirror create` subcommand, alike to gstripe, gconcat, etc.

It is quite specific mode of operation without storing on-disk metadata.
It can be useful in some cases in combination with some external control
tools handling mirror creation and disks hot-plug.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
08:21:15 - r309320
(3 days 3 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
hyperv/storvsc: Don't use timedwait.

The timeout is unnecessary.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8656
08:10:49 - r309319
(3 days 3 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/vmbus/vmbus_chan.c
hypver/vmbus: Remove extra assertion.

It is asserted by vmbus_chan_gpadl_connect() now.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8660
07:54:28 - r309318
(3 days 3 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Allow TX to share event taskqueues.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8659
07:51:46 - r309317
(3 days 3 hours ago)
by dexuan
Affects: 
(5 files)
/stable/10/ObsoleteFiles.inc
/stable/10/share/man/man4/*
MFC r308797-308799,309082

Approved by: sephe (mentor)

  r308797
  update the hv_vmbus(4) manual by adding a dependency on pci

  We enhanced the vmbus driver to support PCIe pass-through recently.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

  r308798
  remove the hv_ata_pci_disengage(4) manual

  A few months ago, we removed the driver, which was not necessary any longer.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

  r308799
  fix share/man/man4/Makefile for hv_ata_pci_disengage.4

  We need to remove the line since we removed the related manual just now.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

  r309082
  share/man/man4/Makefile: Only install Hyper-V man pages on amd64 and i386

  We shouldn't install them on the architectures not supported by Hyper-V.

  And, hv_ata_pci_disengage.4.gz should be removed from all architectures:
  1) It should have only applied to Hyper-V;
  2) For Hyper-V platforms (amd64 and i386), the related driver was removed by
  r306426 | sephe | 2016-09-29 09:41:52 +0800 (Thu, 29 Sep 2016),
  because now we have a better mechanism to disble the ata driver for hard
  disks when the VM runs on Hyper-V.

  Reviewed by: sephe, andrew, jhb
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8572
07:45:05 - r309316
(3 days 3 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/vmbus/vmbus.c
/head/sys/dev/hyperv/vmbus/vmbus_if.m
hyperv/vmbus: Add DEVMETHOD to map cpu to event taskq.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8658
07:22:46 - r309315
(3 days 4 hours ago)
by dexuan
Affects: 
(5 files)
/stable/11/ObsoleteFiles.inc
/stable/11/share/man/man4/*
MFC 308797-308799, 309082

  r308797
  update the hv_vmbus(4) manual by adding a dependency on pci

  We enhanced the vmbus driver to support PCIe pass-through recently.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

  r308798
  remove the hv_ata_pci_disengage(4) manual

  A few months ago, we removed the driver, which was not necessary any longer.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

  r308799
  fix share/man/man4/Makefile for hv_ata_pci_disengage.4

  We need to remove the line since we removed the related manual just now.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

  r309082
  share/man/man4/Makefile: Only install Hyper-V man pages on amd64 and i386

  We shouldn't install them on the architectures not supported by Hyper-V.

  And, hv_ata_pci_disengage.4.gz should be removed from all architectures:
  1) It should have only applied to Hyper-V;
  2) For Hyper-V platforms (amd64 and i386), the related driver was removed by
  r306426 | sephe | 2016-09-29 09:41:52 +0800 (Thu, 29 Sep 2016),
  because now we have a better mechanism to disble the ata driver for hard
  disks when the VM runs on Hyper-V.

  Reviewed by: sephe, andrew, jhb
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8572
07:16:29 - r309314
(3 days 4 hours ago)
by matthew
Affects:  /head/Makefile.inc1
/head/release/scripts/make-pkg-package.sh
/head/share/mk/bsd.own.mk
Allow a user-overridable setting 'PKG_CMD' to control the command used
to create a repo during 'make packages'

This would have been useful for a situation I found myself in where
pkg(8) had been upgraded to a version that wanted the FBSD_1.5 ABI
version but libc.so.7 had not been upgraded, and only provided
FBSD_1.4. I found I needed to update libc in order to run pkg, and I
also needed to use pkg to update libc... Which is why pkg-static
exists, but there's currently no way to tell the build system to use
pkg-static instead of pkg.

This creates a variable PKG_CMD, default value 'pkg', that can be
overridden from the command line.

Reviewed by: gjb
Approved by: gjb
Differential Revision: https://reviews.freebsd.org/D8120
06:26:38 - r309313
(3 days 5 hours ago)
by dexuan
Affects: 
(12 files)
/stable/10/sys/conf/*
/stable/10/sys/dev/hyperv/*
/stable/10/sys/modules/hyperv/*
MFC: 308723-308725,308793-308795,309127

Approved by: sephe (mentor)

r308723
  hyperv/vmbus: add a new method to get vcpu_id

  vcpu_id is host's representation of guest CPU.
  We get the mapping between vcpu_id and FreeBSD kernel's cpu id when VMBus
  driver is loaded. Later, when a driver, like the coming pcib driver, talks
  to the host and needs to refer to a guest CPU, the driver must use the
  vcpu_id.

  Reviewed by: jhb, sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8410

r308724
  hyperv/vmbus: add new vmbus methods to support PCIe pass-through

  The new methods will be used by the coming pcib driver.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8409

r308725
  hyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment)

  The feature enables us to pass through physical PCIe devices to FreeBSD VM
  running on Hyper-V (Windows Server 2016) to get near-native performance with
  low CPU utilization.

  The patch implements a PCI bridge driver to support the feature:

  1) The pcib driver talks to the host to discover device(s) and presents
  the device(s) to FreeBSD's pci driver via PCI configuration space (note:
  to access the configuration space, we don't use the standard I/O port
  0xCF8/CFC method; instead, we use an MMIO-based method supplied by Hyper-V,
  which is very similar to the 0xCF8/CFC method).

  2) The pcib driver allocates resources for the device(s) and initialize
  the related BARs, when the device driver's attach method is invoked;

  3) The pcib driver talks to the host to create MSI/MSI-X interrupt
  remapping between the guest and the host;

  4) The pcib driver supports device hot add/remove.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8332

r308793
  hyperv/pcib: Fix the build for some kernel configs

  Add the dependency on pci explicitly for the pcib and vmbus drivers.
  The related Makefiles are updated accordingly too.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

r308794
  hyperv/vmbus,pcib: Add MODULE_DEPEND on pci

  We'd better add this dependency explicitly, though usually the pci
  driver is built into the kernel by default.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

r308795
  hyperv/pcib: change the file name: pcib.c -> vmbus_pcib.c

  This makes the file name and the variable naming in the file consistent.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

r309127
  hyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined

  vmbus_pcib requires NEW_PCIB, but in case that's not defined, we at
  least shouldn't break build.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
06:20:43 - r309312
(3 days 5 hours ago)
by dexuan
Affects: 
(12 files)
/stable/11/sys/conf/*
/stable/11/sys/dev/hyperv/*
/stable/11/sys/modules/hyperv/*
MFC: 308723-308725,308793-308795,309127

Approved by: sephe (mentor)

r308723
  hyperv/vmbus: add a new method to get vcpu_id

  vcpu_id is host's representation of guest CPU.
  We get the mapping between vcpu_id and FreeBSD kernel's cpu id when VMBus
  driver is loaded. Later, when a driver, like the coming pcib driver, talks
  to the host and needs to refer to a guest CPU, the driver must use the
  vcpu_id.

  Reviewed by: jhb, sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8410

r308724
  hyperv/vmbus: add new vmbus methods to support PCIe pass-through

  The new methods will be used by the coming pcib driver.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8409

r308725
  hyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment)

  The feature enables us to pass through physical PCIe devices to FreeBSD VM
  running on Hyper-V (Windows Server 2016) to get near-native performance with
  low CPU utilization.

  The patch implements a PCI bridge driver to support the feature:

  1) The pcib driver talks to the host to discover device(s) and presents
  the device(s) to FreeBSD's pci driver via PCI configuration space (note:
  to access the configuration space, we don't use the standard I/O port
  0xCF8/CFC method; instead, we use an MMIO-based method supplied by Hyper-V,
  which is very similar to the 0xCF8/CFC method).

  2) The pcib driver allocates resources for the device(s) and initialize
  the related BARs, when the device driver's attach method is invoked;

  3) The pcib driver talks to the host to create MSI/MSI-X interrupt
  remapping between the guest and the host;

  4) The pcib driver supports device hot add/remove.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8332

r308793
  hyperv/pcib: Fix the build for some kernel configs

  Add the dependency on pci explicitly for the pcib and vmbus drivers.
  The related Makefiles are updated accordingly too.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

r308794
  hyperv/vmbus,pcib: Add MODULE_DEPEND on pci

  We'd better add this dependency explicitly, though usually the pci
  driver is built into the kernel by default.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

r308795
  hyperv/pcib: change the file name: pcib.c -> vmbus_pcib.c

  This makes the file name and the variable naming in the file consistent.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft

r309127
  hyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined

  vmbus_pcib requires NEW_PCIB, but in case that's not defined, we at
  least shouldn't break build.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
05:28:39 - r309311
(3 days 6 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
/head/sys/dev/hyperv/netvsc/if_hnvar.h
hyperv/hn: Allow multiple TX taskqueues.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8655
05:11:59 - r309310
(3 days 6 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Nuke the unused TX taskqueue CPU binding tunable.

It was an experimental tunable, and is now deemed to be road blocker
for further changes. Time to retire it.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8654
02:35:52 - r309309
(3 days 8 hours ago)
by jhibbits
Affects:  /head/sys/powerpc/powerpc/db_disasm.c
Bring the powerpc DDB disassembler into the 21st century

Bring in the most recent copy of NetBSD's db_disasm, to fix bugs and add more
instructions.

* Fix several bugs in the disassembler, most notably the disassembly of the
  rlwi* instructions, the original reason for bringing in this change.
* Add more registers to the SPR list
* Add more instructions to the opcode table

Obtained from: NetBSD
MFC after: 2 weeks
02:17:03 - r309308
(3 days 9 hours ago)
by mjg
Affects:  /head/sys/kern/vfs_lookup.c
vfs: fix a whitespace nit in r309307
02:14:53 - r309307
(3 days 9 hours ago)
by mjg
Affects:  /head/sys/kern/vfs_lookup.c
vfs: avoid VOP_ISLOCKED in the common case in lookup
02:00:30 - r309306
(3 days 9 hours ago)
by emaste
Affects:  /head/sys/dev/netmap/netmap_freebsd.c
netmap: add cast to fix powerpc64 LINT kernel

Attempt to fix powerpc64 LINT kernel broken by r308000. Netmap's use of
a uint64_t wchan seems odd, but in the interest of minimizing this
change just cast through uintptr_t to silence the compiler warning.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8669
01:41:40 - r309305
(3 days 9 hours ago)
by brooks
Affects: 
(2 files)
/stable/9/sbin/dhclient/dispatch.c
MFC r309027:

Allocate a struct ifreq rather than using a (wrong) computed size for
the BIOCSETIF ioctl.

The kernel always copies an entire struct ifreq and IPv4 addresses will
always fit in an ifreq.

On systems with pointers larger than 64-bits, the computed size will be
less than the size of struct ifreq, potentially resulting in the kernel
attempting to copyin memory from outside the allocation.

Reviewed by: jhb
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8445
01:22:12 - r309304
(3 days 10 hours ago)
by brooks
Affects: 
(2 files)
/stable/10/sbin/dhclient/dispatch.c
MFC r309027:

Allocate a struct ifreq rather than using a (wrong) computed size for
the BIOCSETIF ioctl.

The kernel always copies an entire struct ifreq and IPv4 addresses will
always fit in an ifreq.

On systems with pointers larger than 64-bits, the computed size will be
less than the size of struct ifreq, potentially resulting in the kernel
attempting to copyin memory from outside the allocation.

Reviewed by: jhb
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8445
01:17:02 - r309303
(3 days 10 hours ago)
by brooks
Affects: 
(2 files)
/stable/11/sbin/dhclient/dispatch.c
MFC r309027:

Allocate a struct ifreq rather than using a (wrong) computed size for
the BIOCSETIF ioctl.

The kernel always copies an entire struct ifreq and IPv4 addresses will
always fit in an ifreq.

On systems with pointers larger than 64-bits, the computed size will be
less than the size of struct ifreq, potentially resulting in the kernel
attempting to copyin memory from outside the allocation.

Reviewed by: jhb
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8445
00:26:35 - r309302
(3 days 11 hours ago)
by np
Affects: 
(19 files)
/head/sys/conf/files
/head/sys/dev/cxgbe/*
/head/sys/modules/cxgbe/*
cxgbe(4): Include firmware for T6 cards in the driver. Update all
firmwares to 1.16.12.0.

Obtained from: Chelsio Communications
MFC after: 3 days
Sponsored by: Chelsio Communications
00:21:57 - r309301
(3 days 11 hours ago)
by np
Affects:  /svnadmin/conf/sizelimit.conf
Raise my limit so that I can new firmwares to cxgbe(4).
2016 - 11 - 29   (4 days ago)
22:14:42 - r309300
(3 days 13 hours ago)
by mm
Affects: 
(20 files)
/head/contrib/libarchive/*
/head/lib/libarchive/tests/Makefile
MFV r309299:
Sync libarchive with vendor.

Important vendor bugfixes (relevant to FreeBSD):
#821: tar -P cannot extract hardlinks through symlinks
#825: Add sanity check of tar "uid, "gid" and "mtime" fields

PR: 213255
Reported by: Tijl Coosemans <tilj@FreeBSD.org>
MFC after: 1 week
21:53:16 - r309299
(3 days 13 hours ago)
by mm
Affects: 
(27 files)
/vendor/libarchive/dist/*
Update vendor/libarchive to git 256e52f073765a4ddad1e86fd4d0eda2a18147bf

Important vendor bugfixes (relevant to FreeBSD):
#821: tar -P cannot extract hardlinks through symlinks
#825: Add sanity check of tar "uid, "gid" and "mtime" fields
18:40:24 - r309298
(3 days 16 hours ago)
by emaste
Affects:  /head/lib/msun/arm/Symbol.map
/head/lib/msun/mips/Symbol.map
/head/lib/msun/riscv/Symbol.map
libm: remove duplicate version script entries

These symbols already appear in the common lib/msun/Symbol.map.
Duplicate entries produce an error with LLVM's LLD linker.

Reviewed by: br
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8627
13:48:36 - r309297
(3 days 21 hours ago)
by mav
Affects:  /head/sys/cam/scsi/scsi_enc_ses.c
Make SES status updates more aggressive.

 - On control request update all status pages, since they may also be
affected if user enables/disables enclosure slots.
 - Periodically update element descriptors too, since there is some
hardware where they are changed dynamically.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
13:32:23 - r309296
(3 days 21 hours ago)
by andrew
Affects:  /head/sys/arm64/arm64/mp_machdep.c
We only use the cpu0 variable in the FDT code.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
13:11:00 - r309295
(3 days 22 hours ago)
by avg
Affects:  /head/usr.sbin/bhyve/dbgport.c
bhyve: stability and performance improvement for dbgport

The TCP server implementation in dbgport does not track clients, so it
may try to write to a disconected socket resulting in SIGPIPE.
Avoid that by setting SO_NOSIGPIPE socket option.

Because dbgport emulates an I/O port to guest, the communication is done
byte by byte. Reduce latency of the TCP/IP transfers by using
TCP_NODELAY option. In my tests that change improves performance of
kgdb commands with lots of output (e.g. info threads) by two orders of
magnitude.

A general note. Since we have a uart emulation in bhyve, that can be
used for the console and gdb access to guests. So, bvmconsole and bvmdebug
could be de-orbited now. But there are many existing deployments that
still dependend on those.

Discussed with: julian, jhb
MFC after: 2 weeks
Sponsored by: Panzura
13:05:43 - r309294
(3 days 22 hours ago)
by kadesai
Affects:  /head/sys/dev/mrsas/mrsas.h
This patch upgrades driver version to 06.712.04.00-fbsd

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: Broadcom Limited/AVAGO Technologies
13:04:40 - r309293
(3 days 22 hours ago)
by kadesai
Affects:  /head/sys/dev/mrsas/mrsas.c
This patch will add code to refire IOCTL commands after OCR.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: Broadcom Limited/AVAGO Technologies
13:03:43 - r309292
(3 days 22 hours ago)
by kadesai
Affects:  /head/sys/dev/mrsas/mrsas.c
/head/sys/dev/mrsas/mrsas.h
/head/sys/dev/mrsas/mrsas_cam.c
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.
For Thunderbolt controller, keep the legacy behavior i.e. return the
SYNCHRONIZE_CACHE command with success status from driver itself.

There is Sysctl parameter 'block_sync_cache' is provided to enable customers
either to block/unblock these commands to facilitate
legacy behavior if there is a compatibility issue. Default value for module
parameter is to unblock this command.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: Broadcom Limited/AVAGO Technologies
13:02:48 - r309291
(3 days 22 hours ago)
by kadesai
Affects:  /head/sys/dev/mrsas/mrsas.c
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.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: Broadcom Limited/AVAGO Technologies
13:01:31 - r309290
(3 days 22 hours ago)
by kadesai
Affects:  /head/sys/dev/mrsas/mrsas.c
/head/sys/dev/mrsas/mrsas.h
/head/sys/dev/mrsas/mrsas_cam.c
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.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: Broadcom Limited/AVAGO Technologies
12:59:38 - r309289
(3 days 22 hours ago)
by kadesai
Affects:  /head/sys/dev/mrsas/mrsas.c
Process outstanding reply descriptors from all the reply descriptor post queues
before initiating OCR.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: Broadcom Limited/AVAGO Technologies
12:58:28 - r309288
(3 days 22 hours ago)
by kadesai
Affects:  /head/sys/dev/mrsas/mrsas.c
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.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: Broadcom Limited/AVAGO Technologies
12:56:53 - r309287
(3 days 22 hours ago)
by kadesai
Affects:  /head/sys/dev/mrsas/mrsas.c
/head/sys/dev/mrsas/mrsas.h
Update controller properties(read OCR capability bit) when
MR_EVT_CTRL_PROP_CHANGED recieved.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: Broadcom Limited/AVAGO Technologies
12:55:01 - r309286
(3 days 22 hours ago)
by kadesai
Affects:  /head/sys/dev/mrsas/mrsas.c
/head/sys/dev/mrsas/mrsas_cam.c
Add sanity check in IO and IOCTL path not to process command further if
controller is in
HW_CRITICAL_ERROR.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: Broadcom Limited/AVAGO Technologies
12:53:05 - r309285
(3 days 22 hours ago)
by kadesai
Affects: 
(4 files)
/head/sys/dev/mrsas/*
Use a variable to indicate Gen3 controllers and remove all PCI ids based
checks used for gen3 controllers.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: Broadcom Limited/AVAGO Technologies
12:49:20 - r309284
(3 days 22 hours ago)
by kadesai
Affects:  /head/sys/dev/mrsas/mrsas.c
/head/sys/dev/mrsas/mrsas.h
/head/sys/dev/mrsas/mrsas_cam.c
Problem statement:
MFI linked list in megaraid_sas driver is used for mfi-mpt pass-through
commands.
This list can be corrupted due to many possible race conditions in driver and
eventually we may see kernel panic.

One example -
MFI frame is freed from calling process as driver send command via polling
method and interrupt
for that command comes after driver free mfi frame (actually even after some
other context reuse
the mfi frame). When driver receive MPT frame in ISR, driver will be using the
index of MFI and
access that MFI frame and finally in-used MFI frames list will be corrupted.

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.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: Broadcom Limited/AVAGO Technologies
12:46:42 - r309283
(3 days 22 hours ago)
by andrew
Affects:  /head/sys/conf/files.arm64
Mark the Broadcom code as FDT only, there is no ACPI support for the
Raspberry Pi 3.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
11:13:43 - r309282
(4 days ago)
by mav
Affects:  /head/sys/cam/cam_xpt.c
/head/sys/cam/scsi/scsi_enc_ses.c
Explicitly initialize cdai.flags.

In SES driver uninitialized value caused unreliable physpath reporting.

MFC after: 1 week
Sponsored by: iXsystems, Inc.
10:43:58 - r309281
(4 days ago)
by oleg
Affects:  /head/sbin/ipfw/ipfw2.c
Fix 'ipfw delete set N':
do not emit meaningless 'rule 0 not found' warning if set was already empty.

MFC after: 1 week
08:20:55 - r309280
(4 days 3 hours ago)
by kib
Affects: 
(3 files)
/stable/11/sys/fs/nfsclient/nfs_clbio.c
/stable/11/sys/fs/nfsclient/nfs_clvnops.c
MFC r308980:
Use buffer pager for NFS.

MFC note: really do not, by default.
08:17:24 - r309279
(4 days 3 hours ago)
by kib
Affects: 
(3 files)
/stable/11/sys/fs/nfsclient/nfs_clbio.c
/stable/11/sys/fs/nfsclient/nfs_clvnops.c
MFC r308973:
Minor cleanup.
08:15:12 - r309278
(4 days 3 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/kern/vfs_bio.c
MFC r308969:
Restore vnode pager statistic for buffer pagers.
08:12:18 - r309277
(4 days 3 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/fs/udf/udf_vnops.c
MFC r308995:
Do not dereference bp after bread(9) on error.
04:32:14 - r309276
(4 days 6 hours ago)
by jchandra
Affects:  /head/sys/dev/uart/uart_dev_pl011.c
Fix interrupt clear in pl011 uart receive function

Clear the interrupt state before reading the input char from the
input FIFO. In the current code there is a window between the read
to the data register and the write to the the ICR, during which an
input char will not cause an interrupt.

This fixes the issue by which the serial port input on QEMU freezes
when using the emulated pl011 serial port.
01:08:09 - r309275
(4 days 10 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/lib/libc/gen/setproctitle.c
MFC r309006: remove unnecessary vm includes from setproctitle

vm headers were needed only for the PS_STRINGS fallback, which was
removed in r297888.
00:16:19 - r309274
(4 days 11 hours ago)
by jhb
Affects:  /head/include/stddef.h
Use the correct name for the GCC macro indicating max_align_t is defined.

MFC after: 3 days
2016 - 11 - 28   (5 days ago)
22:35:10 - r309273
(4 days 12 hours ago)
by asomers
Affects: 
(2 files)
/stable/11/sys/cam/scsi/scsi_xpt.c
MFC r308780

Fix "camcontrol rescan" with SATA drives behind a SAS controller

A bug in CAM's serial number hash logic resulted in SATA drives behind a SAS
controller getting removed and readded anytime the drive was rescanned for
any reason
22:19:41 - r309272
(4 days 13 hours ago)
by bapt
Affects: 
(2 files)
/stable/11/usr.sbin/syslogd/syslogd.c
MFC r309194, r309216

Properly initialize nextp

Reported by: Coverity via cem
MFC after: 2 days
CID: 1365665
21:29:01 - r309271
(4 days 14 hours ago)
by imp
Affects:  /head/tools/tools/nanobsd/nanobsd.sh
Trying to autodetect legacy setups lead to problems when people
overrode the disk image creation routine. For now, just always bring
in the legecy defines / routines.
21:16:03 - r309270
(4 days 14 hours ago)
by cognet
Affects:  /head/sys/contrib/ck/FREEBSD-Xlist
Add a FREEBSD-Xlist file for CK.
21:00:19 - r309269
(4 days 14 hours ago)
by des
Affects:  /head/lib/libutil/gr_util.c
/head/lib/libutil/pw_util.c
Use malloc()ed buffers instead of stack buffers in gr_copy() and pw_copy().
This allows pw(8) to operate on passwd and group files with longer lines
than could be accomodated by a stack buffer. It doesn't take more than a
few hundred users to exceed 8192 bytes in /etc/group.

MFC after: 3 weeks
Sponsored by: The University of Oslo
20:44:12 - r309268
(4 days 14 hours ago)
by cognet
Affects:  /head/sys/conf/files
Hook CK to the kernel build.
20:33:30 - r309267
(4 days 14 hours ago)
by cognet
Affects:  /head/sys/contrib/ck/include/ck_md.h
/head/sys/contrib/ck/include/ck_pr.h
/head/sys/contrib/ck/include/gcc/arm/ck_pr_armv4.h
Add FreeBSD-specific files.
20:27:58 - r309266
(4 days 15 hours ago)
by cognet
Affects:  /head/sys/contrib/ck
Import Concurrency Kit in the kernel.
CK is a toolkit providing different lockfree algorithms/data structures.
More information can be found here : www.concurrencykit.org
20:24:09 - r309265
(4 days 15 hours ago)
by cognet
Affects: 
(10 files)
/vendor-sys/ck/20161128/*
Re-tag ck as of commit 566bb28dba963a1904e0889b74fe7005a5bc5eb8
20:22:32 - r309264
(4 days 15 hours ago)
by cognet
Affects: 
(9 files)
/vendor-sys/ck/dist/*
Remove files that won't be used during FreeBSD build.
20:16:02 - r309263
(4 days 15 hours ago)
by dim
Affects: 
(45 files)
/projects/clang391-import/*
Merge ^/head r309213 through r309262.
20:13:56 - r309262
(4 days 15 hours ago)
by dim
Affects: 
(7 files)
/head/release/packages/*
/head/usr.bin/clang/*
Fix packaging for clang, lldb and lld 3.9.0

During the upgrade of clang/llvm etc to 3.9.0 in r309124, the PACKAGE
directive in the usr.bin/clang/*.mk files got dropped accidentally.

Restore it, with a few minor changes and additions:
* Correct license in clang.ucl to NCSA
* Add PACKAGE=clang for clang and most of the "ll" tools
* Put lldb in its own package
* Put lld in its own package

Reviewed by: gjb, jmallett
X-MFC-With: 309124
Differential Revision: https://reviews.freebsd.org/D8666
20:11:13 - r309261
(4 days 15 hours ago)
by cognet
Affects:  /vendor-sys/ck/20161128
Tag CK as of commit 566bb28dba963a1904e0889b74fe7005a5bc5eb8
20:08:52 - r309260
(4 days 15 hours ago)
by cognet
Affects: 
(543 files)
/vendor-sys/ck/dist/*
Import concurrencykit as of commit 566bb28dba963a1904e0889b74fe7005a5bc5eb8
18:58:31 - r309259
(4 days 16 hours ago)
by dim
Affects:  /projects/clang391-import/ObsoleteFiles.inc
Add obsolete files from r309212 to top-level ObsoleteFiles.inc.
18:36:37 - r309258
(4 days 16 hours ago)
by jhb
Affects: 
(6 files)
/stable/10/*
/stable/11/*
MFC 307756: Define max_align_t for C11.

libc++'s stddef.h includes an existing definition of max_align_t for
C++11, but it is only defined for C++, not for C. In addition, GCC and
clang both define an alternate version of max_align_t that uses a
union of multiple types rather than a plain long double as in libc++.
This adds a __max_align_t to <sys/_types.h> that matches the GCC and
clang definition that is mapped to max_align_t in <stddef.h>.

PR: 210890
17:55:32 - r309257
(4 days 17 hours ago)
by ae
Affects:  /head/sys/netinet/ip_fastfwd.c
Rework ip_tryforward() to use FIB4 KPI.

Tested by: olivier
Obtained from: Yandex LLC
MFC after: 1 month
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D8526
17:54:29 - r309256
(4 days 17 hours ago)
by adrian
Affects:  /head/sys/dev/ath/if_ath.c
/head/sys/dev/ath/if_ath_misc.h
[ath] force wake the hardware if we see a missed beacon.

This adds a workaround to incorrectly behaving APs (ie, FreeBSD APs) which
don't beacon out exactly when they should (at TBTT multiples of beacon
intervals.)

It forces the hardware awake (but leaves it in network-sleep so self
generated frames still state that the hardware is asleep!) and will
remain awake until the next sleep transition driven by net80211.

That way if the beacons are just at the wrong interval, we get a much
better chance of hearing more consecutive beacons before we go to sleep,
thus not constantly disconnecting.

Tested:

* AR9485, STA mode, against a misbehaving FreeBSD AP.
17:24:24 - r309255
(4 days 18 hours ago)
by hselasky
Affects: 
(2 files)
/stable/10/sys/dev/usb/net/if_smsc.c
MFC r308730:
Make sure MAC address is reprogrammed when if_init() callback is
invoked. Else promiscious mode must be used to pass traffic. While at
it fix a debug print macro.
17:22:45 - r309254
(4 days 18 hours ago)
by hselasky
Affects: 
(2 files)
/stable/11/sys/dev/usb/net/if_smsc.c
MFC r308730:
Make sure MAC address is reprogrammed when if_init() callback is
invoked. Else promiscious mode must be used to pass traffic. While at
it fix a debug print macro.
17:06:35 - r309253
(4 days 18 hours ago)
by adrian
Affects:  /head/sys/dev/ath/if_ath_beacon.c
[ath] revert the previous commit, after reading the 802.11-2012 spec a bit more.

The 802.11-2012 spec talks about this - section 10.1.3.2 - Beacon Generation
in Infrastructure Networks. So yes, we should be expecting beacons to be
going out in multiples of intval.

Silly adrian.

So:

* fix the FreeBSD APs that are sending beacons at incorrect TBTTs (target
  beacon transmit time); and
* yes indeed we will have to wake up out of network sleep until we sync
  a beacon.
16:25:05 - r309252
(4 days 19 hours ago)
by mav
Affects:  /head/sys/dev/ahci/ahci_pci.c
Add more ASMedia PCI IDs from different sources.

Exact device names are not clear, but its better then nothing at all.

MFC after: 1 month
16:23:32 - r309251
(4 days 19 hours ago)
by mav
Affects:  /head/sys/dev/ahci/ahci.c
Process port interrupt even is PxIS register is zero.

ASMedia ASM1062 AHCI chips with some fancy firmware handling PMP inside
seems sometimes forgeting to set bits in PxIS, causing command timeouts.
Removal of this check fixes the issue by the theoretical cost of slightly
higher CPU usage in some odd cases, but this is what Linux does too.

MFC after: 1 month
15:14:31 - r309250
(4 days 20 hours ago)
by avg
Affects: 
(4 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
MFV r309249: 3821 Race in rollback, zil close, and zil flush

Note: there was a merge conflict resolved by me.

illumos/illumos-gate@43297f973a3543e7403ac27076490ab958a94b15
https://github.com/illumos/illumos-gate/commit/43297f973a3543e7403ac27076490ab958a94b15

https://www.illumos.org/issues/3821
  We recently had nodes with some of the latest zfs bits panic on us in a
  rollback-heavy environment. The following is from my preliminary analysis:
  Let's look at where we died:
  > $C
  ffffff01ea6b9a10 taskq_dispatch+0x3a(0, fffffffff7d20450, ffffff5551dea920, 1)
  ffffff01ea6b9a60 zil_clean+0xce(ffffff4b7106c080, 7e0f1)
  ffffff01ea6b9aa0 dsl_pool_sync_done+0x47(ffffff4313065680, 7e0f1)
  ffffff01ea6b9b70 spa_sync+0x55f(ffffff4310c1d040, 7e0f1)
  ffffff01ea6b9c20 txg_sync_thread+0x20f(ffffff4313065680)
  ffffff01ea6b9c30 thread_start+8()
  If we dig in we can find that this dataset corresponds to a zone:
  > ffffff4b7106c080::print zilog_t zl_os->os_dsl_dataset->ds_dir->dd_myname
  zl_os->os_dsl_dataset->ds_dir->dd_myname = [ "8ffce16a-13c2-4efa-a233-
  9e378e89877b" ]
  Okay so we have a null taskq pointer. That only happens during the calls to
  zil_open and zil_close. If we poke around we can see that we're actually in
  midst of a rollback:
  > ::pgrep zfs | ::printf "0x%x %s\\n" proc_t . p_user.u_psargs
  0xffffff43262800a0 zfs rollback zones/15714eb6-f5ea-469f-ac6d-
  4b8ab06213c2@marlin_init
  0xffffff54e22a1028 zfs rollback zones/8ffce16a-13c2-4efa-a233-
  9e378e89877b@marlin_init
  0xffffff4362f3a058 zfs rollback zones/0ddb8e49-ca7e-42e1-8fdc-
  4ac4ba8fe9f8@marlin_init
  0xffffff5748e8d020 zfs rollback zones/426357b5-832d-4430-953e-
  10cd45ff8e9f@marlin_init
  0xffffff436b867008 zfs rollback zones/8f36bf37-8a9c-4a44-995c-
  6d1b2751e6f5@marlin_init
  0xffffff4381ad4090 zfs rollback zones/6c8eca18-fbd6-46dd-ac24-
  2ed45cd0da70@marlin_init

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: George Wilson <george.wilson@delphix.com>

MFC after: 3 weeks
15:09:58 - r309249
(4 days 20 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c
/vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
/vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c
3821 Race in rollback, zil close, and zil flush

illumos/illumos-gate@43297f973a3543e7403ac27076490ab958a94b15
https://github.com/illumos/illumos-gate/commit/43297f973a3543e7403ac27076490ab958a94b15

https://www.illumos.org/issues/3821
  We recently had nodes with some of the latest zfs bits panic on us in a
  rollback-heavy environment. The following is from my preliminary analysis:
  Let's look at where we died:
  > $C
  ffffff01ea6b9a10 taskq_dispatch+0x3a(0, fffffffff7d20450, ffffff5551dea920, 1)
  ffffff01ea6b9a60 zil_clean+0xce(ffffff4b7106c080, 7e0f1)
  ffffff01ea6b9aa0 dsl_pool_sync_done+0x47(ffffff4313065680, 7e0f1)
  ffffff01ea6b9b70 spa_sync+0x55f(ffffff4310c1d040, 7e0f1)
  ffffff01ea6b9c20 txg_sync_thread+0x20f(ffffff4313065680)
  ffffff01ea6b9c30 thread_start+8()
  If we dig in we can find that this dataset corresponds to a zone:
  > ffffff4b7106c080::print zilog_t zl_os->os_dsl_dataset->ds_dir->dd_myname
  zl_os->os_dsl_dataset->ds_dir->dd_myname = [ "8ffce16a-13c2-4efa-a233-
  9e378e89877b" ]
  Okay so we have a null taskq pointer. That only happens during the calls to
  zil_open and zil_close. If we poke around we can see that we're actually in
  midst of a rollback:
  > ::pgrep zfs | ::printf "0x%x %s\\n" proc_t . p_user.u_psargs
  0xffffff43262800a0 zfs rollback zones/15714eb6-f5ea-469f-ac6d-
  4b8ab06213c2@marlin_init
  0xffffff54e22a1028 zfs rollback zones/8ffce16a-13c2-4efa-a233-
  9e378e89877b@marlin_init
  0xffffff4362f3a058 zfs rollback zones/0ddb8e49-ca7e-42e1-8fdc-
  4ac4ba8fe9f8@marlin_init
  0xffffff5748e8d020 zfs rollback zones/426357b5-832d-4430-953e-
  10cd45ff8e9f@marlin_init
  0xffffff436b867008 zfs rollback zones/8f36bf37-8a9c-4a44-995c-
  6d1b2751e6f5@marlin_init
  0xffffff4381ad4090 zfs rollback zones/6c8eca18-fbd6-46dd-ac24-
  2ed45cd0da70@marlin_init

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: George Wilson <george.wilson@delphix.com>
14:24:07 - r309248
(4 days 21 hours ago)
by andrew
Affects:  /head/sys/arm64/include/armreg.h
Fix ISS_DATA_DFSC_MASK, it should include all bits in the field.
11:14:38 - r309247
(5 days ago)
by ae
Affects:  /projects/ipsec/sys/netipsec/key.c
Do not report success, when policy was not deleted in SADB_SPDDELETE2.
08:13:20 - r309246
(5 days 3 hours ago)
by adrian
Affects:  /head/sys/dev/ath/if_ath_tx_edma.c
[ath] wake up the hardware from power-save before doing transmit completion
checking.

This was being done in the pre-AR9380 case, but not for AR9380 and later.
When powersave in STA mode is enabled, this may have lead to the transmit
completion code doing this:

* call the task, which doesn't wake up the hardware
* complete the frames, which doesn't touch the hardware
* schedule pending frames on the hardware queue, which DOES touch the
  hardware, and this will be ignored

This would show up in the logs like this:

(with debugging enabled):
Nov 27 23:03:56 lovelace kernel: Q1[ 0] (nseg=1) (DS.V:0xfffffe011bd57300
DS.P:0x49b57300) I: 168cc117 L:00000000 F:0005
...
(in general, doesn't require debugging enabled):
Nov 27 23:03:56 lovelace kernel: ath_hal_reg_write: reg=0x00000804,
val=0x49b57300, pm=2

That register is a EDMA TX FIFO register (queue 1), and the val is the
descriptor
being written.

Whilst here, make sure the software queue gets kicked here.

Tested;

* AR9485, STA mode + powersave
07:56:03 - r309245
(5 days 3 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/vmbus/vmbus_chan.c
hyperv/vmbus: Use poll/cancel APIs to wait for the CHOPEN response.

Since hypervisor does not respond CHOPEN to a revoked channel.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8636
07:44:50 - r309244
(5 days 3 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/vmbus/vmbus.c
/head/sys/dev/hyperv/vmbus/vmbus_var.h
hyperv/vmbus: Add exec cancel support for message Hypercall API.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8635
07:41:01 - r309243
(5 days 3 hours ago)
by delphij
Affects:  /head/usr.sbin/ctld/ctld.c
Plug another leak with malformed IPv6 address.

MFC after: 2 weeks
07:36:51 - r309242
(5 days 3 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/vmbus/vmbus.c
/head/sys/dev/hyperv/vmbus/vmbus_var.h
hyperv/vmbus: Add result polling support for message Hypercall API.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8634
07:33:26 - r309241
(5 days 3 hours ago)
by delphij
Affects:  /head/usr.sbin/ctld/ctld.c
Don't leak 'str' when we see a malformed IPv6 address.

MFC after: 2 weeks
07:27:08 - r309240
(5 days 4 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/include/vmbus_xact.h
/head/sys/dev/hyperv/vmbus/vmbus_xact.c
hyperv/vmbus: Add result polling support for xact API.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8633
07:21:09 - r309239
(5 days 4 hours ago)
by delphij
Affects:  /head/bin/kenv/kenv.c
style(9).

MFC after: 2 weeks
07:19:45 - r309238
(5 days 4 hours ago)
by delphij
Affects:  /head/bin/kenv/kenv.c
Plug a potential memory leak.

MFC after: 2 weeks
07:04:32 - r309237
(5 days 4 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/vmbus/vmbus_chan.c
hyperv/vmbus: Stringent GPADL parameter assertion.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8632
06:53:00 - r309236
(5 days 4 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/vmbus/vmbus.c
hyperv/vmbus: Make sure that the allocated GPADL is not zero.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8631
06:40:26 - r309235
(5 days 4 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Simplify RSS indirect table fixup API

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8630
06:38:41 - r309234
(5 days 4 hours ago)
by delphij
Affects:  /head/usr.bin/sort/sort.c
pages and psize are always assigned, so there is no need to initialize
them as zero.

MFC after: 2 weeks
06:36:10 - r309233
(5 days 4 hours ago)
by delphij
Affects:  /head/usr.bin/sort/bwstring.c
/head/usr.bin/sort/sort.c
Eliminate variables that are computed, assigned but never
used.

MFC after: 2 weeks
06:32:05 - r309232
(5 days 4 hours ago)
by delphij
Affects:  /head/usr.bin/sort/sort.c
Fix an obvious typo.

MFC after: 2 weeks
06:10:41 - r309231
(5 days 5 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Fix vmbus_chan_subidx usage.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8629
05:54:20 - r309230
(5 days 5 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Enable multi-packet RNDIS message support by default.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8621
05:46:00 - r309229
(5 days 5 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/hn_nvs.c
/head/sys/dev/hyperv/netvsc/hn_rndis.c
/head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Fix attach error handling

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8620
05:31:36 - r309228
(5 days 5 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Fix multi-packet RNDIS message aggregation size setting.

Just in case that no chimney sending buffer can be used.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8619
05:23:57 - r309227
(5 days 6 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/hn_nvs.c
/head/sys/dev/hyperv/netvsc/if_hn.c
/head/sys/dev/hyperv/netvsc/if_hnvar.h
hyperv/hn: Fix detach error handling.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8613
05:15:28 - r309226
(5 days 6 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/hn_nvs.c
/head/sys/dev/hyperv/netvsc/hn_rndis.c
hyperv/hn: Utilize vmbus_chan_xact_wait

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8612
05:07:48 - r309225
(5 days 6 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/include/vmbus.h
/head/sys/dev/hyperv/vmbus/vmbus_chan.c
hyperv/vmbus: Add supportive transaction wait function.

This function supports channel revocation properly.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8611
04:53:36 - r309224
(5 days 6 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/vmbus/vmbus_chan.c
hyperv/vmbus: Zero out GPADL if error happens.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8601
02:59:33 - r309223
(5 days 8 hours ago)
by adrian
Affects:  /head/sys/dev/ath/if_ath_beacon.c
[ath] fix target beacon interval programming for STA mode when in powersave.

This bug has been bugging me for quite some time. I finally sat down
with enough coffee to figure it out.

The short of it - rounding up to the next intval multiple of the TSF value
only works if the AP is transmitting all its beacons on an interval of
the TSF. If it isn't - for example, doing staggered beacons on a multi-VAP
setup with a single hardware TSF - then weird things occur.

The long of it -

When powersave is enabled, the MAC and PHY are partially powered off.
They can't receive any packets (or transmit, for that matter.)
The target beacon timer programming will wake up the MAC/PHY just before
the beacon is supposed to be received (well, strictly speaking, at DTIM
so it can see the TIM - traffic information map - telling the STA whether
any traffic is there for it) and it happens automatically.

However, this relies on the target beacon time being programmed correctly.
If it isn't then the hardware will wake up and not hear any beacons -
and then it'll be asleep for said beacons. After enough of this, net80211
will give up and assume the AP went away.

This should fix both TSFOOR interrupts and disconnects from APs with powersave
enabled.

The annoying bit is that it only happens if APs stagger things or start
on a non-zero TSF. So, this would sometimes be fine and sometimes not be
fine.

What:

* I don't know (yet) why the code rounds up to the next intval.
  For now, just disable rounding it and trust the value we get.

TODO:

* If we do see a beacon miss in STA mode then we should transition
  out of sleep for a while so we can hear beacons to resync against.
  I'd love a patch from someone to enable that particular behaviour.
  Note - that doesn't require that net80211 brings the chip out of
  sleep state - only that we wake the chip up through to full-on and
  then let it go to sleep again when we've seen a beacon. The wifi
  stack and AP can still completely just stay believing we're in sleep
  mode.

Tested:

* AR9485, STA mode, powersave enabled

MFC after: 1 week
Relnotes: Yes
02:51:55 - r309222
(5 days 8 hours ago)
by adrian
Affects:  /head/sys/dev/ath/if_ath_rx.c
[ath] include logging of TU versions of the TSF values.

The beacon programming side of things deals in TUs and 1/8th TUs, so
it's good to se the TU value here when debugging beaconing issues.
2016 - 11 - 27   (6 days ago)
20:52:52 - r309221
(5 days 14 hours ago)
by hselasky
Affects: 
(6238 files)
/projects/hps_head/*
Merge ^/head r308093 through r309218.
20:38:14 - r309220
(5 days 14 hours ago)
by pfg
Affects:  /head/usr.bin/indent/indent.c
/head/usr.bin/indent/indent_codes.h
/head/usr.bin/indent/lexi.c
indent(1): Properly handle the wide string literal and wide char constant L.

indent(1) treated the "L" in "L'a'" as if it were an identifier and forced
a space character after it, breaking valid code.

PR: 143090
MFC after: 2 weeks
20:30:09 - r309219
(5 days 15 hours ago)
by pfg
Affects:  /head/usr.bin/indent/pr_comment.c
indent(1): fix regression introduced in r303596.

Multi-line comments are always block comments in KNF. Restore properly,
handling the case when a long one-liner gets wrapped and becomes a
multi-line comment.

Obtained from: Piotr Stefaniak
20:21:38 - r309218
(5 days 15 hours ago)
by hselasky
Affects: 
(16 files)
/projects/hps_head/sys/*
Define the callout return values clear and readable so that simple
mistakes cannot be made when writing new code. Return a 32-bit union
instead of "int" to ensure all use of the return values for callout
functions is properly evaluated. Else a compilation error will result.
20:11:55 - r309217
(5 days 15 hours ago)
by pfg
Affects:  /head/usr.bin/indent/parse.c
indent(1): minor off-by-one error.

This was introduced in r303571.

Obtianed from: Piotr Stefaniak
19:27:13 - r309216
(5 days 16 hours ago)
by bapt
Affects:  /head/usr.sbin/syslogd/syslogd.c
Properly initialize nextp

MFC after: 1 day
18:34:29 - r309215
(5 days 16 hours ago)
by adrian
Affects:  /head/sys/dev/ath/if_ath_ioctl.c
/head/sys/dev/ath/if_athioctl.h
[ath] Begin to lay the groundwork for btcoex related ioctl controls.
18:06:03 - r309214
(5 days 17 hours ago)
by avos
Affects:  /head/sys/dev/usb/wlan/if_rsu.c
/head/sys/dev/usb/wlan/if_rsureg.h
rsu: add support for hardware multicast filter setup.

The algorithm is the same as in rtwn(4).

Tested with Asus USB-N10 (STA) + RTL8188CUS (AP).
14:27:51 - r309213
(5 days 21 hours ago)
by dim
Affects: 
(84 files)
/projects/clang391-import/*
Merge ^/head r309170 through r309212.
14:19:19 - r309212
(5 days 21 hours ago)
by dim
Affects:  /head/tools/build/mk/OptionalObsoleteFiles.inc
Add a few missed clang 3.9.0 files to OptionalObsoleteFiles.

X-MFC-With: 309149
12:04:54 - r309211
(5 days 23 hours ago)
by hselasky
Affects:  /head/sys/dev/usb/usb_process.c
Fix spelling.
12:03:35 - r309210
(5 days 23 hours ago)
by avos
Affects:  /head/sys/dev/usb/wlan/if_rsu.c
/head/sys/dev/usb/wlan/if_rsureg.h
rsu: various scanning fixes.

- Set IEEE80211_FEXT_SCAN_OFFLOAD flag; firmware can send null data
frames when associated.
- Check IEEE80211_SCAN_ACTIVE scan flag instead of IEEE80211_F_ASCAN
ic flag; the last is never set since r170530.
- Eliminate software scan (net80211) <-> site_survey (driver) race:
 * override ic_scan_curchan and ic_scan_mindwell pointers so net80211
will not try to finish scanning automatically;
 * inform net80211 about current status via ieee80211_cancel_scan()
and ieee80211_scan_done();
 * remove corresponding workaround from rsu_join_bss().

Now the driver can associate to an AP with hidden SSID.

Tested with Asus USB-N10.
09:20:58 - r309209
(6 days 2 hours ago)
by kib
Affects:  /head/sys/fs/nfsclient/nfs_clvfsops.c
/head/sys/fs/nullfs/null_vfsops.c
/head/sys/sys/mount.h
NFSv4 client tracks opens, and the track records are only dropped when
the vnode is inactivated. This contradicts with the nullfs caching
which keeps upper vnode around, as consequence keeping the use
reference to lower vnode.

Add a filesystem flag to request nullfs to not cache when mounted over
that filesystem, and set the flag for nfs v4 mounts.

Reported by: asomers
Reviewed by: rmacklem
Tested by: asomers, rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
09:14:52 - r309208
(6 days 2 hours ago)
by kib
Affects: 
(3 files)
/stable/10/sys/kern/vfs_mount.c
/stable/10/sys/ufs/ffs/ffs_vfsops.c
MFC r308618:
Provide simple mutual exclusion between mount point update and unmount.
In the update path in ffs_mount(), drop vfs_busy() reference around namei().
09:10:33 - r309207
(6 days 2 hours ago)
by kib
Affects: 
(3 files)
/stable/11/sys/kern/vfs_mount.c
/stable/11/sys/ufs/ffs/ffs_vfsops.c
MFC r308618:
Provide simple mutual exclusion between mount point update and unmount.
In the update path in ffs_mount(), drop vfs_busy() reference around namei().
05:59:17 - r309206
(6 days 5 hours ago)
by mav
Affects: 
(3 files)
/stable/10/sys/geom/mirror/g_mirror.c
/stable/10/sys/geom/mirror/g_mirror.h
MFC r308608:
Use providergone method to cover race between destroy and g_access().
05:58:47 - r309205
(6 days 5 hours ago)
by mav
Affects: 
(3 files)
/stable/11/sys/geom/mirror/g_mirror.c
/stable/11/sys/geom/mirror/g_mirror.h
MFC r308608:
Use providergone method to cover race between destroy and g_access().
01:44:31 - r309204
(6 days 9 hours ago)
by alc
Affects:  /head/ObsoleteFiles.inc
/head/share/man/man9/Makefile
/head/share/man/man9/vm_page_cache.9
The function vm_page_cache() no longer exists. Remove its man page.
01:42:53 - r309203
(6 days 9 hours ago)
by alc
Affects:  /head/sys/vm/vm_page.c
Recursion on the free page queue mutex occurred when UMA needed to allocate
a new page of radix trie nodes to complete a vm_radix_insert() operation
that was requested by vm_page_cache(). Specifically, vm_page_cache()
already held the free page queue lock when UMA tried to acquire it through
a call to vm_page_alloc(). This code path no longer exists, so there is no
longer any reason to allow recursion on the free page queue mutex.

Improve nearby comments.

Reviewed by: kib, markj
Tested by: pho
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8628

 


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

Page generated in 39 ms, 276 revisions printed. Current time is 2016-12-03 11:31:02. All times are in UTC/GMT.