]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
22 months agoqat: make function definition match prototype
Ed Maste [Tue, 6 Sep 2022 01:24:07 +0000 (21:24 -0400)]
qat: make function definition match prototype

LacSymCb_CallbacksRegister declared with a (void) argument list but was
defined with ().  With Clang 15 this produced a warning.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

22 months agoLinuxKPI: 80211 / iwlwifi: improve queue management
Bjoern A. Zeeb [Mon, 5 Sep 2022 21:03:03 +0000 (21:03 +0000)]
LinuxKPI: 80211 / iwlwifi: improve queue management

For one initialise vif->hw_queues later set in lkpi_80211_txq_tx_one()
for drivers using them.  This may still need slightly more cleanup once
we get QUEUE_CONTROL-supporting drivers into the tree.

For the other rework and improve how we deal with tid/ac/txq in
lkpi_80211_txq_tx_one() and cleanup old comments and unused code.
This seems to reduce (remove) "Invalid TXQ id" reports from iwlwifi.
(The assumption is that the frame(s) triggering this WARN_ONCE or the
added FreeBSD specific logging were sent with lkpi_80211_mo_tx()).

Adjust the one logging from e674ddec0b4138274539587fe9336b577ff1242a
to IWL_DEBUG_TX so that now this is fixed it is also not always logged
anymore but leave it in case we need to further debug queues in the
future.

Tested by: pstef, Kevin Oberman (rkoberman gmail.com)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

22 months agoLinuxKPI: 80211: improve linuxkpi_ieee80211_get_tid()
Bjoern A. Zeeb [Mon, 5 Sep 2022 20:57:17 +0000 (20:57 +0000)]
LinuxKPI: 80211: improve linuxkpi_ieee80211_get_tid()

Continue what was started in 26a36948331bd08d9afaddfc0da724eacdb953dd
in iwlwifi and extend out internal implementation of
linuxkpi_ieee80211_get_tid() by an argument as to whether "no-QoS"
answers are acceptable.  For the LinuxKPI ieee80211_get_tid() set
this to false as the Linux derived drivers seem to do extra checks
for the QoS-Data frame before acquiring the tid.
Add KASSERTs to enforce the extra argument.
This allows us to use the net80211 variant in LinuxKPI for other
means explicitly documenting that we do accept a IEEE80211_NONQOS_TID.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

22 months agoFormatting cleanups and debugging fix.
Kirk McKusick [Mon, 5 Sep 2022 19:06:58 +0000 (12:06 -0700)]
Formatting cleanups and debugging fix.

Sponsored by: The FreeBSD Foundation

22 months agopam_unix: Remove bogus __unused attribute
Felix Palmen [Mon, 5 Sep 2022 18:50:29 +0000 (20:50 +0200)]
pam_unix: Remove bogus __unused attribute

Approved by: cy, des, tcberner (mentor)
Differential Revision: https://reviews.freebsd.org/D34320

22 months agoloop(4): make interface methods static
Gleb Smirnoff [Mon, 5 Sep 2022 17:29:10 +0000 (10:29 -0700)]
loop(4): make interface methods static

22 months agotcp: tcp6_connect() requires net epoch
Gleb Smirnoff [Mon, 5 Sep 2022 17:15:19 +0000 (10:15 -0700)]
tcp: tcp6_connect() requires net epoch

PR: 262663
Reported & tested by: dch
MFC after: 2 weeks

22 months agoRevert "usb: Remove a double words in a source code comments"
Gordon Bergling [Sun, 4 Sep 2022 15:40:25 +0000 (17:40 +0200)]
Revert "usb: Remove a double words in a source code comments"

This reverts commit 8ca67bf1273a5168f8a3787183159c477632e582.

The original comment was correct; changing it loses a key part.

Reported by: jrtc27

22 months agoRevert "stand: Grammar fix for a source code comment"
Gordon Bergling [Mon, 5 Sep 2022 13:40:55 +0000 (15:40 +0200)]
Revert "stand: Grammar fix for a source code comment"

This reverts commit 7d91d6b83e74edf278dde375e6049aca833cbebd.

The orginal comment is more natural.

Reported by:jrtc27

22 months agolibexec/rc: Add var_run rc script
Cy Schubert [Sun, 28 Aug 2022 12:48:25 +0000 (05:48 -0700)]
libexec/rc: Add var_run rc script

