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

22 months 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

22 months 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

22 months 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

22 months 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

22 months 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

22 months 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

22 months 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

22 months agoqat: Add #includes for missing prototypes.
John Baldwin [Fri, 2 Sep 2022 21:51:54 +0000 (14:51 -0700)]
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

22 months agoqat: Add a prototype for icp_adf_is_dev_in_error.
John Baldwin [Fri, 2 Sep 2022 21:50:09 +0000 (14:50 -0700)]
qat: Add a prototype for icp_adf_is_dev_in_error.

Reviewed by: MichalX.Gulbicki_intel.com, markj
Sponsored by: DARPA
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D36330

22 months agoqat: Drop extraneous parentheses from some macro values.
John Baldwin [Fri, 2 Sep 2022 21:49:40 +0000 (14:49 -0700)]
qat: Drop extraneous parentheses from some macro values.

This header duplicates a few #defines in "adf_cfg_strings.h".  The
latter header does not use the unneeded parentheses, but if a C file
includes both of these headers, clang raises an error because the macro
is redefined with a different value.

Reviewed by: markj
Sponsored by: DARPA
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D36329

22 months agorelease: Set loader_menu_multi_user_prompt to "Installer" for installer
Jessica Clarke [Fri, 2 Sep 2022 19:30:50 +0000 (20:30 +0100)]
release: Set loader_menu_multi_user_prompt to "Installer" for installer

This makes it more obvious that the media being booted is an installer
rather than an installed system, which is otherwise hard to distinguish.
It also provides a more user-friendly, and more accurate, prompt.

Reviewed by: gjb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36419

22 months agolualoader: Add loader_menu_multi_user_prompt config variable
Jessica Clarke [Fri, 2 Sep 2022 19:30:40 +0000 (20:30 +0100)]
lualoader: Add loader_menu_multi_user_prompt config variable

This allows the "Multi user" in "[B]oot Multi user" to be substituted
with another string, for example with "Installer" in installer media.
Note that this is lua-only at the moment, since loader.4th's menu.rc
defines the alternate name as Boot [M]ulti User, unlike lualoader which
leaves it as [B]oot Multi user. Ideally loader.4th would adopt the newer
and simpler lualoader behaviour and then it could gain support for this
option, but loader.4th is on the way out and isn't used by any official
installer media so this is not a significant concern.

Reviewed by: kevans, rpokala
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36418

22 months agoraw ip: fix regression with multicast and RSVP
Gleb Smirnoff [Fri, 2 Sep 2022 19:17:09 +0000 (12:17 -0700)]
raw ip: fix regression with multicast and RSVP

With 61f7427f02a raw sockets protosw has wildcard pr_protocol.  Protocol
of a specific pcb is stored in inp_ip_p.

Reviewed by: karels
Reported by: karels
Differential revision: https://reviews.freebsd.org/D36429
Fixes: 61f7427f02a307d28af674a12c45dd546e3898e4

22 months agoi386 doreti: Fix calculation of stack frame size
Tijl Coosemans [Fri, 2 Sep 2022 14:16:35 +0000 (16:16 +0200)]
i386 doreti: Fix calculation of stack frame size

Reviewed by: kib
Fixes: e8b2980e4a12 - i386 doreti: stop saving/restoring %ecx

22 months agostand: Parse BIOS revision from SMBIOS
Kornel Dulęba [Fri, 2 Sep 2022 11:08:32 +0000 (13:08 +0200)]
stand: Parse BIOS revision from SMBIOS

Add a smbios.bios.revision kenv, which contains the system BIOS revision
as defined in SMBIOS specification, section 3.3.1.
Since the revision is stored in two separate byte fields,
the smbios_setenv helper can't be used.
Read and construct the kenv manually instead.

Approved by: mw(mentor)
Sponsored by: Stormshield
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36413

22 months agotpm: Fix entropy harvesting logic
Kornel Dulęba [Fri, 2 Sep 2022 11:07:03 +0000 (13:07 +0200)]
tpm: Fix entropy harvesting logic

