]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agoinstallworld: handle ldd including preloaded objects
Ed Maste [Fri, 1 Apr 2022 13:58:47 +0000 (09:58 -0400)]
installworld: handle ldd including preloaded objects

The installworld target makes a temporary copy of binaries to be used
during the install.  Libraries that they depend on are also included,
found by using `ldd`.

After commit 0913953c9ed0 ldd started listing preloaded objects,
including [vdso], under a [preloaded] header.  Skip ldd output that is
enclosed in square brackets.

Reviewed by: cy, kib [earlier version]
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34734

(cherry picked from commit b3b462229f972e2ed24d450d7d2f8855cdd58a87)

2 years agopf: Initialize the table entry zone limit at initialization time
Mark Johnston [Wed, 30 Mar 2022 19:41:44 +0000 (15:41 -0400)]
pf: Initialize the table entry zone limit at initialization time

The limit may later be updated by the "set limit" directive in pf.conf.
UMA does not permit a limit to be set on a zone after any items have
been allocated from a zone.

Other UMA zones used by pf do not appear to be susceptible to this
problem: they either set a limit at zone creation time or never set one
at all.

PR: 260406
Reviewed by: kp
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 7d1ab866911a2b29e041d64bc83a93638533f957)

2 years agolibefivar(3): Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:29:32 +0000 (18:29 +0200)]
libefivar(3): Fix a typo in a source code comment

- s/partiton/partition/

(cherry picked from commit b1c5f60ce87cc2f179dfb81de507d9b7bf59564c)

2 years agomlx5en(4): Fix a few typos in source code comments
Gordon Bergling [Sun, 27 Mar 2022 15:59:43 +0000 (17:59 +0200)]
mlx5en(4): Fix a few typos in source code comments

- s/persistant/persistent/

(cherry picked from commit 4a87beeccb04430a154da19721e1c4715e9ddd31)

2 years agopfctl(8): Fix a typo in a comment
Gordon Bergling [Sun, 27 Mar 2022 15:55:55 +0000 (17:55 +0200)]
pfctl(8): Fix a typo in a comment

- s/steping/stepping/

(cherry picked from commit 2fa6223aaa430935f6108e3250ab7f2f0f899ea2)

2 years agoffs(3): Fix a common typo in source code comments
Gordon Bergling [Sun, 27 Mar 2022 16:03:16 +0000 (18:03 +0200)]
ffs(3): Fix a common typo in source code comments

- s/quadradically/quadratically/

Obtained from: NetBSD

(cherry picked from commit 2733b242e4c69240fed52854682f0c3b0079be17)

2 years agovxlan(4): Fix two typos in sysctl descriptions
Gordon Bergling [Mon, 7 Feb 2022 17:23:35 +0000 (18:23 +0100)]
vxlan(4): Fix two typos in sysctl descriptions

- s/fowarding/forwarding/

(cherry picked from commit bef80a728561704d77772c5e270dbf14e7d2e855)

2 years agogpart(8): Fix two typos in source code comments
Gordon Bergling [Sun, 27 Mar 2022 16:01:55 +0000 (18:01 +0200)]
gpart(8): Fix two typos in source code comments

- s/partiton/partition/

(cherry picked from commit 81ed3cae6918ddbe7047e21646955c77c70bc47f)

2 years agostand: Fix a common typo in source code comments
Gordon Bergling [Mon, 7 Feb 2022 17:12:58 +0000 (18:12 +0100)]
stand: Fix a common typo in source code comments

- s/existance/existence/

(cherry picked from commit 9cd75b558897ae698583bb69ce3f21ca2a8577c8)

2 years agoxen(4): Fix a few typos in source code comments
Gordon Bergling [Sun, 27 Mar 2022 16:05:58 +0000 (18:05 +0200)]
xen(4): Fix a few typos in source code comments

- s/querried/queried/

(cherry picked from commit bba12ee45394dc5aea1162c9b354daa7b2d24363)

2 years agofstyp(8): Fix a few typos in source code comments
Gordon Bergling [Mon, 7 Feb 2022 17:20:48 +0000 (18:20 +0100)]
fstyp(8): Fix a few typos in source code comments

- s/mmaping/mapping/
- s/filesytem/filesystem/

(cherry picked from commit 4e12c7c5107f3a5a61903691a515f89af0f99632)

2 years agoxen(3): Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:54:13 +0000 (18:54 +0200)]
xen(3): Fix a typo in a source code comment

- s/mmaping/mapping/

(cherry picked from commit 982015d2d2e7992b83eb6141e5a36c9774387ac2)

2 years agopkgbase: Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:56:58 +0000 (18:56 +0200)]
pkgbase: Fix a typo in a source code comment

- s/begining/beginning/

(cherry picked from commit eec4f5c034f649e873396125ec8d39826eb65135)

2 years agoipfilter(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:33:25 +0000 (18:33 +0200)]
ipfilter(4): Fix a typo in a source code comment

- s/existance/existence/

(cherry picked from commit fc48cc124c312db2e53ac08e5c6ab205a37035a4)

2 years agogeom(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:31:00 +0000 (18:31 +0200)]
geom(4): Fix a typo in a source code comment

- s/comand/command/

(cherry picked from commit 407a0eac799bd68f55b9a91087dcd4106226ebaf)

2 years agonetinet6: Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:52:38 +0000 (18:52 +0200)]
netinet6: Fix a typo in a source code comment

- s/maping/mapping/

(cherry picked from commit c55ecce1c1834cd026926fe4d1f21d7cef1c14f1)

2 years agoisci(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:42:11 +0000 (18:42 +0200)]
isci(4): Fix a typo in a source code comment

- s/recored/recorded/

(cherry picked from commit e4c1b3f0601997901f1d4aae4579763b03c44439)

2 years agoqlnxe(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:45:13 +0000 (18:45 +0200)]
qlnxe(4): Fix a typo in a source code comment

- s/existance/existence/

(cherry picked from commit a216b9c2e0bb789a9ce438564b699508a432960a)

