]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agoiwlwifi: add man pages
Bjoern A. Zeeb [Mon, 27 Dec 2021 17:40:02 +0000 (17:40 +0000)]
iwlwifi: add man pages

Add and hook up man pages for iwlwifi and iwlwififw and install a copy
of the firmware license to /usr/share/docs/legal so it will always be
shipped with the installed system.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agoiwlwifi: turn off broadcast filtering for now
Bjoern A. Zeeb [Mon, 27 Dec 2021 17:37:41 +0000 (17:37 +0000)]
iwlwifi: turn off broadcast filtering for now

Turn off broadcast filtering in iwlwifi for now as it gives me
or rather the firmware headaches.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agoiwlwifi: also depend on linuxkpi_wlan
Bjoern A. Zeeb [Mon, 27 Dec 2021 17:36:04 +0000 (17:36 +0000)]
iwlwifi: also depend on linuxkpi_wlan

The 802.11 compat code is split off linuxkpi.ko into linuxkpi_wlan.ko
in case it is built as a module.  Depend on that.
While here adjust our module to a longer version to avoid conflicts.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agoiwlwifi: remove copyright and license from Makefiles
Bjoern A. Zeeb [Mon, 27 Dec 2021 17:34:40 +0000 (17:34 +0000)]
iwlwifi: remove copyright and license from Makefiles

We do not generally protect the Makefiles like this.
Remove the details and go with project style.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
X-MFC with: bfcc09ddd422c95a1a2e4e794b63ee54c4902398
X-MFC with: f4c129f5fb1669b284d76a838b1e509f97c2d299

2 years agoLinuxKPI: add 802.11 compat code
Bjoern A. Zeeb [Sun, 26 Dec 2021 18:52:51 +0000 (18:52 +0000)]
LinuxKPI: add 802.11 compat code

Add 802.11 compat code for mac80211 and to a minimal degree cfg80211.
This allows us to compile and use basic functionality of wireless
drivers such as iwlwifi.

This is a constant work in progress but having it in the tree will
allow others to test and more easy to track changes and avoid having
snapshots no longer applying to branches.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agoLinuxKPI: import beginning of a new version of netdevice.h
Bjoern A. Zeeb [Sun, 26 Dec 2021 18:29:29 +0000 (18:29 +0000)]
LinuxKPI: import beginning of a new version of netdevice.h

Import a netdevice update complementing the last remaining bits of
the old ifnet derived implementation.  Along add a (for now) task
based NAPI implementation.

This is the minimal set of chnages which are needed for the initial
support of wireless drivers.  The NAPI implementation has an option to
still switch to "direct dispatch" as it had been used by these drivers
before not relying on a deferred context along with some printf tracing.
This has been helpful in the last weeks for debugging and will be
cleaned once we have had broader testing and are sure this is fine as-is.
Should we need a more time-sensitive or load-sensitive response
in the future we can always switch to something more sophisticated.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
X-Differential Revision: D33075 (abandoned without feedback a while ago)

2 years agoLinuxKPI: add a work-in-progress skbuff implementation
Bjoern A. Zeeb [Sun, 26 Dec 2021 18:26:26 +0000 (18:26 +0000)]
LinuxKPI: add a work-in-progress skbuff implementation

This is a work-in-progress implementation of sk_buff compat code
used for wireless drivers only currently.
Bring in this version of the code as it has proven to be good enough
to have packets going for a few months.

The current implementation has several drawbacks including the need
for us to copy data between sk_buffs and mbufs.
Do not rely on the internals of this implementation.  They are highly
likely to change as we will improve the integration to FreeBSD mbufs.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agotcp_usr_rcvd: don't cast inp_ppcb to tcpcb before checking inp_flags
Gleb Smirnoff [Mon, 27 Dec 2021 18:41:51 +0000 (10:41 -0800)]
tcp_usr_rcvd: don't cast inp_ppcb to tcpcb before checking inp_flags

Fixes: f64dc2ab5be38e5366271ef85ea90d8cb1c7841a

2 years agoarm64: Fix "set-but-not-used" warnings in the pmap
Alan Cox [Mon, 27 Dec 2021 17:37:04 +0000 (11:37 -0600)]
arm64: Fix "set-but-not-used" warnings in the pmap

MFC after: 1 week

2 years agosctp: cleanup, on functional change intended.
Michael Tuexen [Mon, 27 Dec 2021 17:28:44 +0000 (18:28 +0100)]
sctp: cleanup, on functional change intended.

MFC after: 3 days

2 years agosctp: apply limit for socket buffers as indicated in comment
Michael Tuexen [Mon, 27 Dec 2021 17:15:29 +0000 (18:15 +0100)]
sctp: apply limit for socket buffers as indicated in comment

MFC after: 3 days

2 years agonfscommon: Return NFSERR_ATTRNOTSUPP for AUDIT/ALARM ACEs
Rick Macklem [Mon, 27 Dec 2021 16:03:41 +0000 (08:03 -0800)]
nfscommon: Return NFSERR_ATTRNOTSUPP for AUDIT/ALARM ACEs

FreeBSD only supports Allow/Deny ACEs in NFSv4 ACLs.
As such, it does not make sense to parse Audit/Alarm
ACEs.  Modify nfsrv_dissectace() so that it returns
NFSERR_ATTRNOTSUPP if an Audit/Alarm ACE is found in
the ACL being parsed.  The code has been #ifdef notnow'd,
since Audit/Alarm ACEs might be supported someday.

This should not have significant impact, since FreeBSD
reports to clients that only Allow/Deny ACEs are
supported and an attempt to set one would have failed
anyhow.

MFC after: 2 weeks

2 years agokldxref: add R_PPC64_ADDR64 handler
Alfredo Dal'Ava Junior [Mon, 27 Dec 2021 18:29:50 +0000 (15:29 -0300)]
kldxref: add R_PPC64_ADDR64 handler

Implements R_PPC64_ADDR64 handler for kldxref, addressing
"kldxref: unhandled relocation type 38" when running
"kldxref /boot/kernel"

