]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years 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

2 years 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

2 years 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

2 years 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")

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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'

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years agorc.conf: Fix a typo in a comment
Gordon Bergling [Sat, 3 Sep 2022 12:57:39 +0000 (14:57 +0200)]
rc.conf: Fix a typo in a comment

- s/overriden/overridden/

MFC after: 3 days

2 years agoifconfig(8): Fix a typo in source code comment
Gordon Bergling [Sat, 3 Sep 2022 12:55:54 +0000 (14:55 +0200)]
ifconfig(8): Fix a typo in source code comment

- s/overriden/overridden/

MFC after: 3 days

2 years agoisp(4): Fix two typos in source code comments
Gordon Bergling [Sat, 3 Sep 2022 12:54:14 +0000 (14:54 +0200)]
isp(4): Fix two typos in source code comments

- s/overriden/overridden/

MFC after: 3 days

2 years agoimpi(4): Fix two typos in source code comments
Gordon Bergling [Sat, 3 Sep 2022 12:52:44 +0000 (14:52 +0200)]
impi(4): Fix two typos in source code comments

- s/overriden/overridden/

MFC after: 3 days

2 years agolibc/stdio: only roll FILE state back on EINTR
Konstantin Belousov [Fri, 2 Sep 2022 13:39:38 +0000 (16:39 +0300)]
libc/stdio: only roll FILE state back on EINTR

Reported by: JunT <takimoto-j@kba.biglobe.ne.jp>
PR: 266171
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36427

2 years ago__swbuf(): style
Konstantin Belousov [Fri, 2 Sep 2022 14:00:56 +0000 (17:00 +0300)]
__swbuf(): style

Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36427

2 years agoqat: Move CWARNFLAGS down so it works.
John Baldwin [Fri, 2 Sep 2022 21:52:19 +0000 (14:52 -0700)]
qat: Move CWARNFLAGS down so it works.

CWARNFLAGS must be added to after including kern.mk, otherwise all the
warnings set in kern.mk are ignored.  This is why the
-Wmissing-prototypes warnings were not seen previously.

While here, drop -Wno-pointer-sign as it is doesn't seem to be needed,
but add -Wno-cast-qual to silence warnings for various casts of const
pointers to non-const pointers.

Reviewed by: MichalX.Gulbicki_intel.com, markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D36332