2 years agodrm2: Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:36:32 +0000 (18:36 +0200)]
drm2: Fix a typo in a source code comment

- s/mmaping/mapping/

(cherry picked from commit 22ba115b49a2c266aa1967f6b192b7aa8f883b7d)

2 years agoextra_tcp_stacks: Fix two typos in source code comments
Gordon Bergling [Mon, 7 Feb 2022 17:14:22 +0000 (18:14 +0100)]
extra_tcp_stacks: Fix two typos in source code comments

- s/recusive/recursive/

(cherry picked from commit 75fdc440c8abf30f62bbaaae70a786e9d83311be)

2 years agopmc(3): Fix a common typo in json descriptions
Gordon Bergling [Sun, 6 Feb 2022 16:17:57 +0000 (17:17 +0100)]
pmc(3): Fix a common typo in json descriptions

- s/from from/from/

(cherry picked from commit 5c4aa6257210502c93ad65882a8a4842d984bae2)

2 years agoexca(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:39:36 +0000 (18:39 +0200)]
exca(4): Fix a typo in a source code comment

- s/maping/mapping/

(cherry picked from commit 9a9d901bf2c39d2c4df6d46915a8783a9c1762f9)

2 years agomount(8): Fix a typo in source code comments
Gordon Bergling [Mon, 7 Feb 2022 17:15:34 +0000 (18:15 +0100)]
mount(8): Fix a typo in source code comments

- s/filesytem/filesystem/

(cherry picked from commit c09770b2cd8005bb721c8d261a7d48ec3aa64f4f)

2 years agocxgbe(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:32:19 +0000 (18:32 +0200)]
cxgbe(4): Fix a typo in a source code comment

- s/begining/beginning/

(cherry picked from commit c9023cf7feb19694d433abe45cecedc3a2b99cb0)

2 years agonetgraph(3): Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 16:50:45 +0000 (18:50 +0200)]
netgraph(3): Fix a typo in a source code comment

- s/failes/fails/

(cherry picked from commit 79438267b3ae4fcf5bdefdee60d4f19defcd5ff1)

2 years agocxgbetool(8): Fix a typo in the man page
Gordon Bergling [Sun, 27 Mar 2022 16:58:52 +0000 (18:58 +0200)]
cxgbetool(8): Fix a typo in the man page

- s/begining/beginning/

(cherry picked from commit 28a6b24729c4e8f77c60834614c78dd890e64668)

2 years agolibc: Fix a typo in a source code comment
Gordon Bergling [Sun, 6 Feb 2022 16:25:59 +0000 (17:25 +0100)]
libc: Fix a typo in a source code comment

- s/compnent/component/

(cherry picked from commit 066e393f8f76156d9029e8ba6d16915a58d4cd67)

2 years agocxgbe(4): Handle FORCE_FEC in pcaps correctly.
Navdeep Parhar [Fri, 25 Mar 2022 07:34:54 +0000 (00:34 -0700)]
cxgbe(4): Handle FORCE_FEC in pcaps correctly.

The firmware doesn't report FORCE_FEC in pcaps if the transceiver
plugged in at that time does not support a speed that may use FEC.  It
is incorrect for the driver to assume that the FORCE_FEC value it read
during attach (in init_link_config) is permanent.  Instead, it should
check pcaps just before issuing the L1CFG command.

Sponsored by: Chelsio Communications

(cherry picked from commit 231f2112403229a1382be3f5f6ed50bffe3497e8)

2 years agocxgbe(4): Allow dump_cimla and dump_devlog to sleep.
Navdeep Parhar [Tue, 22 Mar 2022 20:13:56 +0000 (13:13 -0700)]
cxgbe(4): Allow dump_cimla and dump_devlog to sleep.

This has been safe since e9e7bc82505, which moved parts of error
handling from the ithread to a taskqueue.

Sponsored by: Chelsio Communications

(cherry picked from commit 41c4e1c7f738de2e88acb77911a22dbd57ad7d79)

2 years agoMFC cc68614, ac69e5d, 7ed8e14: Update contrib/expat to 2.4.7.
Xin LI [Mon, 28 Mar 2022 05:22:07 +0000 (22:22 -0700)]
MFC cc68614ac69e5d7ed8e14: Update contrib/expat to 2.4.7.

(cherry picked from commit cc68614da8232d8baaca0ae0d0dd8f890f06623e)
(cherry picked from commit ac69e5d471014c95070cd6294db315089a62725b)
(cherry picked from commit 7ed8e142a00d4b711dd2021b37b84a6e7f86516e)

2 years agobsd-family-tree: macOS 11 and macOS 12
Warner Losh [Fri, 1 Apr 2022 04:24:16 +0000 (22:24 -0600)]
bsd-family-tree: macOS 11 and macOS 12

Sponsored by: Netflix

(cherry picked from commit 4fc5a607fdf47ce5148e01d62ea474a4b6b0b238)

2 years agobsd-family-tree: Dragonfly 6.2.1 release
Warner Losh [Fri, 1 Apr 2022 04:14:56 +0000 (22:14 -0600)]
bsd-family-tree: Dragonfly 6.2.1 release

Sponsored by: Netflix

(cherry picked from commit d2cc7bff4d8874937a97f8b74024cce6aaa9a750)

2 years agobsd-family-tree: Add OpenBSD 7.0
Warner Losh [Fri, 1 Apr 2022 04:09:56 +0000 (22:09 -0600)]
bsd-family-tree: Add OpenBSD 7.0

Sponsored by: Netflix

(cherry picked from commit 754cf44d99f624d9e7888f6e074ae39e2eb26d8f)

2 years agobsd-family-tree: Add FreeBSD 12.3
Warner Losh [Fri, 1 Apr 2022 03:11:20 +0000 (21:11 -0600)]
bsd-family-tree: Add FreeBSD 12.3

FreeBSD 12.3 wasn't added when it was released. Add it now.

Sponsored by: Netflix

(cherry picked from commit 58e6bbc5acb2d8c623cfbec37bfdda8b03d15a1f)