Users with a tmpfs /var/run will lose the directory tree state of
/var/run at reboot. This rc script will optionally (by default)
capture the state of the directory structure in /var/run prior to
shutdown and recreate it at system boot.

Alternatively a user can save the state of the /var/run directories
manually using service var_run save and disable the autosaving of
/var/run state using the var_run_autosave variable, for those
paranoid SSD users.

PR: 259585, 259699
Reported by: freebsd@walstatt-de.de,
Reviewed by: philip, gbe (previous version)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36386

22 months agopf: stop using PFIL_FWD
Mateusz Guzik [Fri, 2 Sep 2022 16:36:52 +0000 (18:36 +0200)]
pf: stop using PFIL_FWD

It is only there to check if the packet was reassembled,
relevant if we are forwarding. But if the packet originated
locally it could not have been reassembled, thus the flag is
redundant.

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

22 months agonetinet6: call lle_event eventhandler after updating state
Alexander V. Chernikov [Mon, 5 Sep 2022 12:57:20 +0000 (12:57 +0000)]
netinet6: call lle_event eventhandler after updating state

Fix nd6_na_input() eventhandler call: run eventhandler after lle
 state transition.

Old behaviour (as seen by event handler):
 * fe80::5054:ff:fe8c:63e9 dev vtnet0 lladdr 52:54:00:8c:63:e9 INCOMPLETE
New behaviour:
* fe80::5054:ff:fe8c:63e9 dev vtnet0 lladdr 52:54:00:8c:63:e9 REACHABLE

MFC after: 2 weeks

22 months agolibpmc: pmc_init() should avoid overflowing pmc_class_table
Toomas Soome [Wed, 31 Aug 2022 08:09:18 +0000 (11:09 +0300)]
libpmc: pmc_init() should avoid overflowing pmc_class_table

Use calloc().

Walk the class list we get from kernel, so we will not add something
the kernel does not know about.

Avoid picking headers from /usr/include.

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

22 months agosignal: use proc_iterate to save on work
Mateusz Guzik [Thu, 10 Mar 2022 18:58:12 +0000 (19:58 +0100)]
signal: use proc_iterate to save on work

Most notably poudriere performs kill -9 -1 in jails for each port
being built. This reduces the scan from hundrends of processes to
literally 1.

Reviewed by: jamie, markj
Differential Revision: https://reviews.freebsd.org/D34522

22 months agojail: add process linkage
Mateusz Guzik [Thu, 10 Mar 2022 18:42:37 +0000 (19:42 +0100)]
jail: add process linkage

It allows iteration over processes belonging to given jail instead of
having to walk the entire allproc list.

Note the iteration can miss processes which remains bug-compatible
with previous code.

Reviewed by: jamie (previous version), markj (previous version)
Differential Revision: https://reviews.freebsd.org/D34522

22 months agorouting: allow logging framework to be used outside of the subsystem
Alexander V. Chernikov [Mon, 5 Sep 2022 10:44:27 +0000 (10:44 +0000)]
routing: allow logging framework to be used outside of the subsystem

MFC after: 2 weeks

22 months agossh: describe deprecated options in general in update doc
Ed Maste [Fri, 19 Aug 2022 14:43:19 +0000 (10:43 -0400)]
ssh: describe deprecated options in general in update doc

Rename "HPN" to more general "Retired patches."  We handle two now-
removed patches the same way: to avoid breaking existing configurations
we accept, but ignore, the option.

Sponsored by: The FreeBSD Foundation

22 months agonfscl: Allow "nolockd" to work for NFSv4 mounts
Rick Macklem [Sun, 4 Sep 2022 20:09:33 +0000 (13:09 -0700)]
nfscl: Allow "nolockd" to work for NFSv4 mounts

Commit 40ada74ee1da modified the NFSv4.1/4.2 client so
that it would issue a DestroySession to the server when
all session slots are marked bad.  This handles the
case where session slots get broken when "intr" or "soft"
NFSv4 fairly well.1/4.2 mounts are done.

There are two other cases where having an NFSv4.1/4.2
RPC attempt terminate without completion can leave
state in a non-determinate condition.

One is file locking RPCs.  If the "nolockd" option is
used, this avoids file locking RPCs by doing locking
locally within the client.

The other is Open locks, but since all FreeBSD Open
locks are done with OPEN_SHARE_DENY_NONE, the locking
state for these should not be critical.