Reviewed by: jhibbits
MFC after: 1 week
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D33615

2 years agotests/libalias: Portrange
Lutz Donnerhacke [Sat, 3 Jul 2021 22:28:20 +0000 (00:28 +0200)]
tests/libalias: Portrange

Test ranges of allowed ports for aliasing.
 - Explicit default like ipfw(8) is doing
 - Regular range
 - Exhausting a very small range
 - Recovery

Includes a fix of an utility macro, which was not used before.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31012

2 years agoipfilter userland: Revert the ipmon part of a6fb9bbea731
Cy Schubert [Mon, 27 Dec 2021 09:10:52 +0000 (01:10 -0800)]
ipfilter userland: Revert the ipmon part of a6fb9bbea731

a6fb9bbea731 caused incorrect formatting of ipmon log output.

Fixes: a6fb9bbea7318e993dfe0f8a7f00821f79850b26
MFC after: immediately

2 years agoipfilter userland: Path fixup no longer required
Cy Schubert [Mon, 27 Dec 2021 08:18:49 +0000 (00:18 -0800)]
ipfilter userland: Path fixup no longer required

Since the move of ipfilter from contrib to sbin adjusting the source path
is no longer required.

Fixes: 41edb306f05651fcaf6c74f9e3557f59f80292e1
MFC after: 1 month

2 years agokern: Remove CTLFLAG_NEEDGIANT from some more sysctls.
Alexander Motin [Mon, 27 Dec 2021 04:07:33 +0000 (23:07 -0500)]
kern: Remove CTLFLAG_NEEDGIANT from some more sysctls.

MFC after: 2 weeks

2 years agosound: Remove CTLFLAG_NEEDGIANT from some sysctls.
Alexander Motin [Mon, 27 Dec 2021 01:37:55 +0000 (20:37 -0500)]
sound: Remove CTLFLAG_NEEDGIANT from some sysctls.

While there, remove some dead code.

MFC after: 2 weeks

2 years agonfscommon: Add arguments for support of the dacl attribute
Rick Macklem [Mon, 27 Dec 2021 00:37:02 +0000 (16:37 -0800)]
nfscommon: Add arguments for support of the dacl attribute

NFSv4.1/4.2 has an alternative to the acl attribute, called
dacl, that includes support for the ACL_ENTRY_INHERITED flag,
called NFSV4ACE_INHERITED in NFSv4.

This patch adds a dacl argument to nfsrv_buildacl(),
nfsrv_dissectacl() and nfsrv_dissectace(), so that they
will handle NFSV4ACE_INHERITED when dacl == true.

Since these functions are always called with dacl == false
for this patch, semantics should not have changed.
A future patch will add support for dacl.

MFC after: 2 weeks

2 years agonetgraph: Remove CTLFLAG_NEEDGIANT from sysctl.
Alexander Motin [Mon, 27 Dec 2021 00:42:53 +0000 (19:42 -0500)]
netgraph: Remove CTLFLAG_NEEDGIANT from sysctl.

MFC after: 2 weeks

2 years agoacpi_support: Remove CTLFLAG_NEEDGIANT from sysctls.
Alexander Motin [Mon, 27 Dec 2021 00:37:08 +0000 (19:37 -0500)]
acpi_support: Remove CTLFLAG_NEEDGIANT from sysctls.

MFC after: 2 weeks

2 years agoacpica: Remove CTLFLAG_NEEDGIANT from most sysctls.
Alexander Motin [Mon, 27 Dec 2021 00:17:52 +0000 (19:17 -0500)]
acpica: Remove CTLFLAG_NEEDGIANT from most sysctls.

MFC after: 2 weeks

2 years agoclk: rename clknode_try_freq to clknode_test_freq
Adrian Chadd [Sun, 26 Dec 2021 14:16:02 +0000 (06:16 -0800)]
clk: rename clknode_try_freq to clknode_test_freq

This brings it in line with what the clk_*_freq routines are named.

2 years agoin_pcb: use jenkins hash over the entire IPv6 (or IPv4) address
Gleb Smirnoff [Sun, 26 Dec 2021 18:47:28 +0000 (10:47 -0800)]
in_pcb: use jenkins hash over the entire IPv6 (or IPv4) address

The intent is to provide more entropy than can be provided
by just the 32-bits of the IPv6 address which overlaps with
6to4 tunnels.  This is needed to mitigate potential algorithmic
complexity attacks from attackers who can control large
numbers of IPv6 addresses.

Together with: gallatin
Reviewed by: dwmalone, rscheff
Differential revision: https://reviews.freebsd.org/D33254

2 years agojail: network epoch protection for IP address lists
Gleb Smirnoff [Sun, 26 Dec 2021 18:45:50 +0000 (10:45 -0800)]
jail: network epoch protection for IP address lists

Now struct prison has two pointers (IPv4 and IPv6) of struct
prison_ip type.  Each points into epoch context, address count
and variable size array of addresses.  These structures are
freed with network epoch deferred free and are not edited in
place, instead a new structure is allocated and set.

While here, the change also generalizes a lot (but not enough)
of IPv4 and IPv6 processing. E.g. address family agnostic helpers
for kern_jail_set() are provided, that reduce v4-v6 copy-paste.

The fast-path prison_check_ip[46]_locked() is also generalized
into prison_ip_check() that can be executed with network epoch
protection only.

Reviewed by: jamie
Differential revision: https://reviews.freebsd.org/D33339

2 years agoclk: add call for nodes to get the programmed/decided frequency passed back
Adrian Chadd [Tue, 14 Dec 2021 18:01:08 +0000 (10:01 -0800)]
clk: add call for nodes to get the programmed/decided frequency passed back

Summary:

The existing call can only really be used for a node wishing to
configure its parent, but as we don't pass in a pointer to the freq,
we can't set it to what it would be for a DRY_RUN pass.

So for clock nodes that wish to try setting parent frequencies to see
which would be the best for its own target frequency, we really do need
a way to call in and pass in a flag /and/ a pointer to freq so it can be
updated for us as the clock tree is recursed through.

