]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
22 months agoIPv6: fix problem with duplicate port assignment with v4-mapped addrs
Mike Karels [Fri, 29 Jul 2022 14:23:23 +0000 (09:23 -0500)]
IPv6: fix problem with duplicate port assignment with v4-mapped addrs

In in_pcb_lport_dest(), if an IPv6 socket does not match any other IPv6
socket using in6_pcblookup_local(), and if the socket can also connect
to IPv4 (the INP_IPV4 vflag is set), check for IPv4 matches as well.
Otherwise, we can allocate a port that is used by an IPv4 socket
(possibly one created from IPv6 via the same procedure), and then
connect() can fail with EADDRINUSE, when it could have succeeded if
the bound port was not in use.

PR: 265064
Submitted by: firk at cantconnect.ru (with modifications)
Reviewed by: bz, melifaro
Differential Revision: https://reviews.freebsd.org/D36012

22 months agodiff3: Use ranges for new and old diffedits in ed scripts
Tom Jones [Tue, 2 Aug 2022 13:33:17 +0000 (14:33 +0100)]
diff3: Use ranges for new and old diffedits in ed scripts

This should make the output logic easier to read. No functional change
intended.

Sponsored by: Klara, Inc.

22 months agodiff3: Use ranges for the old and new diffedits in A scripts
Tom Jones [Tue, 2 Aug 2022 13:29:38 +0000 (14:29 +0100)]
diff3: Use ranges for the old and new diffedits in A scripts

This makes the output logic easier to read. No functional change
intended.

Sponsored by: Klara, Inc.

22 months agodiff3: Simplify startmark calculation in Ascript
Tom Jones [Tue, 2 Aug 2022 13:23:10 +0000 (14:23 +0100)]
diff3: Simplify startmark calculation in Ascript

Remove redundant calculation for startmark.

Sponsored by: Klara, Inc.

22 months agorecv: bump manpage date after be1f485d7d6bebc53b05.
Alexander V. Chernikov [Tue, 2 Aug 2022 13:23:27 +0000 (13:23 +0000)]
recv: bump manpage date after be1f485d7d6bebc53b05.

MFC after: 1 month

22 months agotcp rack: simplify computation of rsm start and end
Michael Tuexen [Tue, 2 Aug 2022 10:45:56 +0000 (12:45 +0200)]
tcp rack: simplify computation of rsm start and end

While there, also fix the setting of the SYN related flag.

Reviewed by: rrs
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D35862

22 months agofind.1: Correct the markup
Gordon Bergling [Tue, 2 Aug 2022 06:33:20 +0000 (08:33 +0200)]
find.1: Correct the markup

- ASCII is an acronym and there is no ascii(8) manual page
- Reference ascii(7) in the SEE ALSO section

Reported by: karels
X-MFC with: 321dc6ee7e81

22 months agowtap: cleanup module Makefile
Bjoern A. Zeeb [Mon, 1 Aug 2022 19:43:55 +0000 (19:43 +0000)]
wtap: cleanup module Makefile

Remove comments and change whitespace.
Cleanup the opt_* and -nclude opt_global.h bits to avoid various warnings.

22 months agowtap(4): Fix bug in wtap_node_write() and wtap_vap_create()
En-Wei Wu [Mon, 1 Aug 2022 19:40:13 +0000 (19:40 +0000)]
wtap(4): Fix bug in wtap_node_write() and wtap_vap_create()

Originally, wtap_node_write() gets the wrong softc by iterating V_inet and
gets the ifp by string comparison, then gets softc by ifp->if_softc.
However, ifp->if_softc will not point to the correct softc owned by
ieee80211com, and thus causes a kernel panic.
Fix it by assigning softc to cdev's si_drv1 in wtap_vap_create()
and get the softc directly via dev->si_drv1 in wtap_node_write().

The cdev created by wtap_vap_create() use the name of ieee80211com
rather than the vap's name. It will cause the second vap based on
the same ieee80211com as first vap fail to create a device node
because the device node is already exists. Fix it by assigning
vap->iv_ifp->if_xname to cdev's name.

Sponsored by: Google, Inc. (GSoC 2022)
Reviewed by: adrian, cy, bz
Differential Revision: https://reviews.freebsd.org/D35752

22 months agodiff3: Use variables for old and new in A scripts
Tom Jones [Mon, 1 Aug 2022 13:48:35 +0000 (14:48 +0100)]
diff3: Use variables for old and new in A scripts

This makes the code easier to follow, no functional changes intended

Sponsored by: Klara, Inc.

22 months agodiff3: Replace literal marker with variable
Tom Jones [Mon, 1 Aug 2022 13:46:09 +0000 (14:46 +0100)]
diff3: Replace literal marker with variable

Sponsored by: Klara, Inc.

22 months agodiff3: Fix indentation
Tom Jones [Mon, 1 Aug 2022 13:14:25 +0000 (14:14 +0100)]
diff3: Fix indentation

Sponsored by: Klara, Inc.

22 months agouftdi(4): Add new USB ID.
Hans Petter Selasky [Mon, 1 Aug 2022 11:25:49 +0000 (13:25 +0200)]
uftdi(4): Add new USB ID.

PR: 265514
MFC after: 1 week
Sponsored by: NVIDIA Networking

22 months agorouting: refactor private KPI
Alexander V. Chernikov [Mon, 1 Aug 2022 10:02:12 +0000 (10:02 +0000)]
routing: refactor private KPI
* Make nhgrp_get_nhops() return const struct weightened_nhop to
 indicate that the list is immutable
* Make nhgrp_get_group() return the actual group, instead of
 group+weight.

MFC after: 2 weeks

22 months agotests: fix unix_passfd_dgram:rights_creds_payload after be1f485d7d6b
Alexander V. Chernikov [Mon, 1 Aug 2022 09:20:45 +0000 (09:20 +0000)]
tests: fix unix_passfd_dgram:rights_creds_payload after be1f485d7d6b

The test was failing due to the assert on lack of MSG_TRUNC flag in the
 output flags of recvmsg().