Use a taskqueue instead of a callout.
Callout functions mustn't sleep, where as the TPM driver
uses a sx lock in order to serialize accesses to the device.
Since the entropy harvesting feature is not enabled by default,
this commit should not bring any functional changes to the GENERIC
kernel.

Approved by: mw(mentor)
Sponsored by: Stormshield
Obtained from: Semihalf
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36412

23 months agods1307: add support for the EPSON RX-8035SA I2C RTC
Mathew McBride [Sat, 23 Jul 2022 00:29:16 +0000 (00:29 +0000)]
ds1307: add support for the EPSON RX-8035SA I2C RTC

The EPSON RX-8035SA I2C RTC has a similar time register layout to the
ds1307 family, with some minor differences in bit positions, polarity
and control registers.  Further generalize ds1307 to make it easier
to add more compatible chips and add support for the EPSON RX-8035SA.

MFC after: 6 days
Sponsored by: Traverse Technologies
Differential Revision: https://reviews.freebsd.org/D35837

23 months agolocal_unbound: rc: allow to overwrite pid file path
Bjoern A. Zeeb [Thu, 11 Aug 2022 14:32:06 +0000 (14:32 +0000)]
local_unbound: rc: allow to overwrite pid file path

Certain configurations need to use a different path for pidfile.
Allow rc.conf to overwrite it.

Reviewed by: cy, 0mp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D36141

23 months agoacpi: Fix error message
Warner Losh [Thu, 1 Sep 2022 17:34:36 +0000 (11:34 -0600)]
acpi: Fix error message

Fix a formatting error from 195f794318a33

Fixes: 195f794318a33
Sponsored by: Netflix

23 months agohwpmc: Avoid touching MSR_DEBUGCTLMSR inside VMs.
Alexander Motin [Thu, 1 Sep 2022 17:18:04 +0000 (13:18 -0400)]
hwpmc: Avoid touching MSR_DEBUGCTLMSR inside VMs.

At least KVM in Proxmox seems not happy about it.  Just to be safe
block it for all VMs, since it should just improve profile accuracy.

MFC after: 1 week

23 months agokboot: List sources one per line to make merges easier
Warner Losh [Thu, 1 Sep 2022 17:07:34 +0000 (11:07 -0600)]
kboot: List sources one per line to make merges easier

Make SRC an alphabetical list of files, one per line.

Sponsored by: Netflix

23 months agokboot: add minmalist init functionality
Warner Losh [Thu, 1 Sep 2022 17:06:43 +0000 (11:06 -0600)]
kboot: add minmalist init functionality

It is desirable to run kboot as the first program in some LinuxBoot
environments. This is the traditional "pid 1" or "init" program. When
running as pid 1. rovide a minimal environment based on what sysvinit,
u-root, initramfs-tools and other like projects do. We mount /dev, /sys,
/proc, make symlinks from /dev/fd to /dev/proc, and create /tmp, /run,
and /var. We also setup stdin/out/err to the console, set the tty
characteristics of same and block the appropriate signals.

This is indended as an environment that never does a fork/exec. If
that's required, the process groups, session leaders and all things
POSIX terminal handlers will need to be added.

Unlike the general purpose linux projects in this area, no attempt is
made to support very old kernels.

When not pid 1, we skip all of the above.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D36368

23 months agostand: Add lua binding loader.has_command
Warner Losh [Thu, 1 Sep 2022 17:06:19 +0000 (11:06 -0600)]
stand: Add lua binding loader.has_command

Give scripts the ability to determine if the currently running loader
has provided a command.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D36365

23 months agostand: Add interp_has_builtin_cmd to see if we have a command
Warner Losh [Thu, 1 Sep 2022 17:06:01 +0000 (11:06 -0600)]
stand: Add interp_has_builtin_cmd to see if we have a command

interp_has_builtin_cmd() will try to lookup the passed in command and
returns true if it was found, false otherwise.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D36364

23 months agostand: separate the command lookup from the command execution
Warner Losh [Thu, 1 Sep 2022 17:05:42 +0000 (11:05 -0600)]
stand: separate the command lookup from the command execution

Factor out interp_lookup_cmd to search for a command from
interp_builtin_cmd. This simplifies the latter and can be used to expand
lua to ask if a command exists.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D36363