Reviewers: manu

Approved by: manu

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D33445

2 years agovm_reserv: fix zero-boundary error
Doug Moore [Sun, 26 Dec 2021 17:40:27 +0000 (11:40 -0600)]
vm_reserv: fix zero-boundary error

Handle specially the boundary==0 case of vm_reserv_reclaim_config,
by turning off boundary adjustment in that case.

Reviewed by: alc
Tested by: pho, madpilot

2 years agonet80211: adjust a printf to toeee80211_note
Bjoern A. Zeeb [Sun, 26 Dec 2021 17:26:58 +0000 (17:26 +0000)]
net80211: adjust a printf to toeee80211_note

Throughout net80211 there are multiple ways to log (debugging)
information.  Start to clenaup one as I kept hitting it to harmonize
the output.  The more we get away from printfs into either wrapper
functions or macros the more likely we can use holistic systematic
tracing in the future.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agonet80211: add debugging information
Bjoern A. Zeeb [Sun, 26 Dec 2021 17:25:57 +0000 (17:25 +0000)]
net80211: add debugging information

Add more STATE / DEBUG probes and enhance the output of one in order
to track state changes triggered by "ack" (or not).
This helped to narrow down causes from drivers or the LinuxKPI 802.11
compat framework which kept us in a scan -> auth -> scan loop.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agonet80211: format debug functions as single line
Bjoern A. Zeeb [Sun, 26 Dec 2021 17:24:04 +0000 (17:24 +0000)]
net80211: format debug functions as single line

Making use of the debug output was hard given debug lines were run in
parts through vlog (if_printf) and in (multiple) parts through printf(s).

Like some of the functions alreay have, use a local buffer to format
the string and then use a single if_printf;  in addition given these
functions are debug-only, add an extra printf in case we find our
buffers still to be too small so we can adjust for the future.
We already found that 128 characters are to short for some log messages.
Bump the buffer sizes collectively to 256 characters which also is
the maximum of if_vlog() so getting longer would need further changes
elsewhere.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agokern: Remove CTLFLAG_NEEDGIANT from some sysctls.
Alexander Motin [Sun, 26 Dec 2021 17:02:28 +0000 (12:02 -0500)]
kern: Remove CTLFLAG_NEEDGIANT from some sysctls.

MFC after: 2 weeks

2 years agotcp: remove delayed drop KPI
Gleb Smirnoff [Sun, 26 Dec 2021 16:48:24 +0000 (08:48 -0800)]
tcp: remove delayed drop KPI

No longer needed after tcp_output() can ask caller to drop.

Reviewed by: rrs, tuexen
Differential revision: https://reviews.freebsd.org/D33371

2 years agotcp: TCP output method can request tcp_drop
Gleb Smirnoff [Sun, 26 Dec 2021 16:48:19 +0000 (08:48 -0800)]
tcp: TCP output method can request tcp_drop

The advanced TCP stacks (bbr, rack) may decide to drop a TCP connection
when they do output on it.  The default stack never does this, thus
existing framework expects tcp_output() always to return locked and
valid tcpcb.

Provide KPI extension to satisfy demands of advanced stacks.  If the
output method returns negative error code, it means that caller must
call tcp_drop().

In tcp_var() provide three inline methods to call tcp_output():
- tcp_output() is a drop-in replacement for the default stack, so that
  default stack can continue using it internally without modifications.
  For advanced stacks it would perform tcp_drop() and unlock and report
  that with negative error code.
- tcp_output_unlock() handles the negative code and always converts
  it to positive and always unlocks.
- tcp_output_nodrop() just calls the method and leaves the responsibility
  to drop on the caller.

Sweep over the advanced stacks and use new KPI instead of using HPTS
delayed drop queue for that.

Reviewed by: rrs, tuexen
Differential revision: https://reviews.freebsd.org/D33370

2 years agorack: rack_do_compressed_ack_processing() can call tcp_drop()
Gleb Smirnoff [Sun, 26 Dec 2021 16:48:15 +0000 (08:48 -0800)]
rack: rack_do_compressed_ack_processing() can call tcp_drop()

Reviewed by: rrs, tuexen
Differential revision: https://reviews.freebsd.org/D33369

2 years agorack: drop connection synchronously, when we can
Gleb Smirnoff [Sun, 26 Dec 2021 16:48:10 +0000 (08:48 -0800)]
rack: drop connection synchronously, when we can

For all functions that are leaves of tcp_input() call
ctf_do_dropwithreset_conn() instead of ctf_do_dropwithreset(), cause
we always got tp and we want it to be dropped.

Reviewed by: rrs, tuexen
Differential revision: https://reviews.freebsd.org/D33368

2 years agobbr: drop packet synchronously in ctf_do_dropwithreset_conn()
Gleb Smirnoff [Sun, 26 Dec 2021 16:48:06 +0000 (08:48 -0800)]
bbr: drop packet synchronously in ctf_do_dropwithreset_conn()

This function is always called from tcp_do_segment() method, that
can drop tcpcb and return unlocked.

Reviewed by: rrs, tuexen
Differential revision: https://reviews.freebsd.org/D33367

2 years agotcp: mechanically substitute call to tfb_tcp_output to new method.
Gleb Smirnoff [Sun, 26 Dec 2021 16:47:59 +0000 (08:47 -0800)]
tcp: mechanically substitute call to tfb_tcp_output to new method.

Made with sed(1) execution:

sed -Ef sed -i "" $(grep --exclude tcp_var.h -lr tcp_output sys/)

sed:
s/tp->t_fb->tfb_tcp_output\(tp\)/tcp_output(tp)/
s/to tfb_tcp_output\(\)/to tcp_output()/

Reviewed by: rrs, tuexen
Differential revision: https://reviews.freebsd.org/D33366

2 years agotcp: welcome back tcp_output() as the right way to run output on tcpcb.
Gleb Smirnoff [Sun, 26 Dec 2021 16:47:42 +0000 (08:47 -0800)]
tcp: welcome back tcp_output() as the right way to run output on tcpcb.