The code passed MSG_TRUNC, along with sufficient-size buffer to hold the
 message to-be-received to the recvmsg(), and expected MSG_TRUNC to be
 returned as well.

This is not exactly correct as a) MSG_TRUNC was not even a supported
 recvmsg() flag before be1f485d7d6b and b) it violates POSIX, as
 POSIX states it should be set only "If a message is too long to fit in
 the supplied buffers,".
The test was working before as the kernel copied input flags to the
 output flags. be1f485d7d6b changed that behaviour to clear MSG_TRUNC
 if it was present on the input.

Fix the test by checking POSIX-defined behaviour.

Discussed with: glebius

22 months agorouting: convert remnants of DPRINTF to FIB_CTL_LOG().
Alexander V. Chernikov [Fri, 29 Jul 2022 17:41:16 +0000 (17:41 +0000)]
routing: convert remnants of DPRINTF to FIB_CTL_LOG().

Convert the last remaining pieces of old-style debug messages
 to the new debugging framework.

Differential Revision: https://reviews.freebsd.org/D35994
MFC after: 2 weeks

22 months agorouting: add nhop(9) kpi.
Alexander V. Chernikov [Fri, 29 Jul 2022 12:32:27 +0000 (12:32 +0000)]
routing: add nhop(9) kpi.

Differential Revision: https://reviews.freebsd.org/D35985
MFC after: 1 month

22 months agorouting: remove info argument from add/change_route_nhop().
Alexander V. Chernikov [Thu, 28 Jul 2022 13:41:11 +0000 (13:41 +0000)]
routing: remove info argument from add/change_route_nhop().

Currently, rt_addrinfo(info) serves as a main "transport" moving
 state between various functions inside the routing subsystem.
As all of the fields are filled in directly by the customers, it
 is problematic to maintain consistency, resulting in repeated checks
 inside many functions. Additionally, there are multiple ways of
 specifying the same value (RTAX_IFP vs rti_ifp / rti_ifa) and so on.
With the upcoming nhop(9) kpi it is possible to store all of the
 required state in the nexthops in the consistent fashion, reducing the
 need to use "info" in the KPI calls.
Finally, rt_addrinfo structure format was derived from the rtsock wire
 format, which is different from other kernel routing users or netlink.

This cleanup simplifies upcoming nhop(9) kpi and netlink introduction.

Reviewed by: zlei.huang@gmail.com
Differential Revision: https://reviews.freebsd.org/D35972
MFC after: 2 weeks

22 months agonet: constantify radix.c functions
Alexander V. Chernikov [Thu, 28 Jul 2022 13:04:43 +0000 (13:04 +0000)]
net: constantify radix.c functions

Mark dst/mask public API functions fields as const to clearly
 indicate that these parameters are not modified or stored in
 the datastructure.

Differential Revision: https://reviews.freebsd.org/D35971
MFC after: 2 weeks

22 months agorouting: move route expiration time to its nexthop
Alexander V. Chernikov [Thu, 28 Jul 2022 12:18:19 +0000 (12:18 +0000)]
routing: move route expiration time to its nexthop

Expiration time is actually a path property, not a route property.
Move its storage to nexthop to simplify upcoming nhop(9) KPI changes
 and netlink introduction.

Differential Revision: https://reviews.freebsd.org/D35970
MFC after: 2 weeks

22 months agoIdentify each UFS/FFS superblock integrity check as a warning or fatal error.
Kirk McKusick [Mon, 1 Aug 2022 05:07:20 +0000 (22:07 -0700)]
Identify each UFS/FFS superblock integrity check as a warning or fatal error.

Identify each of the superblock validation checks as either a
warning or a fatal error. Any integrity check that can cause a
system hang or crash is marked as fatal. Those that may simply
lead to poor file layoutor other less good operating conditions
are marked as warning.

Normally both fatal and warning are treated as errors and prevent
the superblock from being loaded. A new flag, UFS_NOWARNFAIL, is
added. When passed to ffs_sbget() it will note warnings that it
finds, but will still proceed with loading the superblock. Note
that when UFS_NOWARNFAIL is used, it also includes UFS_NOHASHFAIL.

No legitimate superblocks should fail as a result of these changes.

22 months agoUpdates to UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Mon, 1 Aug 2022 03:28:04 +0000 (20:28 -0700)]
Updates to UFS/FFS superblock integrity checks when reading a superblock.

Further updates based on analysis of the way the fields are used
in the various filesystem macros defined in fs.h.

Eliminate several checks for non-negative values where the fields
are checked for specific values. Since these specific values are
non-negative, if the value is a verified positive value then it
cannot be negative and such a check is redundant and unnecessary.

No legitimate superblocks should fail as a result of these changes.

22 months agoDeprecate minigzip(1) in preparation of removing it from base system.
Xin LI [Sun, 31 Jul 2022 22:16:22 +0000 (15:16 -0700)]
Deprecate minigzip(1) in preparation of removing it from base system.

Reviewed by: emaste, pauamma
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D36000

22 months agoFix for 548045b a too aggressive UFS superblock integrity check.
Kirk McKusick [Sun, 31 Jul 2022 14:48:59 +0000 (07:48 -0700)]
Fix for 548045b a too aggressive UFS superblock integrity check.

Reported by: Jenkins

22 months agofind.1: Fix mandoc warnings and mention a useful manpage
Gordon Bergling [Sun, 31 Jul 2022 14:38:10 +0000 (16:38 +0200)]
find.1: Fix mandoc warnings and mention a useful manpage

- new sentence, new line
- unknown AT&T UNIX version: At v7
- no blank before trailing delimiter
- reference the ASCII(8) manual page

MFC after: 5 days

22 months agosh.1: Fix a mandoc warning
Gordon Bergling [Sun, 31 Jul 2022 14:23:27 +0000 (16:23 +0200)]
sh.1: Fix a mandoc warning

- new sentence, new line

MFC after: 3 days