23 months agoacpi: Move some errors with RSDP and XSLT out from under bootverbose
Warner Losh [Thu, 1 Sep 2022 16:39:34 +0000 (10:39 -0600)]
acpi: Move some errors with RSDP and XSLT out from under bootverbose

Failure to map RSDP, XSLT and checksum failures are events that can't
happen unless something has gone wrong. As such, they should be reported
always, and not in bootverbose. This has been this way since it was
originally brought in to parse APIC tables.

Sponsored by: Netflix
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D36406

23 months agoacpi: Unmap RSDP in more error cases
Warner Losh [Thu, 1 Sep 2022 16:39:20 +0000 (10:39 -0600)]
acpi: Unmap RSDP in more error cases

Add missing pmap_unmapbios() calls for when we return 0. Otherwise we
can leave the table mapped when it is of no use.

Sponsored by: Netflix
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D36405

23 months agoacpi: arm64 doesn't support ACPI 1.0 RSDP, report when we see one
Warner Losh [Thu, 1 Sep 2022 16:38:53 +0000 (10:38 -0600)]
acpi: arm64 doesn't support ACPI 1.0 RSDP, report when we see one

arm64 requires ACPI RSDP Revision 2.0 since it requires 64-bit physical
addresses. It is an error worth reporting if we have a RSDP pointer, but
it points to the wrong version.

Sponsored by: Netflix
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D36404

23 months agostand: Document EFI consoles
Warner Losh [Thu, 1 Sep 2022 16:34:30 +0000 (10:34 -0600)]
stand: Document EFI consoles

Document how EFI consoles work, at least on x86. There's a number of
weird quirks and limitations that are generally known, but not
documented until now. Include information on how EFI decides what the
defualt console is, how to set it and how to cope with common
situations. Note limitations and mismatch between ACPI (which uses UID
to identify a device) and our console code (which uses a raw address)
and explain why we can't translate between them in the loader.

Sponsored by: Netflix
Reviewed by: manu, kevans, rpokala, pauamma
Differential Revision: https://reviews.freebsd.org/D36286

23 months agostand: Stop setting hints for bios loader too
Warner Losh [Thu, 1 Sep 2022 16:33:09 +0000 (10:33 -0600)]
stand: Stop setting hints for bios loader too

Catch up to 2753bbe71b5a and remove the old hints.

Sponsored by: Netflix

23 months agolinuxkpi: on i386 only use first_msi_irq if apic is in kernel config
Tijl Coosemans [Sat, 1 May 2021 16:01:22 +0000 (18:01 +0200)]
linuxkpi: on i386 only use first_msi_irq if apic is in kernel config

23 months agoi386 machine/cpu.h: include sys/systm.h for cpu_ticks()
Tijl Coosemans [Wed, 31 Aug 2022 18:56:49 +0000 (20:56 +0200)]
i386 machine/cpu.h: include sys/systm.h for cpu_ticks()

Fixes build of graphics/drm-510-kmod on i386.

23 months agoFix reading the correct ID and REV.
Søren Schmidt [Thu, 1 Sep 2022 07:36:37 +0000 (07:36 +0000)]
Fix reading the correct ID and REV.

Reviewed by: manu

23 months agoAdd support for TCS4525 pmic.
Ganbold Tsagaankhuu [Thu, 1 Sep 2022 07:31:08 +0000 (07:31 +0000)]
Add support for TCS4525 pmic.

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D36209

23 months agoFix problem getting gpio version during attach.
Ganbold Tsagaankhuu [Thu, 1 Sep 2022 07:21:56 +0000 (07:21 +0000)]
Fix problem getting gpio version during attach.
Both RK3328 and RK3399 don't have GPIO_VER_ID register.
Set gpio version depending on compat string of the parent.

23 months agomount_nfs.8: Reword sentence so .Pa macro works
Rick Macklem [Wed, 31 Aug 2022 23:19:22 +0000 (16:19 -0700)]
mount_nfs.8: Reword sentence so .Pa macro works