2 years agobsd-family-tree: Add 2.8BSD relationship to Research 7th edition
Warner Losh [Fri, 25 Jun 2021 17:03:17 +0000 (11:03 -0600)]
bsd-family-tree: Add 2.8BSD relationship to Research 7th edition

In the 2BSD line, the 2.8BSD tapes were the first ones to include a
kernel, both source and a bootable tape. This was an AT&T V7 kernel,
with a number of bug fixes; new features in use at Berkeley; performance
enhancements that were circulating to V7 in the licensee community; and
build system changes. Based on the TUHS archives, it contains none of
the V32 changes, however.

In addition to the source code analysis, Mike Karels relates the story
of how his group lost a customizes to V6 on a PDP-11/40 due to a disk
crash. Since V7 just came out and Bill Jolitz had just brought that up
elsewhere, they replaced their customized V6 with a V7 system, and that
base would eventually become 2.8BSD. (Quarter Century of Unix)

Given both lines of evidence, add a direct line from V7 Unix to 2.8BSD.

Also confirmed that the V6 line to 1BSD and 2BSD was appropriate. 1BSD
and 2BSD included ashell(1) and ex(1). ashell(1) was derived from v6
hell. ex(1) was an enhanced v6 ed.  2.8BSD included process control and
user-land utilities from 4.1BSD

Discussed with: Clem Cole, Diomidis Spinellis (dds)
Differential Revision: https://reviews.freebsd.org/D30883

(cherry picked from commit 520a2401a65f94a2a6766d3a253baa2a1af0e54b)

2 years agobsd-family-tree: add DragonFly 6.0.0
Warner Losh [Thu, 24 Jun 2021 16:42:36 +0000 (10:42 -0600)]
bsd-family-tree: add DragonFly 6.0.0

Tagged on May 8, 2021.

Sponsored by: Netflix

(cherry picked from commit 779b70a2264fa187beb232dad2f018d41c31e34a)

2 years agobsd-family-tree: Add NetBSD 9.2
Warner Losh [Wed, 19 May 2021 21:29:11 +0000 (15:29 -0600)]
bsd-family-tree: Add NetBSD 9.2

NetBSD 9.2 was released on May 12, 2021

Submitted by: Martin Husemann
Sponsored by: Netflix

(cherry picked from commit 71a071be1c5ae971421a830d76ee30186ffdd199)

2 years agoReleases history update
Maxim Konovalov [Fri, 7 May 2021 19:50:10 +0000 (19:50 +0000)]
Releases history update

Add DragonFly 5.8.1, OpenBSD 6.7, FreeBSD 11.4, DragonFly 5.8.2,
DragonFly 5.8.3, OpenBSD 6.8, NetBSD 9.1, FreeBSD 13.0, OpenBSD 6.9.

(cherry picked from commit f0c914baacc7f0eefe9ff47ed04aeb500b7bdcd5)

2 years agofstyp: detect Raspberry Pi Pico boot filesystem as FAT
Ed Maste [Mon, 28 Mar 2022 21:03:10 +0000 (17:03 -0400)]
fstyp: detect Raspberry Pi Pico boot filesystem as FAT

fstyp looks for a 0x55 0xAA signature at offset 510, but this is not
required by specifications and is not proivded by the Raspberry Pi Pico
bootloader.

We should really remove the signature check and implement a more
comprehensive BPB validation instead, but it will require more
investigation and testing.  For now just add a special case for the
Raspberry Pi Pico bootloader, to avoid introducing regressions or new
false positives.

PR: 262896
Reviewed by: delphij
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34699

(cherry picked from commit 868c1b8431f297ade8deba5baf903f73cf5e11c6)
(cherry picked from commit 27c2f016b86744aa5d4c6031b4ef2fc16bbf6546)

2 years agox86: Defer early TSC timecounter calibration to SI_SUB_CPU
Mark Johnston [Sat, 5 Mar 2022 00:34:43 +0000 (19:34 -0500)]
x86: Defer early TSC timecounter calibration to SI_SUB_CPU

If we can't determine the TSC frequency using CPU registers, we need to
give a chance for Hyper-V drivers to register a timecounter (during
SI_SUB_HYPERVISOR) since an emulated 8254 might not be available.
Thus, split probe_tsc_freq() into early and late stages, and wait until
the latter to attempt calibration using a reference clock.

Fixes: 84369dd52369 ("x86: Probe the TSC frequency earlier")
Reported and tested by: khng, Shawn Webb
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 075e2779aca7cbd8f201ce0e1bb60318d0cbd8b8)

2 years agoamd64: Call clock_init() after finishidentcpu()
Mark Johnston [Sat, 5 Mar 2022 00:32:39 +0000 (19:32 -0500)]
amd64: Call clock_init() after finishidentcpu()

As in commit c3d830cf7c71, we should finalize CPU identification before
probing the TSC frequency.

Fixes: 84369dd52369 ("x86: Probe the TSC frequency earlier")
Reported by: khng

(cherry picked from commit f7a6dccf426676bdd8c6be25491e57dca830de25)

2 years agox86: Probe the TSC frequency earlier
Mark Johnston [Tue, 1 Mar 2022 14:39:35 +0000 (09:39 -0500)]
x86: Probe the TSC frequency earlier

This lets us use the TSC to implement early DELAY, limiting the use of
the sometimes-unreliable 8254 PIT.

PR: 262155
Reviewed by: emaste
Tested by: emaste, mike tancsa <mike@sentex.net>, Stefan Hegnauer <stefan.hegnauer@gmx.ch>
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 84369dd52369cbae28970dca20a53d3de1719907)

2 years agofile: Avoid a read-after-free of fd tables in sysctl handlers
Mark Johnston [Thu, 17 Mar 2022 16:54:37 +0000 (12:54 -0400)]
file: Avoid a read-after-free of fd tables in sysctl handlers

Some loops access the fd table of a different process, and drop the
filedesc lock while iterating, so they check the table's refcount.
However, we access the table before the first iteration, in order to get
the number of table entries, and this access can be a use-after-free.

Fix the problem by checking the refcount before we start iterating.