This patch enables use of "nolockd" for NFSv4 mounts,
so that it can be combined with "intr" and/or "soft",
making the latter more usable.

Use of "intr" or "soft" NFSv4 mounts are still not
recommended, but when combined with "nolockd" should
now work fairly well.

A man page update will be done as a separate commit.

MFC after: 2 weeks

22 months agocd9660(5): Correct a typo in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 16:20:09 +0000 (18:20 +0200)]
cd9660(5): Correct a typo in a source code comment

- s/byes/bytes/

MFC after: 3 days

22 months agobxe(4): Grammar fix for a source code comment
Gordon Bergling [Sun, 4 Sep 2022 15:43:15 +0000 (17:43 +0200)]
bxe(4): Grammar fix for a source code comment

- s/that that/that the/

MFC after: 3 days

22 months agousb: Remove a double words in a source code comments
Gordon Bergling [Sun, 4 Sep 2022 15:40:25 +0000 (17:40 +0200)]
usb: Remove a double words in a source code comments

- s/that that/that/

MFC after: 3 days

22 months agostand/kboot: Add note about why we use MACHINE_ARCH here
Warner Losh [Sun, 4 Sep 2022 15:31:51 +0000 (09:31 -0600)]
stand/kboot: Add note about why we use MACHINE_ARCH here

Normally in the boot loader, we key off of MACHINE since that specifies
the kernel and the loader is very tuned to each type of MACHINE in
general. In this case, however, we're producing a Linux binary, with
Linux system calls encoded in it. These align better along the
MACHINE_ARCH axis of FreeBSD. For PowerPC the system calls are radically
different for each of our MACHINE_ARCHes, with only powerpc64 and
powerpc64le sharing the same numbers and memory layout. The same was
true about mips when it was in the tree. 32-bit arm uses the same
layout, however, for both armv6 and armv7 ports: that can be easily
shared in the unlikely event we support that in the future.

Sponsored by: Netflix

22 months agoipfilter: Grammar fix for the ipfilter howto
Gordon Bergling [Sun, 4 Sep 2022 15:37:28 +0000 (17:37 +0200)]
ipfilter: Grammar fix for the ipfilter howto

- s/that that/that the/

MFC after: 3 days

22 months agomsdosfs(5): Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 15:34:52 +0000 (17:34 +0200)]
msdosfs(5): Remove a double word in a source code comment

- s/that that/that/

MFC after: 3 days

22 months agokern: Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 15:32:10 +0000 (17:32 +0200)]
kern: Remove a double word in a source code comment

- s/that that/that/

MFC after: 3 days

22 months agobpf(3): Grammar fix for a source code comment
Gordon Bergling [Sun, 4 Sep 2022 15:30:05 +0000 (17:30 +0200)]
bpf(3): Grammar fix for a source code comment

- s/that that/that the/

MFC after: 3 days

22 months agopkg(8): Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 15:28:16 +0000 (17:28 +0200)]
pkg(8): Remove a double word in a source code comment

- s/that that/that/

MFC after: 3 days

22 months agostand: Grammar fix for a source code comment
Gordon Bergling [Sun, 4 Sep 2022 15:26:48 +0000 (17:26 +0200)]
stand: Grammar fix for a source code comment

- s/that that/that this/

MFC after: 3 days

22 months agohyperv: Fix a typo in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 15:19:40 +0000 (17:19 +0200)]
hyperv: Fix a typo in a source code comment

- s/Unsupport/Unsupported/

MFC after: 3 days

22 months agomsun: Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:57:38 +0000 (13:57 +0200)]
msun: Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agobhyve(4): Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:57:00 +0000 (13:57 +0200)]
bhyve(4): Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agoqcom_qup: Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:54:40 +0000 (13:54 +0200)]
qcom_qup: Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agonet80211(4): Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:53:17 +0000 (13:53 +0200)]
net80211(4): Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agotmpfs(5): Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:51:50 +0000 (13:51 +0200)]
tmpfs(5): Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agohyperv: Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:49:47 +0000 (13:49 +0200)]
hyperv: Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agomps(4): Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:48:21 +0000 (13:48 +0200)]
mps(4): Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agompr(4): Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:46:44 +0000 (13:46 +0200)]
mpr(4): Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agohid: Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:45:50 +0000 (13:45 +0200)]
hid: Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agonetmap(4): Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:42:48 +0000 (13:42 +0200)]
netmap(4): Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agoetherswitch(4): Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:41:44 +0000 (13:41 +0200)]
etherswitch(4): Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agoarm64: Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:40:15 +0000 (13:40 +0200)]
arm64: Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agostand: Remove a double word in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:39:35 +0000 (13:39 +0200)]
stand: Remove a double word in a source code comment

- s/the the/the/

MFC after: 3 days

22 months agox86: Correct a typo in source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:36:53 +0000 (13:36 +0200)]
x86: Correct a typo in source code comment

- s/occured/occurred/

MFC after: 3 days

22 months agoi386: Correct a typo in source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:35:34 +0000 (13:35 +0200)]
i386: Correct a typo in source code comment

- s/occured/occurred/

MFC after: 3 days

22 months agoiwm(4): Correct some typos in source code comments
Gordon Bergling [Sun, 4 Sep 2022 11:33:59 +0000 (13:33 +0200)]
iwm(4): Correct some typos in source code comments

- s/occured/occurred/

MFC after: 3 days

22 months agopowerpc: Correct some typos in source code comments
Gordon Bergling [Sun, 4 Sep 2022 11:32:13 +0000 (13:32 +0200)]
powerpc: Correct some typos in source code comments

- s/occured/occurred/

MFC after: 3 days

22 months agovmci(4): Correct some typos in source code comments
Gordon Bergling [Sun, 4 Sep 2022 11:28:47 +0000 (13:28 +0200)]
vmci(4): Correct some typos in source code comments

- s/occured/occurred/

MFC after: 3 days

22 months agoping(8): Correct a typo in source code comment
Gordon Bergling [Sun, 4 Sep 2022 11:26:34 +0000 (13:26 +0200)]
ping(8): Correct a typo in source code comment

- s/occured/occurred/

MFC after: 3 days

22 months agoip6.4: Correct a typo in the manual page
Gordon Bergling [Sun, 4 Sep 2022 11:03:44 +0000 (13:03 +0200)]
ip6.4: Correct a typo in the manual page

- s/the the/the/

MFC after: 3 days

22 months agontpd(8): Correct a typo in comment of the rc script
Gordon Bergling [Sun, 4 Sep 2022 11:02:21 +0000 (13:02 +0200)]
ntpd(8): Correct a typo in comment of the rc script

- s/the the/the/

MFC after: 3 days

22 months agokern: Correct some typos in source code comments
Gordon Bergling [Sun, 4 Sep 2022 11:00:01 +0000 (13:00 +0200)]
kern: Correct some typos in source code comments

- s/occured/occurred/
- s/the the/the/

MFC after: 3 days

22 months agonetdump(4): Correct a typo in source code comment
Gordon Bergling [Sun, 4 Sep 2022 10:59:29 +0000 (12:59 +0200)]
netdump(4): Correct a typo in source code comment

- s/occured/occurred/

MFC after: 3 days

22 months agotcp_rack: Correct some typos in source code comments
Gordon Bergling [Sun, 4 Sep 2022 10:58:13 +0000 (12:58 +0200)]
tcp_rack: Correct some typos in source code comments

- s/occured/occurred/

MFC after: 3 days

22 months agonetinet: Correct a typo in source code comment
Gordon Bergling [Sun, 4 Sep 2022 10:57:12 +0000 (12:57 +0200)]
netinet: Correct a typo in source code comment

- s/occured/occurred/

MFC after: 3 days

22 months agoipf.4: Correct a typo in the manual page
Gordon Bergling [Sun, 4 Sep 2022 10:55:42 +0000 (12:55 +0200)]
ipf.4: Correct a typo in the manual page

- s/occured/occurred/

MFC after: 3 days

22 months agolibifconfig: Correct some typos in source code comments
Gordon Bergling [Sun, 4 Sep 2022 10:53:58 +0000 (12:53 +0200)]
libifconfig: Correct some typos in source code comments

- s/occured/occurred/
- s/the the/the/

MFC after: 3 days

22 months agopmc(3): Correct some typos in event descriptions
Gordon Bergling [Sun, 4 Sep 2022 10:52:38 +0000 (12:52 +0200)]
pmc(3): Correct some typos in event descriptions

- s/occured/occurred/
- s/the the/the/

MFC after: 3 days