22 months agouhsoctl.1: Fix the man page date
Gordon Bergling [Sun, 31 Jul 2022 10:27:10 +0000 (12:27 +0200)]
uhsoctl.1: Fix the man page date

- STYLE: normalizing date format to: August 12, 2009

MFC after: 3 days

22 months agouefi(8): Fix a typo in a source code comment
Gordon Bergling [Sun, 31 Jul 2022 10:14:54 +0000 (12:14 +0200)]
uefi(8): Fix a typo in a source code comment

- s/intrrupt/interrupt/

MFC after: 3 days

22 months agobluetooth(3): Fix a typo in a source code comment
Gordon Bergling [Sun, 31 Jul 2022 10:13:13 +0000 (12:13 +0200)]
bluetooth(3): Fix a typo in a source code comment

- s/intrrupt/interrupt/

MFC after: 3 days

22 months agoqlnxe(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 31 Jul 2022 09:35:07 +0000 (11:35 +0200)]
qlnxe(4): Fix a typo in a source code comment

- s/pedning/pending/

MFC after: 3 days

22 months agorouting: add debug printing helpers for rtentry and RTM* cmds.
Alexander V. Chernikov [Sun, 31 Jul 2022 09:00:42 +0000 (09:00 +0000)]
routing: add debug printing helpers for rtentry and RTM* cmds.

MFC after: 2 weeks

22 months agomlx5en(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 31 Jul 2022 08:28:20 +0000 (10:28 +0200)]
mlx5en(4): Fix a typo in a source code comment

- s/functino/function/

MFC after: 3 days

22 months agocxgb(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 31 Jul 2022 07:59:03 +0000 (09:59 +0200)]
cxgb(4): Fix a typo in a source code comment

- s/collissions/collisions/

Obtained from: NetBSD
MFC after: 3 days

22 months agoAdd a flags parameter to the ffs_sbget() function that reads UFS superblocks.
Kirk McKusick [Sun, 31 Jul 2022 05:44:01 +0000 (22:44 -0700)]
Add a flags parameter to the ffs_sbget() function that reads UFS superblocks.

Rather than trying to shoehorn flags into the requested superblock
address, create a separate flags parameter to the ffs_sbget()
function in sys/ufs/ffs/ffs_subr.c. The ffs_sbget() function is
used both in the kernel and in user-level utilities through export
to the sbget() function in the libufs(3) library (see sbget(3)
for details). The kernel uses ffs_sbget() when mounting UFS
filesystems, in the glabel(8) and gjournal(8) GEOM utilities,
and in the standalone library used when booting the system
from a UFS root filesystem.

The ffs_sbget() function reads the superblock located at the byte
offset specified by its sblockloc parameter. The value UFS_STDSB
may be specified for sblockloc to request that the standard
location for the superblock be read.

The two existing options are now flags:

UFS_NOHASHFAIL will note if the check hash is wrong but will still
   return the superblock. This is used by the bootstrap code to
   give the system a chance to come up so that fsck can be run to
   correct the problem.

UFS_NOMSG indicates that superblock inconsistency error messages
   should not be printed. It is used by programs like fsck that
   want to print their own error message and programs like glabel(8)
   that just want to know if a UFS filesystem exists on a partition.

One additional flag is added:

UFS_NOCSUM causes only the superblock itself to be returned, but does
   not read in any auxiliary data structures like the cylinder group
   summary information. It is used by clients like glabel(8) that
   just want to check for possible filesystem types. Using UFS_NOCSUM
   skips the superblock checks for csum data which allows superblocks
   that have corrupted csum data to be read and used.

The validate_sblock() function checks that the superblock has not
been corrupted in a way that can crash or hang the system. Unless
the UFS_NOMSG flag is specified, it will print out any errors that
it finds. Prior to this commit, validate_sblock() returned as soon
as it found an inconsistency so would print at most one message.
It now does all its checks so when UFS_NOMSG has not been specified
will print out everything that it finds inconsistent.

Sponsored by: The FreeBSD Foundation

22 months agocalendar: clarify comment syntax in man page
Stefan Eßer [Sun, 31 Jul 2022 05:37:05 +0000 (07:37 +0200)]
calendar: clarify comment syntax in man page

The single line comment indicator '//' is only detected at the
beginning of a line or when following white space to allow URLs
in calendar entries.

MFC after: 3 days

22 months agoUpdates to UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Sat, 30 Jul 2022 01:01:46 +0000 (18:01 -0700)]
Updates to UFS/FFS superblock integrity checks when reading a superblock.

Reorder a few checks to ensure fields have been checked before
using them to check other fields.

Add eight new checks mostly checking for non-negative values.

No legitimate superblocks should fail as a result of these changes.

23 months agoiwlwifi firmware: update to -73 / newer builds for 9xxx
Bjoern A. Zeeb [Sun, 31 Jul 2022 00:36:23 +0000 (00:36 +0000)]
iwlwifi firmware:  update to -73 / newer builds for 9xxx

Update iwlwifi 22000 firmware to -73 and rebuilds for 9000/9260.
Update the driver to accept the newer version.

Firmware was obtained from linux-firmware at
150864a4d73e8c448eb1e2c68e65f07635fe1a66.

Sponsored by: The FreeBSD Foundation
MFC after: 23 days

23 months agotools/uma/smrstress: fix kthread exit
Konstantin Belousov [Sat, 30 Jul 2022 18:54:34 +0000 (21:54 +0300)]
tools/uma/smrstress: fix kthread exit

By convention, kernel threads must call kthread_exit() instead of
blindly returning from the thread function.  We have some safety measure
in fork_exit(), which checks for the P_KPROC p_flag and does
kthread_exit() for kernel thread that forgot to do it itself.

But this workaround only works for kernel threads belonging to the
kernel process.  If a kernel thread is attached to the normal process
with live userspace, and does not call kthread_exit(), then the
workaround is not activated, and for amd64 at least, the return from the
thread function/fork_exit() results in the return to userspace with the
copy of frame from the thread that did kthread_add().