Reported by: pho
Reviewed by: mjg
Sponsored by: The FreeBSD Foundation

(cherry picked from commit c70224229205c756bf1c2007a6b96b37126eb047)

2 years agolibc: Restore fp state upon flush error in fputc
Mark Johnston [Fri, 25 Mar 2022 14:46:24 +0000 (10:46 -0400)]
libc: Restore fp state upon flush error in fputc

This is akin to commit bafaa70b6f9098d83d074968c8e6747ecec1e118.

Reported by: Guy Yur <guyyur@gmail.com>
Fixes: 86a16ada1ea6
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 6e13794fbe6e82c21365d0fd66769bf8b19c0197)

2 years agoTreat cache write as a read in arm64 data faults
Andrew Turner [Sat, 26 Mar 2022 15:59:34 +0000 (15:59 +0000)]
Treat cache write as a read in arm64 data faults

On arm64 we can ask the hardware to perform cache operations from
userspace. These require read permission however when the memory is
unmapped the kernel will receive a write exception. Add a check to
see if the cause of the exception is from the cache and pass a memory
read fault type to the vm subsystem.

PR: 262836
Reported by: dch
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 029c1c4828aab451ba262cd4e2e1d9362cf18b76)

2 years ago*: Do not use the no-op -r flag for bsdlabel(8)
Mateusz Piotrowski [Thu, 17 Mar 2022 10:21:06 +0000 (11:21 +0100)]
*: Do not use the no-op -r flag for bsdlabel(8)

The -r flag is ignored by the FreeBSD implementation of bsdlabel(8)
(also called disklabel(8) in the past). Remove its use from examples
and tests in the tree.

This commit does not touch historical documentation under share/doc/smm
and files under contrib/netbsd-tests.

Reviewed by: imp
MFC after: 2 weeks
Approved by: imp (src)
Fixes: 57dfbec57b6d More axe-work:
Differential Revision: https://reviews.freebsd.org/D34585

(cherry picked from commit fd061175257a577d13852be17e3b2506ad25b987)

2 years agorc.d: Chmod +x all the scripts for consistency
Mateusz Piotrowski [Thu, 17 Mar 2022 16:20:57 +0000 (17:20 +0100)]
rc.d: Chmod +x all the scripts for consistency

Reviewed by: lwhsu
Approved by: lwhsu (src)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D34589

(cherry picked from commit 7846554819d3be52816ca6ad60bf84f6409a0bf1)

2 years agortsx: Remove update of softc during probe and some var rename.
Henri Hennebert [Fri, 25 Mar 2022 19:23:59 +0000 (15:23 -0400)]
rtsx: Remove update of softc during probe and some var rename.

MFC after: 1 week

(cherry picked from commit 2e8830678637f5c1757a228ceb2605387c6f97ef)

2 years agortsx: Display error if rtsx_read()/rtsx_write() fail.
Henri Hennebert [Thu, 24 Mar 2022 01:01:00 +0000 (21:01 -0400)]
rtsx: Display error if rtsx_read()/rtsx_write() fail.

MFC after: 1 week

(cherry picked from commit 9b261d2e0a4490e436936c5f9209f7cc100b4787)

2 years agortsx: Don't detach during shutdown
Henri Hennebert [Thu, 24 Mar 2022 00:58:38 +0000 (20:58 -0400)]
rtsx: Don't detach during shutdown

MFC after: 1 week

(cherry picked from commit 6b7718377b8a1a3a5d3cfb98bd09dda5d55de1ed)

2 years agosound: test PCM_REGISTERED before PCM_DETACHING
Ed Maste [Mon, 21 Mar 2022 16:15:22 +0000 (12:15 -0400)]
sound: test PCM_REGISTERED before PCM_DETACHING

PCM_REGISTERED(d) tests that d is not NULL, so perform that check first
as we may have cases where devclass_get_softc has a null entry.

PR: 262671
Reviewed by: hselasky
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34648

(cherry picked from commit da03ac41c9bca270b491fcf4bf219c4108688a05)

2 years agoFix kernel build without INET6
Ed Maste [Thu, 30 Dec 2021 21:49:35 +0000 (16:49 -0500)]
Fix kernel build without INET6

Reported by: Gary Jennejohn
Fixes: ff3a85d32411 ("[lltable] Add per-family lltable ...")
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 818952c638a72bd677345fd8ddd05c31b34a2aee)

2 years agoFix kernel build without INET and INET6
Ed Maste [Sun, 2 Jan 2022 00:53:42 +0000 (19:53 -0500)]
Fix kernel build without INET and INET6

Reviewed by: brooks, melifaro
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33718

(cherry picked from commit a6668e31aa3cc855bfb37d6edc05122514592a47)

2 years agonfsclient: Fix a typos in source code comments
Gordon Bergling [Sun, 27 Mar 2022 17:27:05 +0000 (19:27 +0200)]
nfsclient: Fix a typos in source code comments

- s/ony/only/

Obtained from: NetBSD

(cherry picked from commit c1ad8a39a1c4271be62229cf9f6e93e7f1f569e7)

2 years agoath: Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 17:28:49 +0000 (19:28 +0200)]
ath: Fix a typo in a source code comment

- s/ony/only/

(cherry picked from commit 8eb774fe54c88a5417a287bd811a917fdfe1c2ba)

2 years agomac_veriexec: Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 17:56:15 +0000 (19:56 +0200)]
mac_veriexec: Fix a typo in a source code comment

- s/seach/search/

(cherry picked from commit 1920133d8fb77004c2d312f8b141e653d9a29e91)

2 years agoypbind(8): Fix a typo in the man page
Gordon Bergling [Sun, 27 Mar 2022 18:42:24 +0000 (20:42 +0200)]
ypbind(8): Fix a typo in the man page

- s/ot/or/

(cherry picked from commit 8bcffb86c7d5cff1474b14449c01388cac8cbc3d)

2 years agolibmd: Fix a common typo in the license header
Gordon Bergling [Sun, 27 Mar 2022 17:46:32 +0000 (19:46 +0200)]
libmd: Fix a common typo in the license header

- s/rouines/routines/

Obtained from: NetBSD

(cherry picked from commit 3e5a11d53a757f05ac1b61942f23f5f0cd9de691)

2 years agonetgraph(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 18:08:44 +0000 (20:08 +0200)]
netgraph(4): Fix a typo in a source code comment

- s/shapshot/snapshot/

(cherry picked from commit 1dc2c71ed897e162ad33e09ab3b0015613fa405a)

2 years agopf(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 27 Mar 2022 17:57:49 +0000 (19:57 +0200)]
pf(4): Fix a typo in a source code comment

- s/seaching/searching/

(cherry picked from commit ef88adc5273dea4139fc5693cc34508d492979e7)

2 years agoClear non-x86 compat stat syscall kernel stack memory disclosure
Ed Maste [Tue, 29 Mar 2022 17:55:21 +0000 (13:55 -0400)]
Clear non-x86 compat stat syscall kernel stack memory disclosure

32-bit architectures other than i386 have 64-bit time_t which results
in a struct timespec with 12 bytes for tv_sec and tv_nsec, and 4 bytes
of padding.  Zero the padding holes in struct stat32 and struct
freebsd11_stat32.

i386 has 32-bit time_t; struct timespec is 8 bytes and has no padding.

Found by inspection, prompted by a report by Reno Robert of Trend Micro
Zero Day Initiative.  The originally reported issue (ZDI-CAN-14538) is
already fixed in all supported FreeBSD versions (it was addressed
incidentally as part of the 64-bit inode project).

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34709

(cherry picked from commit f90cd1ae30b5f49e9f6ea58a0628ce1c8d8822bc)

Approved by: re (gjb, early MFC)

2 years agoRemove snd_aureal driver source
Ed Maste [Fri, 18 Mar 2022 20:11:32 +0000 (16:11 -0400)]
Remove snd_aureal driver source

This driver was not finished when it was committed in 1999 and was never
connected to the build.

A version of the driver used to be available in ports as
audio/aureal-kmod, but it has been removed.  It did not build on FreeBSD
10.x or later and the binary objects it required were not available
after Google Code disappeared.

PR: 124343
Reported by: joel
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

(cherry picked from commit ef5dec7cc75b985d9ada767f716e19ec44f5c44a)

2 years agoneta: split fixed and in-band link status configuration
Sebastien Bini [Tue, 22 Mar 2022 15:44:09 +0000 (16:44 +0100)]
neta: split fixed and in-band link status configuration

Fixed-link mode requires different handling than the in-band
managed connection. Update interrupt, link-up/down and
autonegotiation settings for the former.

Reviewed by: mw
MFC after: 1 week
Obtained from: Stormshield
Differential Revision: https://reviews.freebsd.org/D34394

(cherry picked from commit 231237bbb0e803f9047c235cd6b5878f70e6c5eb)

2 years agoExtend device_get_property API
Kornel Duleba [Fri, 28 Jan 2022 09:28:37 +0000 (10:28 +0100)]
Extend device_get_property API

In order to support various types of data stored in device
tree properties or ACPI _DSD packages, create a new enum so
the caller can specify the expected type of a property they
want to read, according to the binding. The bus logic will use
that information to process the underlying data.

For example in DT all integer properties are stored in BE format.
In order to get constant results across different platforms we
need to convert its endianness to match the host.

Another example are ACPI_TYPE_INTEGER properties stored
as uint64_t. Before this patch the ACPI logic would refuse
to read them if the provided buffer was smaller than 8 bytes.
Now this can be handled by using DEVICE_PROP_UINT32 type.

Modify the existing consumers of this API to reflect the changes
and update the man pages accordingly.

Reviewed by: mw
Obtained from: Semihalf
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33457

(cherry picked from commit b344de4d0d163cbd8bf88cb5d226c18fe96f488f)

2 years agobus_if: Add a default implementation of get_property
Kornel Duleba [Tue, 25 Jan 2022 10:10:55 +0000 (11:10 +0100)]
bus_if: Add a default implementation of get_property

There are multiple buses that pretend to be ofw compatible,
e.g ofw_pci, mii_fdt. We now need to provide an implementation
of BUS_GET_PROPERTY for every one of them. Instead of modifying
them one by one it's better to just provide a default
implementation that simply traverses up the device tree.
Remove the now unneeded BUS_GET_PROPERTY implementation in mii_fdt.

Reviewed by: andrew, bz
Obtained from: Semihalf
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34031

(cherry picked from commit 206dc82bc3fc5e1d90200e189ce5f2240dfec874)

2 years agomiibus: Add support for mapping OFW nodes to PHY devices
Kornel Duleba [Mon, 15 Nov 2021 08:55:33 +0000 (09:55 +0100)]
miibus: Add support for mapping OFW nodes to PHY devices

Create a new miibus OFW specific layer leveraging miibus_fdt.c code.
PHY drivers can than read the properties using device_get_property(9) API.
Resource(interrupt) allocation is also supported.
In order to enable this each NIC/switch driver will have to be modified,
because of how miibus is attached to the parent driver.

Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32812

(cherry picked from commit 9174eab4142c5ed199b1599c1a3eefd5f0573ab7)

2 years agomii_fdt: Add support for switch PHY node lookup
Kornel Duleba [Wed, 27 Oct 2021 08:34:17 +0000 (10:34 +0200)]
mii_fdt: Add support for switch PHY node lookup

Previously we would only search for a PHY xref in node of the miibus
parent.
That didn't work very well with switches.
Fix that by searching through "ports" subnode, checking if any of its
children have a valid PHY xref.
Since switches tend to have multiple ports we also have multiple
candidates.
Use the PHY address read from mii_attach_args to find the right one.

Obtained from: Semihalf
Sponsored by: Alstom Group
Reviewed by: mw
Differential revision: https://reviews.freebsd.org/D32690

(cherry picked from commit 4b843e7f0319867c412070e7752dbb47f195b322)

2 years agosdhci_xenon: add ACPI support
Bartlomiej Grzesik [Wed, 21 Jul 2021 14:36:11 +0000 (16:36 +0200)]
sdhci_xenon: add ACPI support