Commit 603677334a64 added a sentence with a file path
in it. However, it did not use .Pa since it would leave
a space after it, where ('s) was supposed to go.

This patch rewords the sentence so that .Pa can
be used.

This is a content change.

Suggested by: mkarels

23 months agoiwlwifi: move an ieee80211_get_tid() call
Bjoern A. Zeeb [Wed, 31 Aug 2022 23:01:36 +0000 (23:01 +0000)]
iwlwifi: move an ieee80211_get_tid() call

Introduce a local change.  It seems ieee80211_get_tid() does not deal
with non-dataqos packets unlike net80211's ieee80211_gettid().
Gernally all calls in Linux drivers to ieee80211_get_tid() seem to
be proceeded by an ieee80211_is_data_qos() check.

Moving the ieee80211_get_tid() has no difference in the result, but
(a) saves us the call if we do not need it due to an earlier return,
and (b) allows us to put an assert into the LinuxKPI ieee80211_get_tid()
implementation to avoid accidentally returning random frame header data
in case of a missing earlier ieee80211_is_data_qos() check in (future/
other) drivers.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

23 months agotcp: Functional implementation of Accurate ECN
Richard Scheffenegger [Wed, 31 Aug 2022 13:01:25 +0000 (15:01 +0200)]
tcp: Functional implementation of Accurate ECN

The AccECN handshake and TCP header flags are supported,
no support yet for the AccECN option. This minimalistic
implementation is sufficient to support DCTCP while
dramatically cutting the number of ACKs, and provide ECN
response from the receiver to the CC modules.

Reviewed By: #transport, #manpages, rrs, pauamma
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D21011

23 months agotcp: finish SACK loss recovery on sudden lack of SACK blocks
Richard Scheffenegger [Wed, 31 Aug 2022 12:49:25 +0000 (14:49 +0200)]
tcp: finish SACK loss recovery on sudden lack of SACK blocks

While a receiver should continue sending SACK blocks for the
duration of a SACK loss recovery, if for some reason the
TCP options no longer contain these SACK blocks, but we
already started maintaining the Scoreboard, keep on handling
incoming ACKs (without SACK) as belonging to the SACK recovery.

Reported by: thj
Reviewed by: tuexen, #transport
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D36046

23 months agoStore mpidr as a 64-bit value on arm64
Andrew Turner [Thu, 25 Aug 2022 08:28:28 +0000 (08:28 +0000)]
Store mpidr as a 64-bit value on arm64

The mpidr register is 64 bit on arm64 and 32 bit on arm. Fix this by
extending the arm64 definition to include the top 32 bits.

To preserve KBI when MFCing split the value into two 32 bit values.
This will be cleaned up later only on main.

Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36346

23 months agoOptionalObsoleteFiles.inc: Add missing sendmail feature macro files.
Peter Wemm [Wed, 31 Aug 2022 08:54:04 +0000 (01:54 -0700)]
OptionalObsoleteFiles.inc: Add missing sendmail feature macro files.

MFC after: 3 days

23 months agoarm64: Fix hwpmc module for OPT_ACPI isn't selected
Emmanuel Vadot [Mon, 29 Aug 2022 09:50:52 +0000 (11:50 +0200)]
arm64: Fix hwpmc module for OPT_ACPI isn't selected

Fixes: 59191f3573f6 ("Add support of ARM CMN-600 controller ...")
Sponsored by: Beckhoff Automation GmbH & Co. KG

23 months agoprotosw: repair protocol selection logic in socket(2)
Gleb Smirnoff [Wed, 31 Aug 2022 04:19:46 +0000 (21:19 -0700)]
protosw: repair protocol selection logic in socket(2)

Pointy hat to: glebius
Fixes: 61f7427f02a307d28af674a12c45dd546e3898e4

23 months agoprocstat: fix printing divert(4) sockets
Gleb Smirnoff [Tue, 30 Aug 2022 23:26:21 +0000 (16:26 -0700)]
procstat: fix printing divert(4) sockets

23 months agotests: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT
Gleb Smirnoff [Tue, 30 Aug 2022 23:23:36 +0000 (16:23 -0700)]
tests: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT

23 months agoipfwpcap: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT
Gleb Smirnoff [Tue, 30 Aug 2022 23:22:50 +0000 (16:22 -0700)]
ipfwpcap: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT