Commit Graph

277880 Commits

Author SHA1 Message Date
Gordon Bergling
88cdf609e4 bhnd(4): Correct some typos in source code comments
- s/occured/occurred/

While here, fix some whitespace issues.

MFC after:	3 days
2022-09-04 12:49:42 +02:00
Gordon Bergling
d07a501876 tcp_hpts: Correct some typos in source code comments
- s/occured/occurred/
- s/the the/the/

MFC after:	3 days
2022-09-04 12:47:49 +02:00
Gordon Bergling
4d89e2018c netpfil: Correct some typos in source code comments
- s/occured/occurred/
- s/the the/the/

MFC after:	3 days
2022-09-04 12:46:05 +02:00
Gordon Bergling
dc79640e92 iwn(4): Correct a typo in a kernel error message
- s/settting/setting/

MFC after:	5 days
2022-09-04 12:23:27 +02:00
Gordon Bergling
4e50737fa8 sound(4): Fix a typo in a source code comment
- s/availavle/available/

MFC after:	3 days
2022-09-04 11:23:34 +02:00
Konstantin Belousov
832b40f7ff 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
2022-09-04 07:28:02 +03:00
Konstantin Belousov
7444f54bd3 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
2022-09-04 07:28:02 +03:00
Konstantin Belousov
a687683b99 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
2022-09-04 07:28:02 +03:00
Bjoern A. Zeeb
a486fbbd78 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
2022-09-03 23:40:51 +00:00
Bjoern A. Zeeb
527687a9e3 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
2022-09-03 23:11:05 +00:00
Bjoern A. Zeeb
b35f6cd066 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
2022-09-03 22:51:16 +00:00
Bjoern A. Zeeb
570773d68c 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.
2022-09-03 22:47:19 +00:00
Kirk McKusick
2aa6ed881d Fix printf formating.
Fix for f4fc389.

Reported by:  Jenkins
Sponsored by: The FreeBSD Foundation
2022-09-03 15:39:45 -07:00
Kirk McKusick
f4fc389524 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
2022-09-03 14:48:34 -07:00
Bjoern A. Zeeb
fb47649ebc 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
2022-09-03 21:18:40 +00:00
Kirk McKusick
cf17c2ff11 Flush and close getnextino cache when done using it in Pass 1b.
Reported by:  Peter Holm
Sponsored by: The FreeBSD Foundation
2022-09-03 14:15:50 -07:00
Kirk McKusick
82ee4e1c42 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
2022-09-03 14:11:38 -07:00
Bjoern A. Zeeb
c9b7e9df18 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
2022-09-03 21:04:13 +00:00
Bjoern A. Zeeb
8def06d5af 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
2022-09-03 20:59:30 +00:00
Alfonso S. Siciliano
5f3ec44e7e
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.
2022-09-03 22:15:12 +02:00
Gordon Bergling
e1a40dd294 mlx5en(4): Correct a typo in a kernel error message
- s/ouput/output

MFC after:	5 days
2022-09-03 19:29:33 +02:00
Gordon Bergling
fd2235ffdc netpfil: Fix a typo in a source code comment
- s/intergers/integers/

While here, fix some whitespace issues.

MFC after:	3 days
2022-09-03 19:18:54 +02:00
Gordon Bergling
3576233cd3 rtld(1): Fix a typo in a source code comment
- s/interger/integer/

MFC after:	3 days
2022-09-03 19:16:32 +02:00
Gordon Bergling
a52f4499ae 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
2022-09-03 19:14:02 +02:00
Alfonso S. Siciliano
ad052eb076
bsddialog(1): Fix Makefile typo
Fix build fault caused by a typo in the Makefile.
2022-09-03 17:46:26 +02:00
Alfonso S. Siciliano
b319d93437
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'
2022-09-03 16:41:44 +02:00
Alfonso S. Siciliano
2c9fd7655b
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.
2022-09-03 16:36:16 +02:00
Gordon Bergling
b0e86eed27 ltc430x(4): Fix a typo in a source code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:43:05 +02:00
Gordon Bergling
ddf38e0204 bce(4): Fix a typo in a source code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:39:51 +02:00
Gordon Bergling
de47bf0d52 bge(4): Fix a typo in a source code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:38:26 +02:00
Gordon Bergling
f93ef3ff06 bxe(4): Fix two typos in source code comments
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:36:00 +02:00
Gordon Bergling
b55a0762fc malo(4): Fix a typo in asource code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:34:27 +02:00
Gordon Bergling
cc280cac34 sdhci(4): Fix a typo in asource code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:31:59 +02:00
Gordon Bergling
ac34f366cc sound(4): Fix a typo in asource code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:30:39 +02:00
Gordon Bergling
6b49770088 pci(4): Fix a typo in asource code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:28:05 +02:00
Gordon Bergling
2b7d656f17 kern: Fix a typo in asource code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:26:55 +02:00
Gordon Bergling
f9a9fe46dc ath(4): Fix two typos in source code comments
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:24:48 +02:00
Gordon Bergling
d0ddb5aaca usb: Fix two typos in source code comments
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:22:42 +02:00
Gordon Bergling
fa52f9dc9a tcp_rack: Fix two typos in source code comments
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:05:42 +02:00
Gordon Bergling
028ecc7aa1 netisr(9): Fix a typo in a source code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:04:15 +02:00
Gordon Bergling
b82cbe4651 cron(8): Fix a typo in a source code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:00:29 +02:00
Gordon Bergling
fa4eca789e tip(1): Fix a typo in a source code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 14:59:03 +02:00
Gordon Bergling
0a81527da8 rc.conf: Fix a typo in a comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 14:57:39 +02:00
Gordon Bergling
2f2cf766b2 ifconfig(8): Fix a typo in source code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 14:55:54 +02:00
Gordon Bergling
310d144a83 isp(4): Fix two typos in source code comments
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 14:54:14 +02:00
Gordon Bergling
05e1ac3cbf impi(4): Fix two typos in source code comments
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 14:52:44 +02:00
Konstantin Belousov
44cf1e5eb4 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
2022-09-03 04:06:41 +03:00
Konstantin Belousov
120bacabfd __swbuf(): style
Reviewed by:	emaste, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D36427
2022-09-03 04:06:41 +03:00
John Baldwin
e120d3b2d4 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
2022-09-02 14:52:55 -07:00
John Baldwin
1c4c92f91b qat: Add #includes for missing prototypes.
This fixes numerous -Wmissing-prototypes warnings when that warning
is enabled.

Reviewed by:	MichalX.Gulbicki_intel.com, markj
Sponsored by:	DARPA
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D36331
2022-09-02 14:51:54 -07:00