Practically for smrstress, this destroys the user stack of the still
active frame in the other thread, which was the caller of kthread_add().

Fix it by adding kthread_exit() to the thread function.

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D35999

23 months agoiommu_gas: Eliminate redundant parameters and push down lock acquisition
Alan Cox [Fri, 29 Jul 2022 06:14:46 +0000 (01:14 -0500)]
iommu_gas: Eliminate redundant parameters and push down lock acquisition

Since IOMMU map entries store a reference to the domain in which they
reside, there is no need to pass the domain to iommu_gas_free_entry(),
iommu_gas_free_space(), and iommu_gas_free_region().

Push down the acquisition and release of the IOMMU domain lock into
iommu_gas_free_space() and iommu_gas_free_region().

Both of these changes allow for simplifications in the callers of the
functions without really complicating the functions themselves.
Moreover, the latter change eliminates the direct use of the IOMMU
domain lock from the x86-specific DMAR code.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D35995

23 months agosockets: add MSG_TRUNC flag handling for recvfrom()/recvmsg().
Alexander V. Chernikov [Mon, 25 Jul 2022 19:46:40 +0000 (19:46 +0000)]
sockets: add MSG_TRUNC flag handling for recvfrom()/recvmsg().

Implement Linux-variant of MSG_TRUNC input flag used in recv(), recvfrom() and recvmsg().
Posix defines MSG_TRUNC as an output flag, indicating packet/datagram truncation.
Linux extended it a while (~15+ years) ago to act as input flag,
resulting in returning the full packet size regarless of the input
buffer size.
It's a (relatively) popular pattern to do recvmsg( MSG_PEEK | MSG_TRUNC) to get the
packet size, allocate the buffer and issue another call to fetch the packet.
In particular, it's popular in userland netlink code, which is the primary driving factor of this change.

This commit implements the MSG_TRUNC support for SOCK_DGRAM sockets (udp, unix and all soreceive_generic() users).

PR: kern/176322
Reviewed by: pauamma(doc)
Differential Revision: https://reviews.freebsd.org/D35909
MFC after: 1 month

23 months agoLinuxKPI: 802.11: add missing linuxkpi_cfg80211_bss_flush()
Bjoern A. Zeeb [Sat, 30 Jul 2022 14:23:14 +0000 (14:23 +0000)]
LinuxKPI: 802.11: add missing linuxkpi_cfg80211_bss_flush()

Add the missing implementation of linuxkpi_cfg80211_bss_flush().
without this we get unresolved symbols and drivers won't load.

Reported by: eduardo, Berislav Purgar (bpurgar gmail.com)
MFC after: 3 days
X-MFC-Squash: b0f73768220e945deebebefc4a2d63ae6a3bfe19

23 months agostand: Add a helper 'universe' target
Warner Losh [Sat, 30 Jul 2022 11:01:47 +0000 (05:01 -0600)]
stand: Add a helper 'universe' target

Add a shortcut for invokging ${SRCTOP}/tools/boot/universe.sh by
creating a 'universe' target in src/stand. This will make it easier to
test out all the different combinations of boot loaders that we build.

Sponsored by: Netflix

23 months agostand: Move quit command to common commands
Warner Losh [Sat, 30 Jul 2022 10:43:21 +0000 (04:43 -0600)]
stand: Move quit command to common commands

Since both EFI and the future kboot will benefit from a 'quit' command,
move it from efi/loader/main.c to common/commands.c. In EFI this command
exits back to the boot loader (which will cause the next BootXXXX in the
BootOrder list to be attempted). In kboot, this will exit back to
whatever called loader.kboot. In uboot this will cause a reset (which
will restart uboot, not quite a simple exit, but will look similar)
and in OFW it will execute OF_exit which should return to the
openfirmware prompt.

Sponsored by: Netflix

23 months agompc85xx/pci: Conditionally reset PCI bridges
Justin Hibbits [Sat, 30 Jul 2022 01:43:42 +0000 (21:43 -0400)]
mpc85xx/pci: Conditionally reset PCI bridges

Sometimes we need to reset a PCIe bus, but sometimes it breaks the
downstream device(s).  Since, from my testing, this is only needed for
Radeon cards installed in the AmigaOne machines because the card was
already initialized by firmware, make the reset dependent on a device
hint (hint.pcib.X.reset=1).  With this, AmigaOne X5000 machines can have
other devices in the secondary PCIe slots.

23 months agoIntroduce and use the NET_EPOCH_DRAIN_CALLBACKS() macro
Zhenlei Huang [Fri, 29 Jul 2022 13:02:39 +0000 (15:02 +0200)]
Introduce and use the NET_EPOCH_DRAIN_CALLBACKS() macro

Reviewed by: melifao, kp
Differential Revision: https://reviews.freebsd.org/D35968

23 months agovmd: Add 8086:A77F PCI ID for all Intel Raptor Lake SKUs
Neel Chauhan [Fri, 29 Jul 2022 18:06:06 +0000 (11:06 -0700)]
vmd: Add 8086:A77F PCI ID for all Intel Raptor Lake SKUs

Summary:
This is based on the Linux kernel commit
922bfd001d1ac02111ebbe0524aaab6ca7925521.

Reviewed by: mav (src)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D35996

23 months agoFix for 90e2971 that caused some geli commands to return the wrong exit status.
Kirk McKusick [Fri, 29 Jul 2022 18:11:09 +0000 (11:11 -0700)]
Fix for 90e2971 that caused some geli commands to return the wrong exit status.

The reported problem is that some geli commands exit with a
success status when they should exit with a failed status.

The gctl_error() function is defined differently in the kernel
(in sys/geom/geom_ctl.c) versus in the geom user facilities (in
sbin/geom/misc/subr.c). In the kernel, calling gctl_error() causes
an error return to be set while in the user version it does not.
It was only by a quirk that had been added to the user geom return
processing that I "cleaned up" that the lack of the user implementaion
to set the error return showed up.

This patch adds the missing setting of the error code when calling
the user facility gctl_error().

Reported by:  Jenkins
Debugging by: Alan Somers
Debugging by: Cy Schubert
Debugging by: Li-Wen Hsu

23 months agoLinuxKPI: 802.11 header updates
Bjoern A. Zeeb [Fri, 29 Jul 2022 15:23:49 +0000 (15:23 +0000)]
LinuxKPI: 802.11 header updates

While working on new and updates to drivers more structs, fields,
functions, .. were found, had to be shuffled around, ..
Some of these are (so far still dummy) functions or not properly
typed fields.  The IEEE80211_HE_ constants are all still dummy.
This was msotly as a start to make new (out-of-tree) things compile.

Sponsored by: The FreeBSD Foundation (minor VHT/chan width bits)
MFC after: 1 week

23 months agoLinuxKPI: skbuff: sort list header and add new (dummy) functions
Bjoern A. Zeeb [Fri, 29 Jul 2022 15:21:48 +0000 (15:21 +0000)]
LinuxKPI: skbuff: sort list header and add new (dummy) functions

While working on new and updates to drivers more skbuff changes
came up.  Sort out the list/prev/next header problem and add more
(so far dummy) functions needed.

MFC after: 1 week

23 months agonet80211: change order in ieee80211_vhtchanflags()
Bjoern A. Zeeb [Fri, 29 Jul 2022 00:18:48 +0000 (00:18 +0000)]
net80211: change order in ieee80211_vhtchanflags()

While 80P80 is less likely to be used, VHT160 (a single contiguous
width) is harder to acquire but also preferable so return that first.

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

23 months agonet80211: VHT correct check/option in ieee80211_vht_adjust_channel()
Bjoern A. Zeeb [Fri, 29 Jul 2022 00:12:34 +0000 (00:12 +0000)]
net80211: VHT correct check/option in ieee80211_vht_adjust_channel()

In ieee80211_vht_adjust_channel() we have to check for all possible
IEEE80211_FVHT_VHT* options using the mask rather than just checking
for IEEE80211_FVHT_VHT;  ieee80211_vhtchanflags() (contrary to its
HT counterpart) only returns the "highest" flag nor or-ing them together
with the base flag.  For the moment this seems to make sense as with
more width options we'd add a pyramid.

Later on, in the same function when we get VHT160 actually go and look
for VHT160 and not VHT80.

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

23 months agonet80211: add VHT5G and VHT2G checks/return to media_status
Bjoern A. Zeeb [Fri, 29 Jul 2022 00:10:34 +0000 (00:10 +0000)]
net80211: add VHT5G and VHT2G checks/return to media_status

Add the fields for VHT (2Ghz and 5Ghz) to report back by media_status
so we actually have a chance to get the right information.

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

23 months agonet80211: improve DDB output.
Bjoern A. Zeeb [Fri, 29 Jul 2022 00:05:51 +0000 (00:05 +0000)]
net80211: improve DDB output.

Start adding more fields to DDB output related to VHT (11ac) and
mark COM, VAP, and STA more explicitly to make show all vaps /..
more readable.

Sponsored by: The FreeBSD Foundaton
MFC after: 1 week
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D35977

23 months agonet80211: correct IEEE80211_FEXT_BITS
Bjoern A. Zeeb [Fri, 29 Jul 2022 00:03:37 +0000 (00:03 +0000)]
net80211: correct IEEE80211_FEXT_BITS

Correct IEEE80211_FEXT_BITS adding the missed one and move the later
one further.  This will actually make VHT to show.

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

23 months agonet80211: add more 802.11ac Element IDs
Bjoern A. Zeeb [Thu, 28 Jul 2022 23:59:08 +0000 (23:59 +0000)]
net80211: add more 802.11ac Element IDs

Add more Element IDs for VHT (11ac) to complete the current list
and we can use them if/as needed.

Sposnored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D35977

23 months agonet80211: radiotap: add one more define for HE
Bjoern A. Zeeb [Thu, 28 Jul 2022 23:56:07 +0000 (23:56 +0000)]
net80211: radiotap:  add one more define for HE

Add one more define for HE radiotap used by a driver.

MFC after: 1 week
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D35977

23 months agoip6(4): document IP_ORIGDSTADDR
Alan Somers [Sun, 24 Jul 2022 15:06:39 +0000 (09:06 -0600)]
ip6(4): document IP_ORIGDSTADDR

The option was originally added in r313524, but with incomplete
documentation.

MFC after: 1 week
Reviewed by: karels, gbe (manpages)
Differential Revision: https://reviews.freebsd.org/D35890

23 months agoMove sort to runtime
Doug Rabson [Fri, 29 Jul 2022 09:15:24 +0000 (10:15 +0100)]
Move sort to runtime

Allows pkg bootstrap without having to install FreeBSD-utilities

23 months agoloader: fix powerpc64le ofw loader
Alfredo Dal'Ava Junior [Fri, 29 Jul 2022 08:03:30 +0000 (05:03 -0300)]
loader: fix powerpc64le ofw loader

This is similar to 5d48fb3b16c1496bf415fee620c61cc944b0326d.
With LLVM14 the .data.rel.ro ELF section appears after .data,
making loader behave erractly and kernel is not loaded.
This patch makes ensures the correct order.

Based on discussion at:
            https://github.com/llvm/llvm-project/issues/56306

MFC after: 1 day
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)

23 months agox86/iommu: Reduce DMAR lock contention
Alan Cox [Tue, 26 Jul 2022 06:04:54 +0000 (01:04 -0500)]
x86/iommu: Reduce DMAR lock contention

Replace the DMAR unit's tlb_flush TAILQ by a custom list implementation
that enables dmar_qi_task() to dequeue entries without holding the DMAR
lock.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D35951

23 months agoObsoleteFiles: Fix paths for removed manual pages.
Xin LI [Fri, 29 Jul 2022 05:03:02 +0000 (22:03 -0700)]
ObsoleteFiles: Fix paths for removed manual pages.

23 months agoLinuxKPI 802.11/iwlwifi/rtw88: update KPI
Bjoern A. Zeeb [Thu, 28 Jul 2022 23:39:03 +0000 (23:39 +0000)]
LinuxKPI 802.11/iwlwifi/rtw88: update KPI

Upgrade the argument of (*bss_info_changed) mac80211 ops function call
from 32 to 64 bit.
Add an extra argument to ieee80211_beacon_get_template().

Both changes are needed in order to keep other out-of-tree drivers in
synch and to move forward.

The driver changes were extracted from Linux wireless-testing
7b7090b4c6a906cc7c3e2a460335f705b93f4506 and
6e8912a503759bb8f1f01c5b761d0d45815fa6de.

Sponsored by: The FreBSD Foundation
MFC after: 1 week

23 months agopmap_mapdev: Consistently use vm_paddr_t for the first argument.
John Baldwin [Thu, 28 Jul 2022 22:55:10 +0000 (15:55 -0700)]
pmap_mapdev: Consistently use vm_paddr_t for the first argument.

The devmap variants used vm_offset_t for some reason, and a few places
explicitly cast bus addresses to vm_offset_t.  (Probably those casts
along with similar casts for vm_size_t should just be removed and
instead permit the compiler to DTRT.)

Reviewed by: markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D35961

23 months agokboot: Make console raw when we start
Warner Losh [Tue, 26 Jul 2022 23:39:45 +0000 (17:39 -0600)]
kboot: Make console raw when we start

Put the console into raw mode on startup. This allows the menus to work
as expected. Boot is now interruptable.

Note: Likely should restore the terminal settings on most exists.  It's
not clear the best way to do this, and most shells have an auto stty
sane anyway, so note it for future improvement.

Sponsored by: Netflix

23 months agokboot: implement stripped down termios
Warner Losh [Tue, 26 Jul 2022 23:31:23 +0000 (17:31 -0600)]
kboot: implement stripped down termios

Implement a stripped down termios, obtained from various files in musl
and HOST_ or host_ prepended to most things and a few unavoidable style
tweaks. Only implements the bits of termios we need for the boot loader:
put the terminal into raw mode, restore terminal settings and speed
stuff.

Sponsored by: Netflix

23 months agokboot: Implement host_ioctl
Warner Losh [Tue, 26 Jul 2022 23:30:30 +0000 (17:30 -0600)]
kboot: Implement host_ioctl

Sponsored by: Netflix

23 months agokboot: Add host_exit and use it to implement exit()
Warner Losh [Thu, 28 Jul 2022 21:18:08 +0000 (15:18 -0600)]
kboot: Add host_exit and use it to implement exit()

Clients of libsa are expected to implement exit(). The current exit just
loops forever. It is better to really exit: when running as init that
will reboot the system. When not running as init, other programs can
recover (not that we support running as init, but when we do in the
future, this is still the rigtht thing).

Sponsored by: Netflix

23 months agokboot: aarch64 support
Warner Losh [Mon, 11 Jul 2022 23:49:11 +0000 (17:49 -0600)]
kboot: aarch64 support

Add support for aarch64. exec.c and ldscript are copied from the EFI
version with #ifdefs for the differences. Once complete, I'll refactor
them. host_syscall.S implements a generic system call. tramp.S is a
first attempt to create a tramoline that we can use to jump to the
aarch64 kernel. Add aarch64-specific startup and stat files as well.
exec.c tweaked slightly to avoid bringing in bi_load(), which will come
in later. Includes tweaks to stat due to name differences between names
on different Linux architectures.

Sponsored by: Netflix

23 months agokboot: Move conf.c up to top level
Warner Losh [Thu, 28 Jul 2022 20:53:25 +0000 (14:53 -0600)]
kboot: Move conf.c up to top level

conf.c is the same now between powerpc64 and amd64, so move it up to
kboot. Move powerpc file formats defines to ppc64_elf_freebsd.c

Sponsored by: Netflix

23 months agoaltq: improve pfctl config time for large numbers of queues
James Skon [Thu, 28 Jul 2022 19:58:31 +0000 (21:58 +0200)]
altq: improve pfctl config time for large numbers of queues

In the current implementation of altq_hfsc.c, whne new queues are being
added (by pfctl), each queue is added to the tail of the siblings linked
list under the parent queue.

On a system with many queues (50,000+) this leads to very long load
times at the insertion process must scan the entire list for every new
queue,

Since this list is unordered, this changes merely adds the new queue to
the head of the list rather than the tail.

Reviewed by: kp
MFC after: 3 weeks
Sponsored by: RG Nets
Differential Revision: https://reviews.freebsd.org/D35964

23 months agohidbus(4): Align refcount checks for hidbus_intr_start() and hidbus_intr_stop().
Hans Petter Selasky [Thu, 23 Jun 2022 13:44:25 +0000 (15:44 +0200)]
hidbus(4): Align refcount checks for hidbus_intr_start() and hidbus_intr_stop().

No functional change intended.

Discussed with: wulf @
MFC after: 1 week
Sponsored by: NVIDIA Networking

23 months agoriscv: Avoid passing invalid addresses to pmap_fault()
Mark Johnston [Thu, 28 Jul 2022 13:38:52 +0000 (09:38 -0400)]
riscv: Avoid passing invalid addresses to pmap_fault()

After the addition of SV48 support, VIRT_IS_VALID() did not exclude
addresses that are in the SV39 address space hole but not in the SV48
address space hole.  This can result in mishandling of accesses to that
range when in SV39 mode.

Fix the problem by modifying VIRT_IS_VALID() to use the runtime address
space bounds.  Then, if the address is invalid, and pcb_onfault is set,
give vm_fault_trap() a chance to veto the access instead of panicking.

PR: 265439
Reviewed by: jhb
Reported and tested by: Robert Morris <rtm@lcs.mit.edu>
Fixes: 31218f3209ac ("riscv: Add support for enabling SV48 mode")
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35952