Add support for ACPI device probing for SDHCI controller found on Marvell chips.

Reviewed by: mw
Sponsored by: Semihalf
Differential revision: https://reviews.freebsd.org/D31600

(cherry picked from commit adbce5ff747b6372b6cda915d06fe52b4a67b4d8)

2 years agosdhci_xenon: split driver file into generic file and fdt parts
Bartlomiej Grzesik [Thu, 15 Jul 2021 12:29:15 +0000 (14:29 +0200)]
sdhci_xenon: split driver file into generic file and fdt parts

This patch splits driver code into two seperate files sdhci_xenon.c
and sdhci_xenon_fdt.c. This will allow future implementation of ACPI
discovery of sdhci on Xenon chips.

Reviewed by: mw
Sponsored by: Semihalf
Differential revision: https://reviews.freebsd.org/D31599

(cherry picked from commit d78e464d23304084be17cb8db8981558f2829d6c)

2 years agommc: switch mmc_helper to device_ api
Bartlomiej Grzesik [Mon, 2 Aug 2021 14:27:23 +0000 (16:27 +0200)]
mmc: switch mmc_helper to device_ api

Add generic mmc_helper which uses newly introduced device_*_property
api. Thanks to this change the sd/mmc drivers will be capable
of parsing both DT and ACPI description.

Ensure backward compatibility for all mmc_fdt_helper users.

Reviewed by: manu, mw
Sponsored by: Semihalf
Differential revision: https://reviews.freebsd.org/D31598

(cherry picked from commit 8a8166e5bcfb50e2b7280581b600d098fa6c9fc7)

mmc: Fix regression in 8a8166e5bcfb breaking Stratix 10 boot

The refactoring in 8a8166e5bcfb introduced a functional change that
breaks booting on the Stratix 10, hanging when it should be attaching
da0. Previously OF_getencprop was called with a pointer to host->f_max,
so if it wasn't present then the existing value was left untouched, but
after that commit it will instead clobber the value with 0. The dwmmc
driver, as used on the Stratix 10, sets a default value before calling
mmc_fdt_parse and so was broken by this functional change. It appears
that aw_mmc also does the same thing, so was presumably also broken on
some boards.

Fixes: 8a8166e5bcfb ("mmc: switch mmc_helper to device_ api")
Reviewed by: manu, mw
Differential Revision: https://reviews.freebsd.org/D32209

(cherry picked from commit 4a331971d2f1083f35b87197da0614fa3e0e53cb)

2 years agodevice: add device_get_property and device_has_property
Bartlomiej Grzesik [Fri, 30 Jul 2021 08:57:06 +0000 (10:57 +0200)]
device: add device_get_property and device_has_property

Generialize bus specific property accessors. Those functions allow driver code
to access device specific information.

Currently there is only support for FDT and ACPI buses.

Reviewed by: manu, mw
Sponsored by: Semihalf
Differential revision: https://reviews.freebsd.org/D31597

(cherry picked from commit 3f9a00e3b577dcca57e331842e0baf2dbdf9325f)

acpi: Fix error code returned in acpi_bus_get_prop

ACPI implementation of device_get_property would return "-1" when
property was found, but it's type wasn't supported.
This causes device_has_property to return false in that scenario, which
arguably could be considered as incorrect.

Fix that by returning "0" in that case.

Reviewed by: bz, mw
Tested by: mw
MFC after: 2 weeks
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D33103

(cherry picked from commit d9ed1dcc5c6894e376e6e4ef6f2554dd056baf4e)

2 years agoacpica: add ACPI_GET_PROPERTY to access Device Specific Data (DSD)
Bartlomiej Grzesik [Tue, 27 Jul 2021 12:39:31 +0000 (14:39 +0200)]
acpica: add ACPI_GET_PROPERTY to access Device Specific Data (DSD)

Add lazy acquiring of DSD package, which allows accessing Device
Specific Data.

Reviewed by: manu, mw
Sponsored by: Semihalf
Differential revision: https://reviews.freebsd.org/D31596

(cherry picked from commit b91fc6c43a81d3b760fb570c8439a922e536d7e6)

2 years agoAdd the Ampere and Fujitsu arm64 implementer IDs
D Scott Phillips [Fri, 25 Mar 2022 16:05:22 +0000 (09:05 -0700)]
Add the Ampere and Fujitsu arm64 implementer IDs

Reviewed By: andrew, emaste
MFC after: 3 days
Sponsored by: Ampere Computing
Differential Revision: https://reviews.freebsd.org/D34666

(cherry picked from commit 220c48e2d987360b935f4863ee0436c40a60b46f)

2 years agoarm64: Add explicit barrier after address translation instruction
D Scott Phillips [Fri, 25 Mar 2022 16:04:47 +0000 (09:04 -0700)]
arm64: Add explicit barrier after address translation instruction

Following ARMARM sec D5.2.11, which says:

> Where an instruction results in an update to a System register,
> as is the case with the AT * address translation instructions,
> explicit synchronization must be performed before the result is
> guaranteed to be visible to subsequent direct reads of the
> PAR_EL1.

Reviewed By: andrew
MFC after: 3 weeks
Sponsored by: Ampere Computing
Differential Revision: https://reviews.freebsd.org/D34665

(cherry picked from commit 7be7bd67758520ea2f9784a81ad244e99a7632f0)

2 years agoarm64: pmap: Mask VA operand in TLBI instructions
D Scott Phillips [Fri, 25 Mar 2022 16:04:11 +0000 (09:04 -0700)]
arm64: pmap: Mask VA operand in TLBI instructions

Bits 43:0 of the TLBI operand are bits 55:12 of the VA.  Leaving
bits 63:55 of the VA in bits 51:44 of the operand might wind up
setting the TTL field (47:44) and accidentally restricting which
translation levels are flushed in the TLB.

Reviewed By: andrew
MFC after: 3 days
Sponsored by: Ampere Computing
Differential Revision: https://reviews.freebsd.org/D34664

(cherry picked from commit a693a30038278b1ccd3e67b98d76e259ca1b405d)

2 years agoFix arm64 TLB invalidation with non-4k pages
Andrew Turner [Thu, 10 Mar 2022 14:39:03 +0000 (14:39 +0000)]
Fix arm64 TLB invalidation with non-4k pages

When using 16k or 64k pages atop will shift the address by more than
the needed amount for a tlbi instruction. Replace this with a new macro
to shift the address by 12 and use PAGE_SIZE in the for loop to let the
code work with any page size.

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34516

(cherry picked from commit 813738fabaaea43503724b8371faf5bab73a3047)

2 years agodevd: Add rtw to wireless list
Warner Losh [Mon, 28 Mar 2022 14:16:14 +0000 (08:16 -0600)]
devd: Add rtw to wireless list

rtw88 and rtw89 are coming soon, so add them here now

Sponsored by: Netflix
MFC After: 1 day

(cherry picked from commit dea368bc5e7905e7456b052c545dcfd935341083)

2 years agolibarchive: merge vendor bugfixes
Martin Matuska [Sat, 26 Mar 2022 10:04:36 +0000 (11:04 +0100)]
libarchive: merge vendor bugfixes

Bugfixes:
  IS #1672 and OSS-Fuzz #38766:
    (zip reader) fix possible out-of-bounds read in zipx_lzma_alone_init()
  PR #1676: (mtree reader) remove the unused variable "detected_bytes"
  PR #1674: (doc) fix use of At mdoc(7) macro in cpio.5

(cherry picked from commit 0c9c2eb394b4a5694bc5ea11b326f334c735c813)

2 years agozfs: merge openzfs/zfs@52bad4f23 (zfs-2.1-release) into stable/13
Martin Matuska [Tue, 29 Mar 2022 10:41:53 +0000 (12:41 +0200)]
zfs: merge openzfs/zfs@52bad4f23 (zfs-2.1-release) into stable/13

OpenZFS release 2.1.4

Notable upstream pull request merges:
  #13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
  #13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
  #13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS tag: zfs-2.1.4
OpenZFS commit: 52bad4f23daaa5f827f802c8d05785a27b80275d
Relnotes: yes

2 years agoamd64: bring back asm bcmp, shared with memcmp
Mateusz Guzik [Fri, 25 Mar 2022 15:04:04 +0000 (15:04 +0000)]
amd64: bring back asm bcmp, shared with memcmp

Turns out clang converts "memcmp(foo, bar, len) == 0" and similar to
bcmp calls.

Reviewed by: emaste (previous version), jhb (previous version)
Differential Revision: https://reviews.freebsd.org/D34673

(cherry picked from commit fbc002cb72d2d9bb435cce99630d5d7da9f59390)

2 years agoCTL: Rework 05c3e8e87142 using %zu format.
Alexander Motin [Fri, 25 Feb 2022 16:52:17 +0000 (11:52 -0500)]
CTL: Rework 05c3e8e87142 using %zu format.

MFC after: 2 days

(cherry picked from commit f00ced06da25540c2057e46033d1c38b4ade7c8b)

2 years agoFix 32-bit build after 530d274c15e5.
Alexander Motin [Thu, 24 Feb 2022 23:10:47 +0000 (18:10 -0500)]
Fix 32-bit build after 530d274c15e5.

MFC after: 3 days

(cherry picked from commit 05c3e8e87142a8689503a6731237b48fb43c1bec)

2 years agoCTL: Add length validation for incoming HA messages.
Alexander Motin [Thu, 24 Feb 2022 21:17:34 +0000 (16:17 -0500)]
CTL: Add length validation for incoming HA messages.

This should fix uninitialized memory reads when working with broken
HA peer, like one fixed in 1a8d8a3a909.  Instead print error message
and kill the HA link.

MFC after: 3 days
Sponsored by: iXsystems, Inc.

(cherry picked from commit 530d274c15e5b3f69088b4b53f8dc5b2b849a916)

2 years agomfc jail: handle jailsys parameters in modification permission test
Jamie Gritton [Sat, 26 Mar 2022 02:16:51 +0000 (19:16 -0700)]
mfc jail: handle jailsys parameters in modification permission test

Avoid a null dereference when a value-less jailsys parameter is passed
to "jail -m".  There was already code to handle boolean parameters,
but in reality any parameter could be passed without a value.

PR:             262471
Reported by:    jcaplan at blackberry.com

(cherry picked from commit 8f1543785f77086494c73310ba8f5d09b61ff7eb)

2 years agopf: hoist the unlinked rules lock out of the mass rule removal loop
Mateusz Guzik [Mon, 28 Feb 2022 10:39:02 +0000 (11:39 +0100)]
pf: hoist the unlinked rules lock out of the mass rule removal loop

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

(cherry picked from commit b163dcab27862f90e0108a73185945456cafd2f3)

2 years agopf: add PF_UNLNKDRULES_ASSERT
Mateusz Guzik [Mon, 28 Feb 2022 10:37:30 +0000 (11:37 +0100)]
pf: add PF_UNLNKDRULES_ASSERT

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

(cherry picked from commit f11b6505f14600d350dfa427f61abb8d1c7e1db4)

2 years agopf: remove spurious zeroing from pf_ioctl_addrule
Mateusz Guzik [Fri, 25 Feb 2022 16:18:13 +0000 (17:18 +0100)]
pf: remove spurious zeroing from pf_ioctl_addrule

Newly allocated counters are guaranteed to be 0.

This removes 5 IPIs for each loaded rule.

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

(cherry picked from commit 15ada7514954150e6c07fd6a31ceb686ece76943)

2 years agou3g: Add support Quectel EM12-G modem.
Alexander V. Chernikov [Sat, 29 Jan 2022 09:53:38 +0000 (09:53 +0000)]
u3g: Add support Quectel EM12-G modem.

Submitted by: <tda.77793 at gmail.com>
PR: 260218
MFC after: 2 weeks

(cherry picked from commit 217481a3332783d03366c4512b0b164764aa6c6e)