Reviewed by: rrs, tuexen
Differential revision: https://reviews.freebsd.org/D33365

2 years agoIPv4: fix redirect sending conditions
Bjoern A. Zeeb [Sun, 26 Dec 2021 15:33:48 +0000 (15:33 +0000)]
IPv4: fix redirect sending conditions

RFC792,1009,1122 state the original conditions for sending a redirect.
RFC1812 further refine these.
ip_forward() still sepcifies the checks originally implemented for these
(we do slightly more/different than suggested as makes sense).
The implementation added in 8ad114c082a159c0dde95aa35d2e3e108aa30a75
to ip_tryforward() however is flawed and may send a "multi-hop"
redirects (to a host not on the directly connected network).

Do proper checks in ip_tryforward() to stop us from sending redirects
in situations we may not.  Keep as much logic out of ip_tryforward()
and in ip_redir_alloc() and only do the mbuf copy once we are sure we
will send a redirect.

While here enhance and fix comments as to which conditions are handled
for sending redirects in various places.

Reported by: pi (on net@ 2021-12-04)
MFC after: 3 days
Sponsored by: Dr.-Ing. Nepustil & Co. GmbH
Reviewed by: cy, others (earlier versions)
Differential Revision: https://reviews.freebsd.org/D33274

2 years agonetstat: fix nhop prepend printing.
Alexander V. Chernikov [Sun, 26 Dec 2021 15:02:06 +0000 (15:02 +0000)]
netstat: fix nhop prepend printing.

If present, print nexthop L2 prepend data in hex.

MFC after: 1 week

2 years agotcp: virtualise net.inet.tcp.msl sysctl.
Alexander V. Chernikov [Sat, 4 Dec 2021 22:02:44 +0000 (22:02 +0000)]
tcp: virtualise net.inet.tcp.msl sysctl.

VNET teardown waits 2*MSL (60 seconds by default) before expiring
 tcp PCBs. These PCBs holds references to nexthops, which, in turn,
 reference ifnets. This chain results in VNET interfaces being destroyed
 and moved to default VNET only after 60 seconds.
Allow tcp_msl to be set in jail by virtualising net.inet.tcp.msl sysctl,
 permitting more predictable VNET tests outcomes.

MFC after: 1 week
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D33270

2 years agoadd exuberant ctags tags file to gitignore
Andriy Gapon [Sun, 26 Dec 2021 10:16:23 +0000 (12:16 +0200)]
add exuberant ctags tags file to gitignore

2 years agox86: Remove CTLFLAG_NEEDGIANT from sysctls.
Alexander Motin [Sun, 26 Dec 2021 03:24:20 +0000 (22:24 -0500)]
x86: Remove CTLFLAG_NEEDGIANT from sysctls.

MFC after: 2 weeks

2 years agoLinuxKPI: Replace missed Giant with bus_topo_lock.
Alexander Motin [Sun, 26 Dec 2021 03:02:07 +0000 (22:02 -0500)]
LinuxKPI: Replace missed Giant with bus_topo_lock.

2 years agopccbb: Remove Giant mention in comments.
Alexander Motin [Sun, 26 Dec 2021 02:51:48 +0000 (21:51 -0500)]
pccbb: Remove Giant mention in comments.

MFC after: 2 weeks

2 years agohwpmc: Remove CTLFLAG_NEEDGIANT from sysctl.
Alexander Motin [Sun, 26 Dec 2021 02:40:14 +0000 (21:40 -0500)]
hwpmc: Remove CTLFLAG_NEEDGIANT from sysctl.

MFC after: 2 weeks

2 years agouart: Remove CTLFLAG_NEEDGIANT from sysctl.
Alexander Motin [Sun, 26 Dec 2021 02:30:02 +0000 (21:30 -0500)]
uart: Remove CTLFLAG_NEEDGIANT from sysctl.

MFC after: 2 weeks

2 years agoxen/blkfront: Remove CTLFLAG_NEEDGIANT from sysctl.
Alexander Motin [Sun, 26 Dec 2021 02:24:24 +0000 (21:24 -0500)]
xen/blkfront: Remove CTLFLAG_NEEDGIANT from sysctl.

It only converts bit field into string.  It does not need locking.

MFC after: 1 week

2 years agoamdtemp: Remove CTLFLAG_NEEDGIANT from sysctls.
Alexander Motin [Sun, 26 Dec 2021 02:03:54 +0000 (21:03 -0500)]
amdtemp: Remove CTLFLAG_NEEDGIANT from sysctls.

It seems to be needed only to serialize very old K8 registers access.
Introduce separate lock for that and remove Giant dependency.

MFC after: 2 weeks

2 years agostress2: Fix "set-but-not-unused" warnings
Peter Holm [Sat, 25 Dec 2021 07:27:25 +0000 (07:27 +0000)]
stress2: Fix "set-but-not-unused" warnings

2 years agovm_page: Move a comment
Doug Moore [Fri, 24 Dec 2021 22:10:30 +0000 (16:10 -0600)]
vm_page: Move a comment

fb38b29b5609 (page_alloc_br) vm_page: Remove extra test, dup code from page alloc
should have moved a comment block when it moved the function call that followed it.

Move the comment block now.

2 years agotegra/ahci: do not advertise enclosure management facility
Michal Meloun [Fri, 24 Dec 2021 19:25:36 +0000 (20:25 +0100)]
tegra/ahci: do not advertise enclosure management facility

It is not implemented in HW.

MFC after: 1 week

2 years agoarm64: Don't rely on host readelf for u-boot booti image generation
Jessica Clarke [Fri, 24 Dec 2021 19:25:20 +0000 (19:25 +0000)]
arm64: Don't rely on host readelf for u-boot booti image generation

