Commit 1cbb58886a (shipped in 12.0.0) removed all lint infrastructure.
A bunch of NO_LINT definitions remained (perhaps as a bootstrapping
measture). Remove them.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D50704
There are enough cases where the duplicate name is caused by dubious
hardware configuration. Stopping the whole system instead of failing a
driver, or even a diagnostic subsystem in a driver, is more
user-friendly.
Another issue right now is that the check is only present for the
INVARIANTS builds, silently accepting the request to create an entry
with the existing name on production builds.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50669
We need to invalidate timestamps when a TX queue is cleared so that the
TX timeout detection callout does not mistakenly fire for cleared
packets. When using DQO queue formats, timestamps are set on the pending
packet array whose length is not the same as the length of the
descriptor ring itself. This commit fixes logic which invalidated the
wrong number of pending packets.
Signed-off-by: Jasper Tran O'Leary <jtranoleary@google.com>
Fixes: 3d2957336c ("gve: Add callout to detect and handle TX timeouts")
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D50688
These lines have been commented out ever since the first import of fuse.
The intention seems to be for the original developer to experiment with
different error handling strategies, but they're very obsolete by now.
Delete them.
MFC after: 2 weeks
Sponsored by: ConnectWise
This bug was fixed by googletest back in 2019 and released in googletest
1.10.0, I think. Using GTEST_SKIP from a test environment works now.
https://github.com/google/googletest/issues/2189
MFC after: 2 weeks
Sponsored by: ConnectWise
This reduces the number of duplicate string tables for NVMe opcodes
and status codes.
Adjust the formatting of unknown opcodes and status codes to more
closely match nvme(4).
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D50652
This makes it possible to share these tables with the nvme(4) driver
in custom kernels that do not include any CAM support, only nvd(4).
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D50685
The original list of IEs got expanded from TLV to TLextTV.
If the T matches 255 then we have a second list of IEs where the
meaning of TL stays the same. That means the 1 octet extT is part
of the length and the value starts at ie+3.
Start populating the list with IEEE802.11-2020 and 802.11ax-2021
values.
They will be initially used to start decoding some of the announced IEs
for ifconfig [-v] list (scan|sta). That should help users with
AX-enabled APs to see this (rather than no or UNKNOWN_ELEMID_255 and
make debugging easier once we implement 11ax.
Sposored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D50674
Annotate a few which are obsolete (gone).
Naming as usual is questionable and I contemplated using the names
from wpa with a different prefix but then we end up with another mix.
While updating the reference to the newer standard I haven't made
a full pass again and I cannot say which version I used in 2020.
The motivation for this is to get rid of unknown IEs displayed in
ifconfig and elsewhere.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Fixes: 50982d26e4 (MMIC -> MGMT_MIC)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D50671
While we decided that we will not provide WEP support for the LinuxKPI
802.11 compat code, some of it is in there already (also because drivers
still support it). Put proper keylen checks in place as net80211 only
knows about WEP while LinuxKPI has WEP40 and WEP104.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
For iwlwifi, rtw88, and rtw89 we can treat GCMP the same way as we
treat CCMP which allows us to re-use the CCMP code for now.
Add the missing case statements and factor out some common code.
Allow IEEE80211_CRYPTO_AES_GCM_128 through our filter of supported
cipher suites to announce it to net80211.
Sponsored by; The FreeBSD Foundation
MFC after: 3 days
During testing I hit a case where htcap->mcs.rx_mask[0,1] were zero.
This should not happen as that would mean we are not supporting HT.
After adding extra caution for debugging I could no longer reproduce
the case.
So just to deal with the eventuality make synching from HT more
resilient by checking that we have nss > 0 or otherwise disable
HT operations.
Move setting the bandwidth below this check to not alter it in
case of the now early return.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
add_route_flags() frees the rtentry on error when called with the RTM_F_CREATE
flag. Don't free the rtentry a second time.
Reviewed by: ae
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D50665
Import MIT KRB5 1.21.3, which will gracefully replace KTH Heimdal.
The tarball used in this import is the same tarball used in
ports/krb5-121.
The Makefiles to add MIT KRB5 to the build will be added later.
Obtained from: http://web.mit.edu/kerberos/dist/
Sponsored by: The FreeBSD Foundation
Add 'crypto/krb5/' from commit '8f7d3ef26dec89a92ec0665de84a5936310a5574'
git-subtree-dir: crypto/krb5
git-subtree-mainline: bf6873c578
git-subtree-split: 8f7d3ef26d
From https://www.eyrie.org/~eagle/software/pam-krb5/:
pam-krb5 provides a Kerberos PAM module that supports authentication,
user ticket cache handling, simple authorization (via .k5login or
checking Kerberos principals against local usernames), and password
changing. It can be configured through either options in the PAM
configuration itself or through entries in the system krb5.conf file,
and it tries to work around PAM implementation flaws in commonly-used
PAM-enabled applications such as OpenSSH and xdm. It supports both
PKINIT and FAST to the extent that the underlying Kerberos libraries
support these features.
The reason for this import is to provide an MIT KRB5 compatible
pam_krb5 PAM module. The existing pam_krb5 in FreeBS only works
with Heimdal.
The Makefiles to hook this software into the build willl come later.
Sponsored by: The FreeBSD Foundation
Add 'contrib/pam-krb5/' from commit '24f0b4ca2d565cdbb4fe7839ff28320706bf2386'
git-subtree-dir: contrib/pam-krb5
git-subtree-mainline: 290e8aaa38
git-subtree-split: 24f0b4ca2d
This is the first in a series of commits to replace Heimdal with
MIT KRB5. This first commit adds the WITH_MITKRB5/MK_MITKRB5 knob
to src.opts.mk and its corresponding documentation in
tools/build/options. The default is off.
This change of and by itself is of no consequence as MIT KRB5 has
yet to be imported in to HEAD. But it does insulate the build from
inremental change until the last patch is committed when WITH_MITKRB5
will build MIT KRB5 1.21.3 instead of Heimdal.
The affords us the opportunity to review smaller commits.
This is the first of many commits.
Reviewed by: imp, jhb, brooks, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50684
If a NFSv4 client does an exclusive open where the file
already exists, the server returns EEXIST. However,
without this patch, a partially filled in nfslockfile
structure is allocated, but is not referenced by any open
and, as such, never gets freed.
This patch fixes the bug by checking for EEXIST before
calling nfsvno_open().
Reported by: Christoper Iler <ciler@volexity.com>
Tested by: Christoper Iler <ciler@volexity.com>
MFC after: 2 weeks
Commit 2ec2ba7e23 added support for the O_NAMEDATTR flag to
the open(2) and openat(2) syscalls for main.
This patch updates the man page for this flag.
Another man page that explains named attributes will
be introduced in a future commit.
This is a content change.
Reviewed by: emaste (earlier version), kib (earlier version)
Differential Revision: https://reviews.freebsd.org/D49691
Fixes: 2ec2ba7e23 ("vfs: Add VFS/syscall support for Solaris style extended attributes")
It's unused, and the naked strcpy() was susceptible to buffer overflow
if one creates, say, a probe called "profile-2000000000ns".
Reported by: CHERI
MFC after: 1 week
Sponsored by: Innovate UK
Now that bsd.prog.mk uses .pieo instead of .o for object files linked
into PIEs, we need to ensure that the object file generated by dtrace -G
has the same extension.
Fixes: 245bb01106 ("Use .pieo extension for WITH_PIE bsd.prog.mk output")
Sponsored by: Innovate UK
If we are doing DIRDEPS_BUILD and MK_RUN_TESTS is yes
we can hook tests associated with dirs to be built into the graph
such that we avoid circular dependencies but the build will fail
should any test fail.
Make MK_RUN_TESTS independent of MK_TESTS
also for non-DIRDEPS_BUILD ensure we have RELDIR and check it
against patterns in HOST_RUN_TESTS.
Reviewed by: stevek
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D50387
This allows userspace to run on a (somewhat) out of date kernel.
Avoid a __FreeBSD_version bump and use the bump from a02180cf60 which
has occured since exterrctl was added.
Reviewed by: kevans
Fixes: b9c8a07d4d ("C runtime: enable extended error reporting from kernel")
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D50687
The primary benefit of this rewrite is that it parallelizes a number of
the make(1) jobs that it needs to do. It does so with a very naive
forking model that could likely be improved, but is sufficient for our
purposes. This version also doesn't assume that CWD is sane, and
instead operates relative to the directory the script resides in.
Note that this initial version is only intended to match the output of
the legacy script. Some work is planned afterward to refactor the
script out into various components to improve maintainability after we
have switched over to it.
In my horribly performing dev environment, this version runs in 40s
rather than the original ~2 minutes. On a Mt. Snow machine, this
version runs in ~15s rather than the original ~1m40s.
This change does not yet switch the top-level `makeman` target over to
the new version.
Reviewed by: bapt (earlier version), emaste
Differential Revision: https://reviews.freebsd.org/D39084
Replace nvme_cmd_string and nvme_opcode_string with a single function.
nvme_cmd_string was already using an sbuf around a caller-supplied
string, so use the same pattern for the entire command string.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D50651
This file depends on sys/types.h being included before it, which isn't
the best assumption. Include it here since we have no namespace
pollution concerns.
Sponsored by: Netflix
If an interface is a bridge member, and a vlan(4) is also created on
that interface, and net.link.bridge.member_ifaddrs=0, then vlan(4)
will never see any incoming frames because bridge doesn't pass them
to the host for processing.
Work around this by checking for locally-addressed frames using the
MAC address of the interface we received the frame on, but only if
the frame has a .1q tag and there's a vlan trunk on the interface.
This behaviour is almost certainly "wrong" and it's not clear if we
really want to support this, but it did work in the past and the
member_ifaddrs change was not supposed to break it, so this restores
the previous behaviour.
PR: 287150
MFC after: 1 week
Reviewed by: kevans, des
Approved by: kevans (mentor), des (mentor)
Differential Revision: https://reviews.freebsd.org/D50623
After f91d251b39, some rc.d scripts are gated behind the src.conf knob
for the services they start. Add them to OptionalObsoleteFiles.inc so
they are properly removed when the knob is disabled.
Fixes: f91d251b39 ("rc.d: move some rc scripts to their packages")
Reviewed by: kevans, jhb
Approved by: kevans (mentor)
Differential Revision: https://reviews.freebsd.org/D50560
release/packages/runtime.ucl manually adds "/tmp" and "/dev" to the
"directories" key, which causes them to be included in the manifest
with the user/group owner of whoever built the package repository:
drwxr-xr-x 7 ivy wheel 512 Jun 1 17:24 /dev
drwxrwxrwt 10 ivy wheel 10 Jun 1 17:42 /tmp
Remove the manual entries and instead put an explicit package tag
in etc/mtree/BSD.root.dist. This also means /tmp gets the right
mode by default and we can remove the chmod from the post-install
script.
Reviewed by: manu, kevans, emaste
Approved by: kevans (mentor)
Differential Revision: https://reviews.freebsd.org/D50636
Many of the tests in if_bridge_test create new epair interfaces and
then add them to a bridge.
If devd is running, devd will attempt to configure these interfaces
based on the host's /etc/rc.conf, and may enable IPv6 on the new
interface (for example, if ipv6_activate_all_interfaces is enabled),
causing an IPv6 link-local address to be assigned to the epair. This
causes the test to fail if net.link.bridge.member_ifaddrs is set to 0,
which is the default.
Fix this by running the tests in a jail, so there is no devd to
interfere with our new interfaces.
Reviewed by: kevans, kp, des
Approved by: des (mentor), kevans (mentor)
Differential Revision: https://reviews.freebsd.org/D50476
Test cleanup times out after 60 seconds, causing the test to fail if the
cleanup hasn't finished in time. This timeout should be configurable,
but it currently is not.
Several tests (e.g. bridge, pf) are now reaching this limit; as a
workaround, increase the timeout to 300 seconds.
Reviewed by: igoro, kevans, des
Approved by: des (mentor), kevans (mentor)
Differential Revision: https://reviews.freebsd.org/D50499
This should be 4094 (0xFFE), not 4095 (0xFFF), since 0xFFF is not a
valid VID.
Fixes: c594920250 ("sys/net: add DOT1Q_VID_{MIN,MAX}")
MFC after: 3 days
Reviewed by: kevans, kp, adrian
Approved by: kevans (mentor)
Differential Revision: https://reviews.freebsd.org/D50576
The previous clean-ups to remove some direct ifp manipulation have
removed the need for if_private.h in these source files.
Differential Revision: https://reviews.freebsd.org/D50646
Reviewed by: bz
Convert the couple of uses of ifnet structure bits into ifnet
calls and remove the header.
Differential Revision: https://reviews.freebsd.org/D50645
Reviewed by: bz
Mechanically migrate printf() -> net80211_printf().
A few places looked like they should be using net80211_vap_printf(),
so migrate those appropriately.
Differential Revision: https://reviews.freebsd.org/D50644
Reviewed by: bz
Migrate the if_printf() calls to net80211_vap_printf(), which hides
the underlying ifp and the network stack.
Note: there are still a LOT of direct printf() calls in the codebase.
This is just a mostly mechanical conversion of if_printf() calls.
Differential Revision: https://reviews.freebsd.org/D50643
Reviewed by: bz
Not all OSes support if_printf(), printf(), etc, so start migrating
the printf / log routines into net80211 routines that are implemented
in ieee80211_freebsd.c .
Migrate ic_printf() to net80211_ic_printf() via a macro for testing.
Differential Revision: https://reviews.freebsd.org/D50642
Reviewed by: bz
Similar to wait*(), kill(2) operates on a pid that currently gets output
as hex. Output it in decimal to make it a little easier to eyeball the
pid we're signalling.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D50508
Currently, both of these will print pid/uid/gid/sid/jid in hex, which
isn't very helpful for eyeballing. Align more closely with truss(1) and
print these in decimal instead.
`ip` is likely wider than our ID type, so we do a small casting trick in
wait4(2) to get it sign-extended and rendered properly.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D50496