22 months agoqat(4): Correct some typos in source code comments
Gordon Bergling [Sun, 4 Sep 2022 10:51:22 +0000 (12:51 +0200)]
qat(4): Correct some typos in source code comments

- s/occured/occurred/
- s/the the/the/

MFC after: 3 days

22 months agobhnd(4): Correct some typos in source code comments
Gordon Bergling [Sun, 4 Sep 2022 10:49:42 +0000 (12:49 +0200)]
bhnd(4): Correct some typos in source code comments

- s/occured/occurred/

While here, fix some whitespace issues.

MFC after: 3 days

22 months agotcp_hpts: Correct some typos in source code comments
Gordon Bergling [Sun, 4 Sep 2022 10:47:49 +0000 (12:47 +0200)]
tcp_hpts: Correct some typos in source code comments

- s/occured/occurred/
- s/the the/the/

MFC after: 3 days

22 months agonetpfil: Correct some typos in source code comments
Gordon Bergling [Sun, 4 Sep 2022 10:46:05 +0000 (12:46 +0200)]
netpfil: Correct some typos in source code comments

- s/occured/occurred/
- s/the the/the/

MFC after: 3 days

22 months agoiwn(4): Correct a typo in a kernel error message
Gordon Bergling [Sun, 4 Sep 2022 10:23:27 +0000 (12:23 +0200)]
iwn(4): Correct a typo in a kernel error message

- s/settting/setting/

MFC after: 5 days

22 months agosound(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 4 Sep 2022 09:23:34 +0000 (11:23 +0200)]
sound(4): Fix a typo in a source code comment

- s/availavle/available/

MFC after: 3 days

22 months agortld.c: remove extra blank line
Konstantin Belousov [Wed, 31 Aug 2022 01:06:51 +0000 (04:06 +0300)]
rtld.c: remove extra blank line

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D36396

22 months agortld: style the rest of rtld_lock.c
Konstantin Belousov [Tue, 30 Aug 2022 12:49:15 +0000 (15:49 +0300)]
rtld: style the rest of rtld_lock.c

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D36396

22 months agortld: mask signals for default read locks
Konstantin Belousov [Tue, 30 Aug 2022 12:46:30 +0000 (15:46 +0300)]
rtld: mask signals for default read locks

Rtld locks from libthr defer signals delivery, which means that binding
is not possible while a signal handler is executed.

Binding might upgrade read-locked rtld_bind_lock to write-lock, if
symbol resolution requires loading filters.  If a signal would be delivered
while rtld is in read-locked section, and signal handler needs binding
which upgrades the lock, for non-threaded image that uses default rtld
locks, we get the rtld data structures modified under the top-level
active rtld frame.

To correct the problem, mask signals for read-locking of default locks
in addition to the write-locking.  It is very cheap now with
sigfastblock(2).

Note that the global state is used to track pre-locked state of either
sigfastblock(2) or signal mask (if sigfastblock(2) is administratively
disabled).  It is fine for non-threaded images since there are no other
threads.  But I believe that it is fine for threaded images using libc_r
as well, since masking signals disables preemption (I did not tested
it).

NetBSD PR: https://gnats.netbsd.org/56979
Reported by: tmunro
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D36396

22 months agoLinuxKPI: 80211: scanning code updates
Bjoern A. Zeeb [Sat, 3 Sep 2022 23:40:51 +0000 (23:40 +0000)]
LinuxKPI: 80211: scanning code updates

For consistency rename LKPI_SCAN_RUNNING adding a LHW_ prefix.
Add a local flag LKPI_LHW_SCAN_HW mirroring the net80211
IEEE80211_FEXT_SCAN_OFFLOAD flag.
Slightly simplify the code.
Overload (*ic_scan_curchan) and (*ic_scan_mindwell) so that we can
call the net80211 implementation in case of software scan but skip it
in case of full-offload scans.
Also add a bandaid to our (*ic_set_channel) implementation to not siwtch
channels if we have an active hw_scan running.

Obtained from: bz/wireless-dev
Sponsored by: The FreeBSD Foundation (partially)
MFC after: 4 days

22 months agoLinuxKPI: 80211: implement (*get_antenna) and set ic_[rt]xstream
Bjoern A. Zeeb [Sat, 3 Sep 2022 23:11:05 +0000 (23:11 +0000)]
LinuxKPI: 80211: implement (*get_antenna) and set ic_[rt]xstream