2 years agoifconfig: remove debug printf introduced in 779fd0534466
Alexander V. Chernikov [Sat, 29 Jan 2022 11:18:13 +0000 (11:18 +0000)]
ifconfig: remove debug printf introduced in 779fd0534466

Reported by: jhb

(cherry picked from commit 656f5031c39108d2418454f12b52931c32514741)

2 years agoifconfig: improve vlan options parsing
Alexander V. Chernikov [Mon, 17 Jan 2022 09:30:26 +0000 (09:30 +0000)]
ifconfig: improve vlan options parsing

PR: 261136
Reported by: Daniel O'Connor
MFC after: 2 weeks

(cherry picked from commit 779fd05344662aeec79c29470258bf657318eab3)

2 years agolinux: add sysctl to pass untranslated interface names
Alexander V. Chernikov [Sat, 8 Jan 2022 15:41:53 +0000 (15:41 +0000)]
linux: add sysctl to pass untranslated interface names

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33792

(cherry picked from commit 1f70a85b4cbc3ad19cec4a390e8754e54815be85)

2 years agolinux: fix linux_recvmsg() MSG_PEEK flag handling
Alexander V. Chernikov [Sat, 8 Jan 2022 13:44:17 +0000 (13:44 +0000)]
linux: fix linux_recvmsg() MSG_PEEK flag handling

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33790

(cherry picked from commit 96c524d8b2c9abe3927abf948fbbd73a7cb42c4a)

2 years agorouting: Add unified level-based logging support for the routing subsystem.
Alexander V. Chernikov [Sun, 26 Dec 2021 18:42:12 +0000 (18:42 +0000)]
routing: Add unified level-based logging support for the routing subsystem.

Summary: MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33664

(cherry picked from commit 63f7f3921bdc468a9b564a530f63480cc82ebd7c)

2 years agonhops: split nh_family into nh_upper_family and nh_neigh_family.
Alexander V. Chernikov [Sun, 26 Dec 2021 18:07:37 +0000 (18:07 +0000)]
nhops: split nh_family into nh_upper_family and nh_neigh_family.

With IPv4 over IPv6 nexthops and IP->MPLS support, there is a need
 to distingush "upper" e.g. traffic family and "neighbor" e.g. LLE/gateway
 address family. Store them explicitly in the private part of the nexthop data.

While here, store nhop fibnum in nhop_prip datastructure to make it self-contained.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33663

(cherry picked from commit 823a08d7403c475fea0ecbbfff021fa8db274879)

2 years ago[lltable] Add per-family lltable getters.
Alexander V. Chernikov [Sun, 26 Dec 2021 12:39:26 +0000 (12:39 +0000)]
[lltable] Add per-family lltable getters.

Introduce a new function, lltable_get(), to retrieve lltable pointer
 for the specified interface and family.
Use it to avoid all-iftable list traversal when adding or deleting
 ARP/ND records.

Differential Revision: https://reviews.freebsd.org/D33660
MFC after: 2 weeks

(cherry picked from commit ff3a85d32411cdd7894f932b1d3d7ce01ec7a648)

2 years agonetstat: fix nhop prepend printing.
Alexander V. Chernikov [Sun, 26 Dec 2021 15:02:06 +0000 (15:02 +0000)]
netstat: fix nhop prepend printing.

If present, print nexthop L2 prepend data in hex.

MFC after: 1 week

(cherry picked from commit 731bfa9f180388e4081b64afb94c357643600238)

2 years agotcp: virtualise net.inet.tcp.msl sysctl.
Alexander V. Chernikov [Sat, 4 Dec 2021 22:02:44 +0000 (22:02 +0000)]
tcp: virtualise net.inet.tcp.msl sysctl.

VNET teardown waits 2*MSL (60 seconds by default) before expiring
 tcp PCBs. These PCBs holds references to nexthops, which, in turn,
 reference ifnets. This chain results in VNET interfaces being destroyed
 and moved to default VNET only after 60 seconds.
Allow tcp_msl to be set in jail by virtualising net.inet.tcp.msl sysctl,
 permitting more predictable VNET tests outcomes.

MFC after: 1 week
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D33270

(cherry picked from commit c2c8e360d8c0b8712158d334686d88f052aef819)

2 years agoBump __FreeBSD_version to 1301501 after LinuxKPI and net80211
Bjoern A. Zeeb [Sun, 27 Mar 2022 20:12:03 +0000 (20:12 +0000)]
Bump __FreeBSD_version to 1301501 after LinuxKPI and net80211
merges in order to help out-of-tree consumers to deal accordingly.

Sponsored by: The FreeBSD Foundation

2 years agoLinuxKPI: 802.11: cleanup debugging
Bjoern A. Zeeb [Thu, 24 Mar 2022 19:09:04 +0000 (19:09 +0000)]
LinuxKPI: 802.11: cleanup debugging

Cleanup some debugging.  Rename the global variable to be less
generic.  Hide all debugging behind #ifdef for now and turn off.
Rename the debugging sysctl so we can start adding more to the
subtree.

There is a need to change that wildly grown infrastructure into
something more homogenic soon but this should do for 13.1.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 9d9ba2b79b3196935431879efd9094eb9bfedd95)

2 years agoLinuxKPI: 802.11: improve hw_scan fallback to sw_scan
Bjoern A. Zeeb [Thu, 24 Mar 2022 17:49:59 +0000 (17:49 +0000)]
LinuxKPI: 802.11: improve hw_scan fallback to sw_scan

Extending what was started in d3ef7fb459ff924911e5276db0c04b13cd8074d9,
when a driver signals that hw_scan is not possible and expects a sw_scan
to be preformed we triggered a sw_scan towards the driver but did not
let net80211 know.
Cancel the initial scan towards net80211.  If we we defer to sw_scan
then clear IEEE80211_FEXT_SCAN_OFFLOAD so net80211 will send probe
requests, and actively start a new scan with net80211.
This may have to be further refined in the future but seems to work
for the moment.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 196cfd0b2eb640a63d007a7e9c3a74e4256255f3)