readelf is not a bootstrap tool and so cannot be relied upon to exist.
On macOS there is no system readelf, and even on Linux or FreeBSD where
it does exist, BUILD_WITH_STRICT_TMPPATH builds won't be able to use it.
Instead of making it a bootstrap tool, just use nm as that suffices and
already is a bootstrap tool.

Fixes: 28482babd08a ("arm64: Use new arm_kernel_boothdr script for generating booti images.")
Reviewed by: emaste, mmel
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D32734

2 years agotegra124: Implement new get_gate method for tegra124 clocks.
Michal Meloun [Fri, 24 Dec 2021 19:13:33 +0000 (20:13 +0100)]
tegra124: Implement new get_gate method for tegra124 clocks.

MFC after: 1 week

2 years agovm: alloc pages from reserv before breaking it
Doug Moore [Fri, 24 Dec 2021 18:59:16 +0000 (12:59 -0600)]
vm: alloc pages from reserv before breaking it

Function vm_reserv_reclaim_contig breaks a reservation with enough
free space to satisfy an allocation request and returns the free space
to the buddy allocator. Change the function to allocate the request
memory from the reservation before breaking it, and return that memory
to the caller. That avoids a second call to the buddy allocator and
guarantees successful allocation after breaking the reservation, where
that success is not currently guaranteed.

Reviewed by: alc, kib (previous version)
Differential Revision: https://reviews.freebsd.org/D33644

2 years agotegra210: Implement new get_gate method for tegra210 clocks.
Michal Meloun [Fri, 24 Dec 2021 17:23:59 +0000 (18:23 +0100)]
tegra210: Implement new get_gate method for tegra210 clocks.

MFC after: 1 week

2 years agoextres/clk: Add a method to detect the HW state of the clock gate.
Michal Meloun [Fri, 24 Dec 2021 11:18:49 +0000 (12:18 +0100)]
extres/clk: Add a method to detect the HW state of the clock gate.

- add method to read gate enable/disable staust from HW
- show gate status in sysctl clock dump

MFC after: 1 week

2 years agoextres/clk: Improve sysctl dump of clocks.
Michal Meloun [Fri, 24 Dec 2021 07:38:32 +0000 (08:38 +0100)]
extres/clk: Improve sysctl dump of clocks.

Always recalculate the frequency, the cache is lazily initialized so it is not always up to date.
While I'm in mark sysctl as MPSAFE.

Discussed with: manu, adrian
MFC after: 1 week

2 years agoExtract the arm64 signal code to a new file
Andrew Turner [Tue, 14 Dec 2021 18:05:29 +0000 (18:05 +0000)]
Extract the arm64 signal code to a new file

This will be used by the vdso signal trampoline on arm64.

While here fix the license as this part of locore.S to correct the
copyright owner.

Sponsored by: The FreeBSD Foundation

2 years agoApply clang fix for crash or assertion failure compiling part of llvm
Dimitry Andric [Fri, 24 Dec 2021 11:46:00 +0000 (12:46 +0100)]
Apply clang fix for crash or assertion failure compiling part of llvm

Merge commit 77e8f4eeeeed from llvm git (by David Green):

  [ARM] Define ComplexPatternFuncMutatesDAG

  Some of the Arm complex pattern functions call canExtractShiftFromMul,
  which can modify the DAG in-place. For this to be valid and handled
  successfully we need to define ComplexPatternFuncMutatesDAG.

  Differential Revision: https://reviews.llvm.org/D107476

When building parts of llvm targeting armv6 on stable/12, the following
assertion can appear (or if assertions are disabled, clang is likely to
crash):

Assertion failed: (NodeToMatch->getOpcode() != ISD::DELETED_NODE && "NodeToMatch was removed partway through selection"), function SelectCodeCommon, file /usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp, line 3573.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/obj/usr/src/freebsd12-amd64/tmp/usr/bin/c++ -cc1 -triple armv6kz-unknown-freebsd12.3-gnueabihf -S --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -mrelocation-model static -mconstructor-aliases -target-cpu arm1176jzf-s -target-feature +vfp2 -target-feature +vfp2sp -target-feature -vfp3 -target-feature -vfp3d16 -target-feature -vfp3d16sp -target-feature -vfp3sp -target-feature -fp16 -target-feature -vfp4 -target-feature -vfp4d16 -target-feature -vfp4d16sp -target-feature -vfp4sp -target-feature -fp-armv8 -target-feature -fp-armv8d16 -target-feature -fp-armv8d16sp -target-feature -fp-armv8sp -target-feature -fullfp16 -target-feature +fp64 -target-feature -d32 -target-feature -neon -target-feature -sha2 -target-feature -aes -target-feature -fp16fml -target-feature +strict-align -target-abi aapcs-linux -mfloat-abi hard -fallow-half-arguments-and-returns -ffunction-sections -fdata-sections -O1 -std=c++14 -fdeprecated-macro -fno-rtti -fno-signed-char -faddrsig -fexperimental-new-pass-manager PPCISelLowering-009095.ii
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'PPCISelLowering-009095.cpp'.
4. Running pass 'ARM Instruction Selection' on function '@_ZN4llvm17PPCTargetLoweringC2ERKNS_16PPCTargetMachineERKNS_12PPCSubtargetE'

This crash or assertion is fixed by the upstream commit.

MFC after: 3 days

2 years agoadaspindown: check disk power mode before sending IDLE command
Andriy Gapon [Fri, 24 Dec 2021 09:02:22 +0000 (11:02 +0200)]
adaspindown: check disk power mode before sending IDLE command

If a disk is already in STANDBY mode, then setting IDLE mode can
actually spin it up.

Reviewed by: mav
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D33588

2 years agoFix clerical error in page alloc
Doug Moore [Fri, 24 Dec 2021 08:47:21 +0000 (02:47 -0600)]
Fix clerical error in page alloc

Fix a very recent change that introduced a page accounting error in
case of a reserveration being broken.
Reviewed by: alc
Fixes: fb38b29b5609 (page_alloc_br) vm_page: Remove extra test, dup code from page alloc
Differential Revision: https://reviews.freebsd.org/D33645