Implement the mac80211 (*get_antenna) call and after checking any
antenna information present query the current configuration on startup
(both informations should be identical at this point in theory).
Both the wiphy variables and function call report a bitmask not a count.
Count the bits for net80211 for as long as we get away with just a
number in ic_[rt]xstream.

Sponsored by: The FreeBSD Foundation
MFC after: 4 days

22 months agoLinuxKPI: 80211: make HW_CRYPTO compileable again
Bjoern A. Zeeb [Sat, 3 Sep 2022 22:51:16 +0000 (22:51 +0000)]
LinuxKPI: 80211: make HW_CRYPTO compileable again

Rename TRY_HW_CRYPTO to LKPI_80211_HW_CRYPTO for consitency and make
it compileable again in case someone wants to sit down and make it
work.  It's probably not too much to do.  Otherwise I might eventually
get around to it.

Obtained from: bz/wireless-dev
Sponsored by: The FreeBSD Foundation
MFC after: 4 days

22 months agomgb: quiten -Wunused-function with LINT builds
Bjoern A. Zeeb [Sat, 3 Sep 2022 22:47:19 +0000 (22:47 +0000)]
mgb: quiten -Wunused-function with LINT builds

As the function itself seems to be helpful don't remove the code but
change the #ifdef DEBUG to #if 0 to avoid:
  warning: unused function 'mgb_dump_some_stats' [-Wunused-function]
with LINT builds.

22 months agoFix printf formating.
Kirk McKusick [Sat, 3 Sep 2022 22:39:45 +0000 (15:39 -0700)]
Fix printf formating.

Fix for f4fc389.

Reported by:  Jenkins
Sponsored by: The FreeBSD Foundation

22 months agoProperly handle the replacement of a partially allocated root directory.
Kirk McKusick [Sat, 3 Sep 2022 21:46:50 +0000 (14:46 -0700)]
Properly handle the replacement of a partially allocated root directory.

If the root directory exists but has a bad block number Pass1 will
accept it and setup an inoinfo structure for it. When Pass2 runs
and cannot read the root inode's content because of a bad (or
duplicate) block number, it removes the bad root inode and replaces
it. As part of creating the replacement root inode, it creates an
inoinfo entry for it. But Pass2 did delete the inoinfo entry that
Pass1 had set up for the root inode so ended up with two inoinfo
structures for it. The final step of Pass2 checks that all the ".."
entries are correct adding them if they are missing which resulted
in a second ".." entry being added to the root directory which
definitely did not go over well in the kernel name cache!

Reported by:  Peter Holm
Sponsored by: The FreeBSD Foundation

22 months agonet80211: update (parts of) frame types and subtypes and annotate
Bjoern A. Zeeb [Wed, 31 Aug 2022 22:26:28 +0000 (22:26 +0000)]
net80211: update (parts of) frame types and subtypes and annotate

Update to the full list of frame type and subtype values based on
802.11-2020 with 11ax and 11ay extensions. This includes the 4th type
"Extension" (IEEE80211_FC0_TYPE_EXT).
While here annotate them with descriptions which should help matching
names (as at times things get confusing with LinuxKPI).
Also remove some 802.11-1997 values Reserved nowadays.

No functional changes.

Sponsored by: The FreeBSD Foundation
MFC after: 5 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D36410

22 months agoFlush and close getnextino cache when done using it in Pass 1b.
Kirk McKusick [Sat, 3 Sep 2022 21:15:50 +0000 (14:15 -0700)]
Flush and close getnextino cache when done using it in Pass 1b.

Reported by:  Peter Holm
Sponsored by: The FreeBSD Foundation

22 months agoUpdates to UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Sat, 3 Sep 2022 21:08:25 +0000 (14:08 -0700)]
Updates to UFS/FFS superblock integrity checks when reading a superblock.

Yet more updates based on ways Peter Holm found to corrupt UFS
superblocks in ways that could cause kernel hangs or crashes.

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

Reported by:  Peter Holm
Tested by:    Peter Holm
Sponsored by: The FreeBSD Foundation

22 months agonet80211 / drivers: rename to IEEE80211_FC0_SUBTYPE_QOS_DATA
Bjoern A. Zeeb [Wed, 31 Aug 2022 22:19:32 +0000 (22:19 +0000)]
net80211 / drivers: rename to IEEE80211_FC0_SUBTYPE_QOS_DATA