23 months agosrc.libnames.mk: NEED/WANT_COMPAT+static support
Brooks Davis [Thu, 28 Jul 2022 17:54:35 +0000 (18:54 +0100)]
src.libnames.mk: NEED/WANT_COMPAT+static support

Look in _LIB_OBJTOP for all static libraries not just INTERNALLIBs. In
normal operation this is a no-op, but improves the consistency of this
file.

Reviewed by: imp, jhb
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D35822

23 months agoncal: LT is the country code for Lithuania
Warner Losh [Thu, 28 Jul 2022 17:34:38 +0000 (11:34 -0600)]
ncal: LT is the country code for Lithuania

PR: 265479
MFC After: 3 days

23 months ago/usr/sbin/pkg: don't sleep on fetch failure
John Hood [Thu, 21 Apr 2022 21:39:14 +0000 (17:39 -0400)]
/usr/sbin/pkg: don't sleep on fetch failure

PR: 263458

23 months agodate: remove some ambiguity in tzdata references
Kyle Evans [Wed, 27 Jul 2022 17:30:18 +0000 (12:30 -0500)]
date: remove some ambiguity in tzdata references

The use of 'package' in this could be understood to mean a FreeBSD
package provided by pkg, rather than the fact that we use data provided
by IANA.  Re-word it to clearly identify `tzdata` as the IANA Time Zone
Database on first use, then drop subsequent uses of the word 'package'.

Reviewed by: 0mp, pauamma, philip
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35966

23 months agolagg: fix lagg ifioctl after SIOCSIFCAPNV
Andrew Gallatin [Thu, 28 Jul 2022 14:36:22 +0000 (10:36 -0400)]
lagg: fix lagg ifioctl after SIOCSIFCAPNV

Lagg was broken by SIOCSIFCAPNV when all underlying devices
support SIOCSIFCAPNV.  This change updates lagg to work with
SIOCSIFCAPNV and if_capabilities2.

Reviewed by: kib, hselasky
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D35865

23 months agolibc: ANSIfy div / ldiv function definitions
Ed Maste [Thu, 28 Jul 2022 14:17:33 +0000 (10:17 -0400)]
libc: ANSIfy div / ldiv function definitions

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

23 months agoqat: Add a required MODULE_DEPEND for firmware(9)
Mark Johnston [Thu, 28 Jul 2022 13:48:58 +0000 (09:48 -0400)]
qat: Add a required MODULE_DEPEND for firmware(9)

Reported by: kib
Sponsored by: The FreeBSD Foundation

23 months agoqat_c2xxx: Add a required MODULE_DEPEND for firmware(9)
Mark Johnston [Thu, 28 Jul 2022 13:47:34 +0000 (09:47 -0400)]
qat_c2xxx: Add a required MODULE_DEPEND for firmware(9)

Reported by: kib
Sponsored by: The FreeBSD Foundation

23 months agostyle: Tighten up one use of 'may'
Warner Losh [Thu, 28 Jul 2022 14:01:09 +0000 (08:01 -0600)]
style: Tighten up one use of 'may'

Declarations of variables must be placed before the statements of a
block, by convention. Use 'must' instead of 'may' here and clarify
langauge.

Sponsored by: Netflix
Reviewed by: pstef, rpokala, hselasky
Differential Revision: https://reviews.freebsd.org/D35959

23 months agostyle: Use oxford comma in one place.
Warner Losh [Thu, 28 Jul 2022 13:59:56 +0000 (07:59 -0600)]
style: Use oxford comma in one place.

Suggested by: pauamma
Sponsored by: Netflix

23 months agoStyle(9): Strengthen statements about not using K&R function definitions
Warner Losh [Thu, 28 Jul 2022 13:58:32 +0000 (07:58 -0600)]
Style(9): Strengthen statements about not using K&R function definitions

K&R function definitions will soon be obsolete. Work has been underway
to remove all K&R function definitions from the tree for a while now. A
future C version will remove this construct from the language. So
strengthen existing statements about K&R function definitions and
declarations.

While here, remove __P macro reference. It's not been in active use for
almost two decades apart from legacy contrib code.

Sponsored by: Netflix
Reviewed by: pauamma, rpokala, hselasky, kp, brooks, markm, emaste
Differential Revision: https://reviews.freebsd.org/D35945

23 months agoRevert "csu: test: explicitly add libm as build parameter"
Alfredo Dal'Ava Junior [Wed, 27 Jul 2022 22:10:56 +0000 (19:10 -0300)]
Revert "csu: test: explicitly add libm as build parameter"

This reverts commit 4f5890a0fb086324a657f3cd7ba1abc57274e0db.

9ef1127008ce94cf626daed346a3c1ee03063617 is a proper fix for
the problem we tried to address.

Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)

23 months agokboot: Remove RELOC defines, it's unused
Warner Losh [Thu, 28 Jul 2022 05:11:12 +0000 (23:11 -0600)]
kboot: Remove RELOC defines, it's unused

This was copied from powerpc/ofw and has never been used. We also don't
care about -DAIM. It's only relevant for in-kernel structures, which we
don't use in this userland program.

Sponsored by: Netflix

23 months agokboot: Convert from getdents to getdents64
Warner Losh [Thu, 28 Jul 2022 04:24:50 +0000 (22:24 -0600)]
kboot: Convert from getdents to getdents64

Linux 2.4 introduced getdents64. Switch to using it because aarch64
doesn't have getdents as that syscall was obsoleted before that port was
created.

Sponsored by: Netflix

23 months agokboot: Do a style(9) pass on kbootfdt.c
Warner Losh [Thu, 28 Jul 2022 04:07:52 +0000 (22:07 -0600)]
kboot: Do a style(9) pass on kbootfdt.c

Mostly just properly indent.

Sponsored by: Netflix

23 months agoRemove unnecessary terminating slash in iscsi module Makefile
Dimitry Andric [Wed, 27 Jul 2022 19:04:22 +0000 (21:04 +0200)]
Remove unnecessary terminating slash in iscsi module Makefile

The additional slash causes double slashes in the filenames that
eventually get passed to the compiler.