2 years agoarm64: Introduce and use pmap_pte_exists()
Alan Cox [Thu, 23 Dec 2021 18:50:14 +0000 (12:50 -0600)]
arm64: Introduce and use pmap_pte_exists()

Use pmap_pte_exists() instead of pmap_pte() when the caller expects a
mapping to exist at a particular level.  The caller benefits in two
ways from using pmap_pte_exists().  First, because the level is
specified to pmap_pte_exists() as a constant, rather than returned, the
compiler can specialize the implementation of pmap_pte_exists() to the
caller's exact needs, i.e., generate fewer instructions.  Consequently,
within a GENERIC-NODEBUG kernel, 704 bytes worth of instructions are
eliminated from the inner loops of various pmap functions.  Second,
suppose that the mapping doesn't exist.  Rather than requiring every
caller to implement its own KASSERT()s to report missing mappings, the
caller can optionally have pmap_pte_exists() provide the KASSERT().

Reviewed by: andrew, kib
Tested by: andrew (an earlier version)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33597

2 years agovm_page: Remove extra test, dup code from page alloc
Doug Moore [Fri, 24 Dec 2021 04:45:47 +0000 (22:45 -0600)]
vm_page: Remove extra test, dup code from page alloc

Extract code common to functions vm_page_alloc_contig_domain and
vm_page_alloc_noobj_contig_domain into a new function.  Do so in a way
that eliminates a bound-to-fail reservation test after a reservation
is broken by a call from vm_page_alloc_contig_domain.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D33551

2 years agorpc: Delete AUTH_NEEDS_TLS(_MUTUAL_HOST) auth_stat values
Rick Macklem [Thu, 23 Dec 2021 22:31:53 +0000 (14:31 -0800)]
rpc: Delete AUTH_NEEDS_TLS(_MUTUAL_HOST) auth_stat values

I thought that these new auth_stat values had been agreed
upon by the IETF NFSv4 working group, but that no longer
is the case.  As such, delete them and use AUTH_TOOWEAK
instead.  Leave the code that uses these new auth_stat
values in the sources #ifdef notnow, in case they are
defined in the future.

MFC after: 1 week

2 years agocxgbei: Don't fail task setup if the socket is disconnected.
John Baldwin [Wed, 22 Dec 2021 20:53:58 +0000 (12:53 -0800)]
cxgbei: Don't fail task setup if the socket is disconnected.

When the initiator is reconnecting to the target, the connection may
temporarily be marked disconnected or not have an associated socket.
New I/O requests received by the initiator in this state should not
fail with ECONNRESET as that results in an I/O error back to userland.
Instead, they need to still succeed so that CAM can queue the requests
and send them once the connection is re-established.

Setting up DDP for zero-copy receive requires a socket, so just punt
on using DDP for these transfers.

Reported by: Jithesh Arakkan @ Chelsio
Sponsored by: Chelsio Communications

2 years ago[PowerPC] PowerMac timebase sync for G4
Brandon Bergren [Thu, 23 Dec 2021 21:45:24 +0000 (15:45 -0600)]
[PowerPC] PowerMac timebase sync for G4

Summary:
Disable timebase on (some) AIM platforms (tested on PowerMac G4) prior
to synchronization.

Some platforms use a GPIO to enable and disable timebase, while others
use a platform function.

This mirrors 0d69f00b on mpc85xx.

Todo:
 * Implement various G5 timebase controls.
 * Print out platform code on unknown G5s so we can collect it.
 * Change API to be give/take pairs like Linux does so it's possible to
   do a software sync protocol.

Reviewed By: #powerpc, jhibbits
Subscribers: mikael, markmi_dsl-only.net, luporl, alfredo
Tags: #powerpc
Differential Revision: https://reviews.freebsd.org/D29136

2 years agore: Avoid subobject overread when setting IDRn
Jessica Clarke [Thu, 23 Dec 2021 20:19:31 +0000 (20:19 +0000)]
re: Avoid subobject overread when setting IDRn

IDR0-IDR5 can be read byte-by-byte but must be written to as 4-byte
words. The current code to do this is rather clunky and ends up reading
past the end of the union's eaddr member due to MAC addresses only being
6 bytes. In practice this ends up being fine because the align_dummy
member will pad the union to a multiple of 4 bytes, but this is dodgy,
and on CHERI with subobject bounds enforcement enabled, as is done in
CheriBSD's pure-capability kernel, will trap.

Instead, make the buffer in use the right size, just use an array of
uint32_t's rather than a char buffer that's then cast to uint32_t * to
simplify it in the process, and zero-initialise it first to avoid
reading uninitialised data in the trailing bytes.

Found by: CHERI
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D33617

2 years agoqca: add the TLMM code into the build
Adrian Chadd [Sun, 19 Dec 2021 04:06:49 +0000 (20:06 -0800)]
qca: add the TLMM code into the build

This adds the IPQ4018 TLMM code into the IPQ4018 build.

Differential Revision: https://reviews.freebsd.org/D33554

2 years agoqcom_tlmm: add initial gpio/pinmux controller (TLMM)
Adrian Chadd [Sun, 19 Dec 2021 04:03:40 +0000 (20:03 -0800)]
qcom_tlmm: add initial gpio/pinmux controller (TLMM)

The qualcomm TLMM (top level mode manager) is their gpio/pinmux hardware
controller.

Although the pinmux is generic enough to use for the IPQ/APQ series
chips, I'm directly calling the IPQ4018 routines to expedite bring-up.

Notably, I'm not yet implementing the interrupt support - it's not
required at this stage of bring-up.

Differential Revision: https://reviews.freebsd.org/D33554

2 years agoarm: add dwc3 as a compilable driver
Adrian Chadd [Thu, 23 Dec 2021 18:36:51 +0000 (10:36 -0800)]
arm: add dwc3 as a compilable driver

The IPQ4018/IPQ4019 cores use the DWC3 core.  So make it available
here.