Going through the Frame (Sub)types the "QOS Data" being called "QOS"
scheme leads to a naming conflict for QOS_CFPOLL and QOS_CFACKPOLL
(if added).   Rename QOS* to QOS_DATA* to avoid the conflict and
to also better match the standards name.

No functional changes intended.

Sponsored by: The FreeBSD Foundation
MFC after: 5 days
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D36409

22 months agonet80211: simplify an #ifdef INET/INET6 block
Bjoern A. Zeeb [Wed, 31 Aug 2022 22:35:42 +0000 (22:35 +0000)]
net80211: simplify an #ifdef INET/INET6 block

I got lost in the #ifdef #endif here so I changed the code to a
switch block with two non-overlapping #ifdef parts and a default
which makes it a lot easier to read.

No functional changes.

Sponsored by: The FreeBSD Foundation
Reviewed by: (zlei.huang gmail.com)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D36411

22 months agobsdinstall(8) hostname: Update for bsddialog 0.3
Alfonso S. Siciliano [Sat, 3 Sep 2022 20:12:46 +0000 (22:12 +0200)]
bsdinstall(8) hostname: Update for bsddialog 0.3

 * Delete --hline info. bsddialog(1) 0.3 closes an --inputbox pressing
   only Enter (restoring the previous LGPL-dialog behavior).
 * Add dynamic width auto-sizing.

22 months agomlx5en(4): Correct a typo in a kernel error message
Gordon Bergling [Sat, 3 Sep 2022 17:29:33 +0000 (19:29 +0200)]
mlx5en(4): Correct a typo in a kernel error message

- s/ouput/output

MFC after: 5 days

22 months agonetpfil: Fix a typo in a source code comment
Gordon Bergling [Sat, 3 Sep 2022 17:18:54 +0000 (19:18 +0200)]
netpfil: Fix a typo in a source code comment

- s/intergers/integers/

While here, fix some whitespace issues.

MFC after: 3 days

22 months agortld(1): Fix a typo in a source code comment
Gordon Bergling [Sat, 3 Sep 2022 17:16:32 +0000 (19:16 +0200)]
rtld(1): Fix a typo in a source code comment

- s/interger/integer/

MFC after: 3 days

22 months agolibm: Correct some typos in source code comments
Gordon Bergling [Sat, 3 Sep 2022 17:14:02 +0000 (19:14 +0200)]
libm: Correct some typos in source code comments

- s/modfied/modified/
- s/minimun/minimum/

While here, fix some mandoc warnings:

- whitespace at end of input line
- unusual Xr punctuation
- missing comma before name

Obtained from: NetBSD
MFC after: 5 days

22 months agobsddialog(1): Fix Makefile typo
Alfonso S. Siciliano [Sat, 3 Sep 2022 15:46:26 +0000 (17:46 +0200)]
bsddialog(1): Fix Makefile typo

Fix build fault caused by a typo in the Makefile.

22 months agocontrib/bsddialog: Import version 0.3
Alfonso S. Siciliano [Sat, 3 Sep 2022 14:40:21 +0000 (16:40 +0200)]
contrib/bsddialog: Import version 0.3

New features overview:
 * Unicode. User interface handles multi-column characters. API can
   handle char* like a multibyte character string. Internally wide
   characters are used for keyboard input, to adapt word wrapping and
   dynamic text auto-sizing for multi-column characters.
 * Forms refactoring. Complete rewrite deleting libformw dependency.
 * Theme. New utility options to save and load custom theme at run-time.
 * TUI navigation. Added keys to navigate input components. Changed
   default focus behavior of input dialogs to be LGPL-dialog-like; a new
   option can set the previous whiptail-like behavior.

See /usr/src/contrib/bsddialog/CHANGELOG '2022-08-29 Version 0.3'
for more detailed information.

Merge commit '2c9fd7655ba54e7239f528e1af9fe09662de9b03'

22 months agocontrib/bsddialog: Import version 0.3
Alfonso S. Siciliano [Sat, 3 Sep 2022 14:36:16 +0000 (16:36 +0200)]
contrib/bsddialog: Import version 0.3