MFC after: 3 days

23 months agoAdjust function definition in isa's pnp.c to avoid clang 15 warning
Dimitry Andric [Wed, 27 Jul 2022 19:02:51 +0000 (21:02 +0200)]
Adjust function definition in isa's pnp.c to avoid clang 15 warning

With clang 15, the following -Werror warning is produced:

    sys/isa/pnp.c:118:24: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    pnp_send_initiation_key()
                           ^
                            void

This is because pnp_send_initiation_key() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.

MFC after: 3 days

23 months agoSuppress possible unused variable warning for icl_soft.c
Dimitry Andric [Wed, 27 Jul 2022 19:00:22 +0000 (21:00 +0200)]
Suppress possible unused variable warning for icl_soft.c

With clang 15, the following -Werror warning is produced on i386:

    sys/dev/iscsi//icl_soft.c:1277:6: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
            int i;
                ^

The 'i' variable is used later in the icl_soft_conn_pdu_get_bio()
function, via the PHYS_TO_DMAP() macro. However, on i386 and some other
architectures, this macro is defined to panic immediately, so in those
cases, 'i' is indeed not used. Suppress the warning by marking 'i' as
unused.

MFC after: 3 days

23 months agobhyve: fix spelling mistake in passthru emulation
Corvin Köhne [Wed, 27 Jul 2022 14:43:01 +0000 (16:43 +0200)]
bhyve: fix spelling mistake in passthru emulation

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D35707
Sponsored by: Beckhoff Automation GmbH & Co. KG

23 months agobhyve: Initialize more registers in vcpu_reset()
Corvin Köhne [Wed, 27 Jul 2022 14:41:02 +0000 (16:41 +0200)]
bhyve: Initialize more registers in vcpu_reset()

- Clear CR2, EFER, and R8-15 to zero.
- Reset DR6 and DR7 to their documented reset values.
- Reset interrupt shadow state.
- Document the reason CR0 is reset to a value that doesn't match its
documented value.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D35622
Sponsored by: Beckhoff Automation GmbH & Co. KG

23 months agovmm: emulate INVD by ignoring it
Corvin Köhne [Wed, 27 Jul 2022 14:39:47 +0000 (16:39 +0200)]
vmm: emulate INVD by ignoring it

On physical systems the ram isn't initialized on boot. So, coreboot uses
the cache as ram in this boot phase. When exiting cache as ram, coreboot
calls INVD for making the cache consistent.

In a virtual environment ram is always initialized and the cache is
always consistent. So, we can safely ignore this call.

Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D35620
Sponsored by: Beckhoff Automation GmbH & Co. KG

23 months agoUpdate to bmake-20220726
Simon J. Gerraty [Wed, 27 Jul 2022 15:58:09 +0000 (08:58 -0700)]
Update to bmake-20220726

Merge commit '31a96ca5f0b6e5f8f7fa8cecf3a5c4354b3b096f'

23 months agoImport bmake-20220726
Simon J. Gerraty [Wed, 27 Jul 2022 15:56:53 +0000 (08:56 -0700)]
Import bmake-20220726

Relevant/interesting changes:

* Auto-create objdir for bmake/unit-tests if appropriate

23 months agoRELNOTES: Fix whitespace
Mark Johnston [Thu, 21 Jul 2022 15:07:33 +0000 (11:07 -0400)]
RELNOTES: Fix whitespace

23 months agoRELNOTES: Add an entry for the new QAT driver
Mark Johnston [Thu, 21 Jul 2022 15:07:11 +0000 (11:07 -0400)]
RELNOTES: Add an entry for the new QAT driver

Sponsored by: The FreeBSD Foundation

23 months agoqat: Import a new Intel (R) QAT driver
Julian Grajkowski [Tue, 19 Jul 2022 08:15:34 +0000 (09:15 +0100)]
qat: Import a new Intel (R) QAT driver

QAT in-tree driver ported from out-of-tree release available
from 01.org.

The driver exposes complete cryptography and data compression
API in the kernel and integrates with Open Crypto Framework.
Details of supported operations, devices and usage can be found
in man and on 01.org.

Patch co-authored by: Krzysztof Zdziarski <krzysztofx.zdziarski@intel.com>
Patch co-authored by: Michal Jaraczewski <michalx.jaraczewski@intel.com>
Patch co-authored by: Michal Gulbicki <michalx.gulbicki@intel.com>
Patch co-authored by: Julian Grajkowski <julianx.grajkowski@intel.com>
Patch co-authored by: Piotr Kasierski <piotrx.kasierski@intel.com>
Patch co-authored by: Adam Czupryna <adamx.czupryna@intel.com>
Patch co-authored by: Konrad Zelazny <konradx.zelazny@intel.com>
Patch co-authored by: Katarzyna Rucinska <katarzynax.kargol@intel.com>
Patch co-authored by: Lukasz Kolodzinski <lukaszx.kolodzinski@intel.com>
Patch co-authored by: Zbigniew Jedlinski <zbigniewx.jedlinski@intel.com>

Reviewed by: markj, jhb (OCF integration)
Reviewed by: debdrup, pauamma (docs)
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D34632

23 months agoqat: Rename to qat_c2xxx and remove support for modern chipsets
Mark Johnston [Wed, 27 Jul 2022 14:55:40 +0000 (10:55 -0400)]
qat: Rename to qat_c2xxx and remove support for modern chipsets

A replacement QAT driver will be imported, but this replacement does not
support Atom C2xxx hardware.  So, the existing driver will be kept
around to provide opencrypto offload support for those chipsets.

Reviewed by: pauamma, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35817

23 months agostand: tftp.c doesn't need bootinfo.h
Warner Losh [Tue, 26 Jul 2022 03:45:35 +0000 (21:45 -0600)]
stand: tftp.c doesn't need bootinfo.h

tftp.c includes bootinfo.h, but doesn't need it. Remove it, and remove
the -Istand/common from CFALGS since that's the only reason we had it.

Sponsored by: Netflix
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D35928