2 years agogetfh: clarify that it is a privileged operation
Ed Maste [Thu, 23 Dec 2021 15:24:27 +0000 (10:24 -0500)]
getfh: clarify that it is a privileged operation

Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33629

2 years agolibc: Fix regexec when sizeof(char *) > sizeof(long)
Jessica Clarke [Thu, 23 Dec 2021 16:38:10 +0000 (16:38 +0000)]
libc: Fix regexec when sizeof(char *) > sizeof(long)

The states macro is the type for engine.c to use, with states1 being a
local macro for regexec to use to determine whether it can use the small
matcher or not (by comparing nstates and 8*sizeof(states1)). However,
macro bodies are expanded in the context of their use, and so when
regexec uses states1 it uses the current value of states, which is left
over as char * from the large version (or, really, the multi-byte one,
but that reuses large's states). For all supported architectures in
FreeBSD, the two have the same size, and so this confusion is harmless.
However, for architectures like CHERI where that is not the case (or
Windows's LLP64 as discovered by LLVM and fixed in 2010 in 2e071faed8e2)
and sizeof(char *) is bigger than sizeof(long) regexec will erroneously
try to use the small matcher when nstates is between sizeof(long) and
sizeof(char *) (i.e. between 64 and 128 on CHERI, or 32 and 64 on LLP64)
and end up overflowing the number of bits in the underlying long if it
ever uses those high states. On weirder architectures where sizeof(long)
is greater than sizeof(char *) this also fixes it to not fall back on
the large matcher prematurely, but such architectures are likely limited
to the embedded space, if they exist at all.

Fix this by swapping round states and states1, so that states1 is
defined directly as being long and states is an alias for it for the
small matcher case.

Found by: CHERI

2 years agonet80211: fix debug printf
Bjoern A. Zeeb [Thu, 23 Dec 2021 15:21:32 +0000 (15:21 +0000)]
net80211: fix debug printf

We are printing %p in _db_show_sta(), there is no need to prefix it
with 0x again to get a 0x0x...

Spsonsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agoctld: Disable -Wcast-align warnings.
John Baldwin [Wed, 22 Dec 2021 23:23:45 +0000 (15:23 -0800)]
ctld: Disable -Wcast-align warnings.

clang complains about the downcasts from struct connection to struct
ctld_connection as the alignment of struct ctld_connection is higher
on 32-bit platforms.  However, the warning is in this case harmless as
the downcasts are on objects originally allocated as instances of
struct ctld_connection with suitable alignment.

Reported by: npn, gjb
Fixes: 6378393308bc Add an internal libiscsiutil library.
Sponsored by: Chelsio Communications

2 years agoorganization.dot: fix a typo
Glen Barber [Wed, 22 Dec 2021 20:24:06 +0000 (15:24 -0500)]
organization.dot: fix a typo

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoorganization.dot: update the secteam roster
Glen Barber [Wed, 22 Dec 2021 20:18:22 +0000 (15:18 -0500)]
organization.dot: update the secteam roster

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoorganization.dot: fix ordering by last name
Glen Barber [Wed, 22 Dec 2021 20:15:19 +0000 (15:15 -0500)]
organization.dot: fix ordering by last name

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoorganization.dot: update the re@ roster
Glen Barber [Wed, 22 Dec 2021 20:09:19 +0000 (15:09 -0500)]
organization.dot: update the re@ roster

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agolibiscsiutil: Change keys_load/save to operate on data buffers.
John Baldwin [Wed, 22 Dec 2021 18:42:29 +0000 (10:42 -0800)]
libiscsiutil: Change keys_load/save to operate on data buffers.

This will be used in future changes to support large text requests
spanning multiple PDUs.

Provide wrapper functions keys_load/save_pdu that operate use a PDU's
data buffer.

Reviewed by: mav
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D33547

2 years agolibiscsiutil: Use open_memstream to build the outgoing block of keys.
John Baldwin [Wed, 22 Dec 2021 18:42:19 +0000 (10:42 -0800)]
libiscsiutil: Use open_memstream to build the outgoing block of keys.

Reviewed by: mav
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D33546

2 years agolibiscsiutil: Fix a memory leak with negotiation keys.
John Baldwin [Wed, 22 Dec 2021 18:41:01 +0000 (10:41 -0800)]
libiscsiutil: Fix a memory leak with negotiation keys.

When keys are loaded from a received PDU, a copy of the received keys
block is saved in the keys struct and the name and value pointers
point into that saved block.  Freeing the keys frees this block.

However, when keys are added to a keys struct to build a set of keys
later sent in a PDU, the keys data block pointer is not used and
individual key names and values hold allocated strings.  When the keys
structure was freed, all of these individual key name and value
strings were leaked.

Instead, allocate copies of strings for names and values when parsing
a set of keys from a received PDU and free all of the individual key
name and value strings when deleting a set of keys.

Reviewed by: mav
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D33545

2 years agoAdd an internal libiscsiutil library.
John Baldwin [Wed, 22 Dec 2021 18:35:46 +0000 (10:35 -0800)]
Add an internal libiscsiutil library.

Move some of the code duplicated between ctld(8) and iscsid(8) into a
libiscsiutil library.

Sharing the low-level PDU code did require having a
'struct connection' base class with a method table to permit separate
initiator vs target behavior (e.g. in handling proxy PDUs).

Reviewed by: mav, emaste
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D33544

2 years agoFix buffer overread in preloaded hostuuid parsing
Jessica Clarke [Wed, 22 Dec 2021 16:47:23 +0000 (16:47 +0000)]
Fix buffer overread in preloaded hostuuid parsing

Commit b6be9566d236 stopped prison0_init writing outside of the
preloaded hostuuid's bounds. However, the preloaded data will not
(normally) have a NUL in it, and so validate_uuid will walk off the end
of the buffer in its call to sscanf. Previously if there was any
whitespace in the string we'd at least know there's a NUL one past the
end due to the off-by-one error, but now no such byte is guaranteed.

Fix this by copying to a temporary buffer and explicitly adding a NUL.

Whilst here, change the strlcpy call to use a far less suspicious
argument for dstsize; in practice it's fine, but it's an unusual pattern
and not necessary.

Found by: CHERI
Reviewed by: emaste, kevans, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33616

2 years agoloader.efi: to preserve heap space, use AllocatePages() for shadow_fb
Toomas Soome [Fri, 17 Dec 2021 13:10:05 +0000 (15:10 +0200)]
loader.efi: to preserve heap space, use AllocatePages() for shadow_fb

shadow FB size could be rather large and depends on resolution,
instead of using heap, allocate dedicated space outside of heap.

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D33600
MFC after: 2 weeks

2 years agosound(4): Fix a typo in a source code comment
Gordon Bergling [Wed, 22 Dec 2021 09:18:35 +0000 (10:18 +0100)]
sound(4): Fix a typo in a source code comment

- s/aggresively/aggressively/

MFC after: 3 days

2 years agoenetc(4): Fix a typo in a source code comment
Gordon Bergling [Wed, 22 Dec 2021 09:01:54 +0000 (10:01 +0100)]
enetc(4): Fix a typo in a source code comment

- s/decriptors/descriptors/

MFC after: 3 days

2 years agogfx_fb: Fix a typo in a source code comment
Gordon Bergling [Wed, 22 Dec 2021 09:00:42 +0000 (10:00 +0100)]
gfx_fb: Fix a typo in a source code comment

- s/decriptor/descriptor/

MFC after: 3 days

2 years agolibc: Fix "harmless" iconv one-byte overread
Jessica Clarke [Tue, 21 Dec 2021 22:47:38 +0000 (22:47 +0000)]
libc: Fix "harmless" iconv one-byte overread

Checking there are still bytes left must be done before dereferencing
the pointer, not the other way round. This is harmless on traditional
architectures since the result will immediately be thrown away, and all
callers are in separate translation units so there is no potential for
optimising based on this out-of-bounds read. However, on CHERI, pointers
are bounded, and so this will trap if fed a string that does not have a
NUL within the first len bytes.

Found by: CHERI
Reviewed by: brooks

2 years agocryptodev.h: Drop 'extern' from function prototypes.
John Baldwin [Mon, 20 Dec 2021 22:43:14 +0000 (14:43 -0800)]
cryptodev.h: Drop 'extern' from function prototypes.

Sponsored by: Chelsio Communications

2 years agoccr: Replace 'blkcipher' with just 'cipher'.
John Baldwin [Mon, 20 Dec 2021 22:28:21 +0000 (14:28 -0800)]
ccr: Replace 'blkcipher' with just 'cipher'.

ccr(4) can handle requests for AES-CTR (a stream cipher), not just
block ciphers, so make the function and structure names more generic.

Sponsored by: Chelsio Communications

2 years agocsu: define STRIP_FBSDID
Ed Maste [Mon, 20 Dec 2021 21:30:09 +0000 (16:30 -0500)]
csu: define STRIP_FBSDID

__FBSDID() places the provided string in the output object's .comment
section.  However, with the transition to Git $FreeBSD$ is no longer
expanded and so we emitted a literal $FreeBSD$.

$FreeBSD$ will be addressed in a holistic manner in the future, but at
least avoid embedding it into everything linked on FreeBSD (via csu).

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33594

2 years agotzcode: fix tz change detection logic
Kyle Evans [Thu, 16 Dec 2021 02:15:38 +0000 (20:15 -0600)]
tzcode: fix tz change detection logic

clock_gettime() returns 0 if it succeeds, so don't capture that into the
fail logic.  With this, WITH_DETECT_TZ_CHANGES successfully detects a
change after 61 seconds.

Reviewed by: imp, trasz
Differential Revision: https://reviews.freebsd.org/D33494

2 years agosrc.conf.5: regenerate
Piotr Kubaj [Tue, 21 Dec 2021 17:37:14 +0000 (18:37 +0100)]
src.conf.5: regenerate

2 years agoriscv64*: enable OFED
Piotr Kubaj [Tue, 21 Dec 2021 16:24:20 +0000 (17:24 +0100)]
riscv64*: enable OFED

Summary:
OFED on riscv64 builds fine, so it's ok to enable it.

Also MFC to stable/13.

Test Plan: make buildworld

Reviewers: mhorne

Subscribers: bdrewery, imp, emaste

Differential Revision: https://reviews.freebsd.org/D33602

2 years agoRemove dead code.
Hans Petter Selasky [Mon, 20 Dec 2021 16:21:49 +0000 (17:21 +0100)]
Remove dead code.

The variable orig_resid is always set to zero right after the while loop
where it is cleared.

Reviewed by: gallatin@ and glebius@
Differential Revision: https://reviews.freebsd.org/D33589
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agobsddialog: import version 0.0.2
Baptiste Daroussin [Tue, 21 Dec 2021 15:08:55 +0000 (16:08 +0100)]
bsddialog: import version 0.0.2

2 years agobsddialog: import snapshot 0.0.2
Alfonso Siciliano [Tue, 21 Dec 2021 15:06:19 +0000 (16:06 +0100)]
bsddialog: import snapshot 0.0.2

2 years agoAdd atomic_testandset_acq_* on arm64
Andrew Turner [Mon, 20 Dec 2021 13:49:59 +0000 (13:49 +0000)]
Add atomic_testandset_acq_* on arm64

We only need to include sys/_atomic_subword.h on arm64 to provide
atomic_testandset_acq_long. Add an implementation in the arm64 atomic.h
based on the existing atomic_testandset macro.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33587

2 years agoDon't fail changing props for unmapped DMAP memory
Andrew Turner [Tue, 14 Dec 2021 18:09:47 +0000 (18:09 +0000)]
Don't fail changing props for unmapped DMAP memory

When recursing in pmap_change_props_locked we may fail because there is
no pte. This shouldn't be considered a fail as it may happen in a few
cases, e.g. there are multiple normal memory ranges with device memory
between them.

Reported by: cperciva
Tested by: cperciva
Reviewed by: alc, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33459