New features overview:
 * Unicode. User interface handles multi-column characters. API can
   handle char* like a multibyte character string. Internally wide
   characters are used for keyboard input, to adapt word wrapping and
   dynamic text auto-sizing for multi-column characters.
 * Forms refactoring. Complete rewrite deleting libformw dependency.
 * Theme. New utility options to save and load custom theme at run-time.
 * TUI navigation. Added keys to navigate input components. Changed
   default focus behavior of input dialogs to be LGPL-dialog-like; a new
   option can set the previous whiptail-like behavior.

See /usr/src/contrib/bsddialog/CHANGELOG '2022-08-29 Version 0.3'
for more detailed information.

22 months agoltc430x(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 3 Sep 2022 13:43:05 +0000 (15:43 +0200)]
ltc430x(4): Fix a typo in a source code comment

- s/overriden/overridden/

MFC after: 3 days

22 months agobce(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 3 Sep 2022 13:39:51 +0000 (15:39 +0200)]
bce(4): Fix a typo in a source code comment

- s/overriden/overridden/

MFC after: 3 days

22 months agobge(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 3 Sep 2022 13:38:26 +0000 (15:38 +0200)]
bge(4): Fix a typo in a source code comment

- s/overriden/overridden/

MFC after: 3 days

22 months agobxe(4): Fix two typos in source code comments
Gordon Bergling [Sat, 3 Sep 2022 13:36:00 +0000 (15:36 +0200)]
bxe(4): Fix two typos in source code comments

- s/overriden/overridden/

MFC after: 3 days

22 months agomalo(4): Fix a typo in asource code comment
Gordon Bergling [Sat, 3 Sep 2022 13:34:27 +0000 (15:34 +0200)]
malo(4): Fix a typo in asource code comment

- s/overriden/overridden/

MFC after: 3 days

22 months agosdhci(4): Fix a typo in asource code comment
Gordon Bergling [Sat, 3 Sep 2022 13:31:59 +0000 (15:31 +0200)]
sdhci(4): Fix a typo in asource code comment

- s/overriden/overridden/

MFC after: 3 days

22 months agosound(4): Fix a typo in asource code comment
Gordon Bergling [Sat, 3 Sep 2022 13:30:39 +0000 (15:30 +0200)]
sound(4): Fix a typo in asource code comment

- s/overriden/overridden/

MFC after: 3 days

22 months agopci(4): Fix a typo in asource code comment
Gordon Bergling [Sat, 3 Sep 2022 13:28:05 +0000 (15:28 +0200)]
pci(4): Fix a typo in asource code comment

- s/overriden/overridden/

MFC after: 3 days

22 months agokern: Fix a typo in asource code comment
Gordon Bergling [Sat, 3 Sep 2022 13:26:55 +0000 (15:26 +0200)]
kern: Fix a typo in asource code comment

- s/overriden/overridden/

MFC after: 3 days

22 months agoath(4): Fix two typos in source code comments
Gordon Bergling [Sat, 3 Sep 2022 13:24:48 +0000 (15:24 +0200)]
ath(4): Fix two typos in source code comments

- s/overriden/overridden/

MFC after: 3 days

22 months agousb: Fix two typos in source code comments
Gordon Bergling [Sat, 3 Sep 2022 13:22:42 +0000 (15:22 +0200)]
usb: Fix two typos in source code comments

- s/overriden/overridden/

MFC after: 3 days

22 months agotcp_rack: Fix two typos in source code comments
Gordon Bergling [Sat, 3 Sep 2022 13:05:42 +0000 (15:05 +0200)]
tcp_rack: Fix two typos in source code comments

- s/overriden/overridden/

MFC after: 3 days

22 months agonetisr(9): Fix a typo in a source code comment
Gordon Bergling [Sat, 3 Sep 2022 13:04:15 +0000 (15:04 +0200)]
netisr(9): Fix a typo in a source code comment

- s/overriden/overridden/

MFC after: 3 days

22 months agocron(8): Fix a typo in a source code comment
Gordon Bergling [Sat, 3 Sep 2022 13:00:29 +0000 (15:00 +0200)]
cron(8): Fix a typo in a source code comment

- s/overriden/overridden/

MFC after: 3 days

22 months agotip(1): Fix a typo in a source code comment
Gordon Bergling [Sat, 3 Sep 2022 12:59:03 +0000 (14:59 +0200)]
tip(1): Fix a typo in a source code comment

- s/overriden/overridden/

MFC after: 3 days