]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agolibctf: Fix recursive descent into anonymous SOU fields
Mark Johnston [Tue, 12 Apr 2022 19:24:40 +0000 (15:24 -0400)]
libctf: Fix recursive descent into anonymous SOU fields

PR: 262412
Tested by: dhw, gallatin
Fixes: a6fb86917362 ("libctf: Handle CTFv3 containers")
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 6e563a1b608438504d963c2d7c70e50d2e75af46)

2 years agoLinuxKPI: add ALIGN_DOWN()
Bjoern A. Zeeb [Fri, 8 Apr 2022 15:30:19 +0000 (15:30 +0000)]
LinuxKPI: add ALIGN_DOWN()

Add ALIGN_DOWN as rounddown2() along ALIGN() which is implemented as
roundup2().

Sponsored by: The FreeBSD Foundation
Reviewed by: manu, hselasky (now with less ())
Differential Revision: https://reviews.freebsd.org/D34844

(cherry picked from commit 97f2e93a66a804ae9b6187998dbc4427b647e274)

2 years agoLinuxKPI: 802.11: add ieee80211_beacon_get_tim(), ieee80211_sn_sub()
Bjoern A. Zeeb [Fri, 8 Apr 2022 18:33:23 +0000 (18:33 +0000)]
LinuxKPI: 802.11: add ieee80211_beacon_get_tim(), ieee80211_sn_sub()

Add a dummy implementation for ieee80211_beacon_get_tim().
Add the implementation for ieee80211_sn_sub().

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 978f25e840fe4975f243e6077a764842f0e9d3eb)

2 years agoLinuxKPI: 802.11: further fix RSSI calculations
Bjoern A. Zeeb [Fri, 8 Apr 2022 11:00:11 +0000 (11:00 +0000)]
LinuxKPI: 802.11: further fix RSSI calculations

60970a328e280b25b05f1d9a9de1ef91af573c4a did one half of the job
of making rssi relative to nf and numbers for radiotap were fine.
net80211 internally works with .5 dBm units thus we need to apply a
* 2 to the value we pass in to c_rssi;  leave a comment explaining.

Note: it is only ifconfig in user space which re-adjust it for printing
or contrib/wpa for calculations.  Other applications getting values
from kernel also have to apply the maths.

In collaboration with: J.R. Oldroyd (fbsd opal.com)
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 170acccf1e191ae28571845ad6f0b5a2fbf0effc)

2 years agoLinuxKPI: skbuff: handle dev_alloc_skb() correctly
Bjoern A. Zeeb [Thu, 7 Apr 2022 18:06:55 +0000 (18:06 +0000)]
LinuxKPI: skbuff: handle dev_alloc_skb() correctly

dev_alloc_skb() comapred to alloc_skb() reserves some headroom
at the beginning of the skb which is used by drivers.
Split the code for the two cases and reserve NET_SKB_PAD space,
which should at least be 32 octets.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 9df5f29caf1a818999d0e908cab95c83bd1f4323)

2 years agoLinuxKPI: PCI: add counter for linux_dma_map_phys_common() errors
Bjoern A. Zeeb [Wed, 30 Mar 2022 17:38:23 +0000 (17:38 +0000)]
LinuxKPI: PCI: add counter for linux_dma_map_phys_common() errors

LinuxKPI is asking for single-segment mappings.  Some (wireless) drivers
are using this to map multi-pages and our busdma framework is not very
friendly to that as single-segments [D31823].  Add a counter so we can
track when this happens to gather more information.

Sponsored by: The FreeBSD Foundation
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D34715

(cherry picked from commit e86707418c8e84e1ebf8b4c5f35ff641c234d067)

2 years agowpa: Correctly call pcap_next_ex()
Cy Schubert [Thu, 14 Apr 2022 01:45:49 +0000 (18:45 -0700)]
wpa: Correctly call pcap_next_ex()

The second argument to pcap_next_ex() is a pointer to a pointer.
Not a pointer. This fixes a wpa_supplicent SIGSEGV.

PR: 263266
Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
Fixes: 6e5d01124fd4dd57899ddd9260c76dbb43543aa7

(cherry picked from commit 1e0ca65a3bb5798a80eccaae58d863f1f08b9ae8)

2 years agopf: use ERROUT_IOCTL()
Kristof Provost [Wed, 6 Apr 2022 14:45:18 +0000 (16:45 +0200)]
pf: use ERROUT_IOCTL()

Use ERROUT_IOCTL() rather than hand-rolling the macro. This adds DTrace
SDTs in the error path, making debugging ioctl errors easier.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit bef7104571f35eeffc27b25d8857a7940dd23ab8)

2 years agoufs: Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 06:59:14 +0000 (08:59 +0200)]
ufs: Fix a typo in a source code comment

- s/explicitely/explicitly/

(cherry picked from commit d4b3b0c2efd22b508e8c8240a5143cd9eb7b74d2)

2 years agopax(1): Remove a few double words in source code comments
Gordon Bergling [Sat, 9 Apr 2022 12:26:19 +0000 (14:26 +0200)]
pax(1): Remove a few double words in source code comments

- s/an an/an/

(cherry picked from commit ffedb32dd3683ebea41920f9fb61ba5404b50882)

2 years agosym(4): Fix a typo in a source code comment
Gordon Bergling [Fri, 8 Apr 2022 19:04:01 +0000 (21:04 +0200)]
sym(4): Fix a typo in a source code comment

- s/explicitely/explicitly/

(cherry picked from commit 4e27f867331c9db84e9c4cbdac1bbd49927f59d6)

2 years agoal_eth: Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 09:06:18 +0000 (11:06 +0200)]
al_eth: Remove a double word in a source code comment

- s/for for/for/

(cherry picked from commit 6a734168cb819cf2ea781a1e2fd83dc12adb0bd6)

2 years agofsck_ffs(8): Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 12:37:13 +0000 (14:37 +0200)]
fsck_ffs(8): Fix a typo in a source code comment

- s/it it/if it/

(cherry picked from commit 299fcf402dca215057b798286983f82c63a70a25)

2 years agoofed: Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 09:00:48 +0000 (11:00 +0200)]
ofed: Remove a double word in a source code comment

- s/for for/for/

(cherry picked from commit 6de6c9569169a6a58ebd4ce5b4478b383eaa87dc)

2 years agousb: Remove some double words in source code comments
Gordon Bergling [Sat, 9 Apr 2022 08:34:48 +0000 (10:34 +0200)]
usb: Remove some double words in source code comments

- s/for for/for/

(cherry picked from commit 74c6ca6fbf61a7879a91c5d0f68786c22ac8f0db)

2 years agonetgraph(3): Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 12:41:40 +0000 (14:41 +0200)]
netgraph(3): Remove a double word in a source code comment

- s/it it/it/

(cherry picked from commit ecbdfbfd18d963bb8b46bcca115a9243bcf02e27)

2 years agousb(4): Fix two typos in source code comments
Gordon Bergling [Sat, 9 Apr 2022 08:03:48 +0000 (10:03 +0200)]
usb(4): Fix two typos in source code comments

- s/negotation/negotiation/

(cherry picked from commit c8c1c23a8c9d0c4e7816dbe7e6a82673e0abf3ef)

2 years agokern: Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 08:50:04 +0000 (10:50 +0200)]
kern: Remove a double word in a source code comment

- s/for for/for/

(cherry picked from commit c3721292e35bd6aa27c3e444c9a110c458c302e7)

2 years agoqlnxe(4): Fix a typo in a source code comment
Gordon Bergling [Fri, 8 Apr 2022 18:46:27 +0000 (20:46 +0200)]
qlnxe(4): Fix a typo in a source code comment

- s/mulitple/multiple/

(cherry picked from commit 78fc83f096589c7c008fea3c1da7b6d55cb911d7)

2 years agoipnat(5): Fix a double word in the manual page
Gordon Bergling [Fri, 8 Apr 2022 18:49:08 +0000 (20:49 +0200)]
ipnat(5): Fix a double word in the manual page

- s/be be/be/

(cherry picked from commit d7958fe1bc23c0a8ceaa5eca1b73b9480e4807ab)

2 years agocam(4): Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 08:04:33 +0000 (10:04 +0200)]
cam(4): Remove a double word in a source code comment

- s/this this/this/

(cherry picked from commit 456b2bb97e1153ca81a15d51200ebbd1f19a643a)

2 years agonetpfil: Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 06:57:18 +0000 (08:57 +0200)]
netpfil: Fix a typo in a source code comment

- s/maintance/maintenance/

(cherry picked from commit 647baadf3c8a2965c0b0feb6dba344c275fdcbf3)

2 years agolibkern: Fix two typos in source code comments
Gordon Bergling [Sat, 9 Apr 2022 07:36:34 +0000 (09:36 +0200)]
libkern: Fix two typos in source code comments

- s/noticably/noticeably/

(cherry picked from commit d10abf84ad9f508e5e58ec76f90e960eef228b3f)

2 years agoi386: Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 12:30:34 +0000 (14:30 +0200)]
i386: Remove a double word in a source code comment

- s/an an/an/

(cherry picked from commit 9a22f7fb9da3c4e4b028c9008b13c7aa7018aa6e)

2 years agompt(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 12:10:05 +0000 (14:10 +0200)]
mpt(4): Fix a typo in a source code comment

- s/proccessor/processor/

(cherry picked from commit a37c6fcc46caffc15f0f22a7e4afce9192872c1a)

2 years agocxgbe(4): Fix a typo in a source code comment
Gordon Bergling [Fri, 8 Apr 2022 18:58:47 +0000 (20:58 +0200)]
cxgbe(4): Fix a typo in a source code comment

- s/simultaniously/simultaneously/

(cherry picked from commit 8a1b8cf4be90f99e3df776fb93851262263e2e7e)

2 years agobhnd(4): Remove some double words in source code comments
Gordon Bergling [Fri, 8 Apr 2022 18:57:15 +0000 (20:57 +0200)]
bhnd(4): Remove some double words in source code comments

- s/be be/be/
- s/is is/is/

(cherry picked from commit 060f5c02e94fe66b67eaccc12ff875797bc180b7)

2 years agohastd(8): Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 12:05:25 +0000 (14:05 +0200)]
hastd(8): Fix a typo in a source code comment

- s/proccesses/processes/

(cherry picked from commit b95a6ecffab4308ed8f737aaa94e24488a978121)

2 years agousb(4): Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 09:02:23 +0000 (11:02 +0200)]
usb(4): Remove a double word in a source code comment

- s/for for/for/

(cherry picked from commit 2e09a4ac3b48ceb4aaa22e5ca99bad38199a8c71)

2 years agonetpfil: Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 12:20:09 +0000 (14:20 +0200)]
netpfil: Remove a double word in a source code comment

- s/a a/a/

(cherry picked from commit a9f09d75ddff2e417160c05ebc549a96e94221f2)

2 years agotcp_htps: Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 07:01:38 +0000 (09:01 +0200)]
tcp_htps: Fix a typo in a source code comment

- s/postion/position/

(cherry picked from commit 1f2aaef29a17534ae397227c4d54657eef39dd74)

2 years agonvme(4): Fix a typo in a source code comment
Gordon Bergling [Fri, 8 Apr 2022 19:02:19 +0000 (21:02 +0200)]
nvme(4): Fix a typo in a source code comment

- s/is is/is/

(cherry picked from commit dfa01f4f98a1343bf375c54a5cd44718c4211bec)

2 years agoips(4): Remove a double word in a few source code comments
Gordon Bergling [Sat, 9 Apr 2022 08:53:50 +0000 (10:53 +0200)]
ips(4): Remove a double word in a few source code comments

- s/for for/for/

(cherry picked from commit bafe4cee3db4846f443241be9f995d72347c3647)

2 years agoiwm(4): Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 09:04:23 +0000 (11:04 +0200)]
iwm(4): Remove a double word in a source code comment

- s/for for/for/

(cherry picked from commit 586023f10d751837fc8a7e41dfedbce2ed243846)

2 years agoresolver(3): Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 06:51:47 +0000 (08:51 +0200)]
resolver(3): Fix a typo in a source code comment

- s/psuedo/pseudo/

(cherry picked from commit b4ce0ff19a1f0faa92bdb03019badfaa2876f73e)

2 years agosfxge(4): Remove some double words in source code comments
Gordon Bergling [Fri, 8 Apr 2022 19:06:22 +0000 (21:06 +0200)]
sfxge(4): Remove some double words in source code comments

- s/is is/is/

(cherry picked from commit d96159bff8740aac49b1ca650ad092c07d5c8966)

2 years agopowerpc: Fix two typos in source code comments
Gordon Bergling [Sat, 9 Apr 2022 06:54:01 +0000 (08:54 +0200)]
powerpc: Fix two typos in source code comments

- s/mutiplying/multiplying/

(cherry picked from commit f259d24fa5d3341710da5aa785968fd89e5fc3ed)

2 years agoneta: Fix a typo in a source code comment
Gordon Bergling [Fri, 8 Apr 2022 19:01:25 +0000 (21:01 +0200)]
neta: Fix a typo in a source code comment

- s/maintance/maintenance/

(cherry picked from commit 19ae05aad3dadb0963161b948166d7eee19b3fce)

2 years agoiscsi(4): Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 09:01:43 +0000 (11:01 +0200)]
iscsi(4): Remove a double word in a source code comment

- s/for for/for/

(cherry picked from commit 10df4dc7246b97a2069b0b85277fdeff619b248b)

2 years agonet80211(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 06:56:04 +0000 (08:56 +0200)]
net80211(4): Fix a typo in a source code comment

- s/is is/is/

(cherry picked from commit fb5a5026924ca9ba759ef01774615ea98cf587ec)

2 years agodhclient(8): Fix a typo in a source code comment
Gordon Bergling [Fri, 8 Apr 2022 18:50:48 +0000 (20:50 +0200)]
dhclient(8): Fix a typo in a source code comment

- s/explicitely/explicitly/

(cherry picked from commit a06052d623344476c3b28df392a357ea2c1cd7f0)

2 years agostand: Remove a double word in a source code comment
Gordon Bergling [Fri, 8 Apr 2022 18:52:08 +0000 (20:52 +0200)]
stand: Remove a double word in a source code comment

- s/be be/be/

(cherry picked from commit 49f6a83ed8cf6a73b49112b931e73f1b4f120fe0)

2 years agoe1000: Fix a typos in source code comments
Gordon Bergling [Sat, 9 Apr 2022 08:05:32 +0000 (10:05 +0200)]
e1000: Fix a typos in source code comments

- s/negotation/negotiation/

(cherry picked from commit 237a6663332bb7245b0ad168118c255c69d19d10)

2 years agosfxge(4): Remove a double word in a few source code comments
Gordon Bergling [Sat, 9 Apr 2022 08:57:31 +0000 (10:57 +0200)]
sfxge(4): Remove a double word in a few source code comments

- s/for for/for/

(cherry picked from commit db739f1c194869c1f8a6886340e7548266fac831)

2 years agosys: Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 08:58:31 +0000 (10:58 +0200)]
sys: Remove a double word in a source code comment

- s/for for/for/

(cherry picked from commit 97d8c695cfe1eff4c065e7ee362f428f1bf5b9d5)

2 years agoumount(8): Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 08:02:14 +0000 (10:02 +0200)]
umount(8): Remove a double word in a source code comment

- s/this this/this/

(cherry picked from commit efb45ad024c480a6f66605932b3e66cd1002c6e5)

2 years agobhnd(4): Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 12:31:19 +0000 (14:31 +0200)]
bhnd(4): Remove a double word in a source code comment

- s/an an/an/

(cherry picked from commit 75e1650d7fe8b9b15b0df59ab5f71626cc537775)

2 years agorandom(3): Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 06:52:28 +0000 (08:52 +0200)]
random(3): Fix a typo in a source code comment

- s/psuedo/pseudo/

(cherry picked from commit 474df59def1a8ab90354381b0103cbc9556fce12)

2 years agotcp_bbr(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 11:26:20 +0000 (13:26 +0200)]
tcp_bbr(4): Fix a typo in a source code comment

- s/possiblity/possibility/

(cherry picked from commit 2dd0c2bc7f8c2a31223b48d181149b8d17975a67)

2 years agolibipsec: Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 12:08:47 +0000 (14:08 +0200)]
libipsec: Fix a typo in a source code comment

- s/proccessing/processing/

(cherry picked from commit 38dd27d21e6ca83a5afdb20a393ceea55bb34bb3)

2 years agosound(4): Fix a typo in a source code comment
Gordon Bergling [Fri, 8 Apr 2022 19:04:44 +0000 (21:04 +0200)]
sound(4): Fix a typo in a source code comment

- s/Miscellanious/Miscellaneous/

(cherry picked from commit 35fbe62477855c3c2edad0d2b5b23459265806b8)

2 years agoUPDATING: Remove a double word in an entry
Gordon Bergling [Sat, 9 Apr 2022 08:35:37 +0000 (10:35 +0200)]
UPDATING: Remove a double word in an entry

- s/for for/for/

(cherry picked from commit 75fccd670caf3b3c365de6968cdcfbd1a1e8a14b)

2 years agoeventhandler: Remove a double world in two comments
Gordon Bergling [Sat, 9 Apr 2022 06:58:18 +0000 (08:58 +0200)]
eventhandler: Remove a double world in two comments

- s/be be/be/

(cherry picked from commit e0bdc8c515efd0a586a41cfce9e5615579f91f1f)

2 years agotcp_bbr(4): Fix two typos in source code comments
Gordon Bergling [Sat, 9 Apr 2022 07:03:29 +0000 (09:03 +0200)]
tcp_bbr(4): Fix two typos in source code comments

- s/postive/positive/
- s/postion/position/

(cherry picked from commit 665709016d5e280ca7497958b25f341302e7fb25)

2 years agoNOTES: Remove a double word in comments
Gordon Bergling [Sat, 9 Apr 2022 08:31:49 +0000 (10:31 +0200)]
NOTES: Remove a double word in comments

- s/for for/for/

(cherry picked from commit efd0fdfe289cde91ee612efb083673036d8b01d4)

2 years agolibalias(3): Fix two typos in source code comments
Gordon Bergling [Sat, 9 Apr 2022 06:54:56 +0000 (08:54 +0200)]
libalias(3): Fix two typos in source code comments

- s/modfied/modified/

(cherry picked from commit 1cfd924f4e7ca3dc742905aaf5d828a21ad88191)

2 years agoice: Remove a double word in a source code comment
Gordon Bergling [Fri, 8 Apr 2022 19:00:23 +0000 (21:00 +0200)]
ice: Remove a double word in a source code comment

- s/is is/is/

(cherry picked from commit 8ece7189e0ad5aed326d5ece289a81d31a700abe)

2 years agonetgraph(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 09:40:14 +0000 (11:40 +0200)]
netgraph(4): Fix a typo in a source code comment

- s/peform/perform/

(cherry picked from commit 77a44875e59b239c696cca17b4cc946105ade612)

2 years agogetenv(3): Fix two typos in source code comments
Gordon Bergling [Sat, 9 Apr 2022 09:36:48 +0000 (11:36 +0200)]
getenv(3): Fix two typos in source code comments

- s/peform/perform/

(cherry picked from commit 8dcf5860b369559ba176f5dc0d7ed278f8aecf38)

2 years agoath(4): Remove a double word in a few source code comments
Gordon Bergling [Sat, 9 Apr 2022 08:55:00 +0000 (10:55 +0200)]
ath(4): Remove a double word in a few source code comments

- s/for for/for/

(cherry picked from commit 6cff32b3c47ead614311e07e2ef7f91948c61307)

2 years agoce(4): Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 09:05:38 +0000 (11:05 +0200)]
ce(4): Remove a double word in a source code comment

- s/for for/for/

(cherry picked from commit 5f93395f2f2fc56702674d2869d5016216368485)

2 years agokern: Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 06:53:17 +0000 (08:53 +0200)]
kern: Fix a typo in a source code comment

- s/is is/is/

(cherry picked from commit 768f9b8b8bf7ca2f0b45bf6d7fde1a38f800c68d)

2 years agotcp_rack: Fix a typo in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 11:25:50 +0000 (13:25 +0200)]
tcp_rack: Fix a typo in a source code comment

- s/possiblity/possibility/

(cherry picked from commit addb2c6585b8e307eef18de560dd10764e465bf4)

2 years agojail: Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 12:19:17 +0000 (14:19 +0200)]
jail: Remove a double word in a source code comment

- s/a a/a/

(cherry picked from commit f171938cd6ed8d21135af856dbe4a8091e4a292c)

2 years agoena(4): Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 08:50:49 +0000 (10:50 +0200)]
ena(4): Remove a double word in a source code comment

- s/for for/for/

(cherry picked from commit 609e6f6d285e661277cb3a365e38640296471478)

2 years agofstyp(8): Fix a typo in a source code comment
Gordon Bergling [Fri, 8 Apr 2022 18:53:45 +0000 (20:53 +0200)]
fstyp(8): Fix a typo in a source code comment

- s/Miscellanious/Miscellaneous/

(cherry picked from commit c254580cc2616ca7049a9afb06382025d4d21300)

2 years agomath(3): Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 08:01:10 +0000 (10:01 +0200)]
math(3): Remove a double word in a source code comment

- s/is is/is/

(cherry picked from commit 29fea59e78272940e3e6054e749d697bef362312)

2 years agorouted(8): Remove a double word in a source code comment
Gordon Bergling [Sat, 9 Apr 2022 12:36:20 +0000 (14:36 +0200)]
routed(8): Remove a double word in a source code comment

- s/it it/it/

(cherry picked from commit 009727ed5777549e02b408fa7983902ba6cfa2f6)

2 years agotcp_bbr(4): Fix a typo in a sysctl description and a comment
Gordon Bergling [Fri, 8 Apr 2022 18:46:52 +0000 (20:46 +0200)]
tcp_bbr(4): Fix a typo in a sysctl description and a comment

- s/postive/positive/

(cherry picked from commit 4d6883cbe2fa6182698662880ba75475fda1ac36)

2 years agotcp_rack: Fix a few typos in sysctl descriptions and comments
Gordon Bergling [Sat, 9 Apr 2022 07:04:59 +0000 (09:04 +0200)]
tcp_rack: Fix a few typos in sysctl descriptions and comments

- s/postion/position/
- s/postions/positions/
- s/repostion/reposition/

(cherry picked from commit 36814092d48a0c4220dc9c979882932e6313e618)

2 years agochroot.2: Correct grammar errors.
Greg Lehey [Thu, 31 Mar 2022 02:05:49 +0000 (13:05 +1100)]
chroot.2: Correct grammar errors.
  No functional change.

MFC after: 1 week

(cherry picked from commit 4044083079ea55097284adeed98a58067c737b98)

2 years agoAdd devices and quirks for some Olympus cameras.
Greg Lehey [Wed, 23 Mar 2022 01:40:28 +0000 (12:40 +1100)]
Add devices and quirks for some Olympus cameras.

Reviewed by: hps@
Fixes:     Problems attaching Olympus cameras.

(cherry picked from commit 31e076d70b5fc06e9cd9ecfe19296d4fe6a8a5a5)

2 years agomount.8: mention that the snapshot option is exclusive
Robert Wing [Thu, 17 Mar 2022 22:31:16 +0000 (14:31 -0800)]
mount.8: mention that the snapshot option is exclusive

When using the snapshot option, all other options are ignored. This
update reflects changes made in ab2dbd9b871d.

Reviewed by: 0mp, mckusick
Differential Revision: https://reviews.freebsd.org/D34584

(cherry picked from commit 8772a9117b27f551f6fbaae9413acaa30d99f934)

2 years agoffs_mount(): fix snapshotting
Robert Wing [Thu, 17 Mar 2022 01:27:34 +0000 (17:27 -0800)]
ffs_mount(): fix snapshotting

Commit 0455cc7104ec broke snapshotting for ffs. In that commit,
ffs_mount() was changed so the namei() lookup for a disk device happens
before ffs_snapshot(). This caused the issue where namei() would lookup
the snapshot file and fail because the file doesn't exist. Even if it did
exist, taking a snapshot would still fail since it's not a disk device.

Fix this by taking a snapshot of the filesystem as-is and return without
altering ro/rw or any other attributes that are passed in.

Reported by:    pho
Reviewed by: mckusick
Fixes: 0455cc7104ec ("ffs_mount(): return early if namei() fails to lookup disk device")
Differential Revision: https://reviews.freebsd.org/D34562

(cherry picked from commit ab2dbd9b871dd00afc6ad78acb386ffa48b6b053)

2 years agoffs_mount(): return early if namei() fails to lookup disk device
Robert Wing [Mon, 7 Mar 2022 19:18:03 +0000 (10:18 -0900)]
ffs_mount(): return early if namei() fails to lookup disk device

With soft updates enabled, an INVARIANTS panic is hit in ffs_unmount().

The problem occurs in ffs_mount() when upgrading a mount from ro->rw.
During a mount update, the soft update code gets set up but doesn't get
cleaned up if namei() fails when looking up the disk device.

Avoid this scenario by looking up the disk device first and bail early
if the namei() lookup fails.

PR:             256511
Reviewed by: mckusick, kib
Differential Revision: https://reviews.freebsd.org/D30870

(cherry picked from commit 0455cc7104ec8e8dd54b3f44049112a5a8ca329c)

2 years agosh: fix autocompletion for commands that share name with a directory
Piotr Pawel Stefaniak [Sat, 12 Mar 2022 11:08:05 +0000 (12:08 +0100)]
sh: fix autocompletion for commands that share name with a directory

(cherry picked from commit 68700941c7ad58d6fa8eda82f3f370d87670fa6a)

2 years agonfsd: Do not exempt NFSv3 Fsinfo from the TLS check
Rick Macklem [Thu, 10 Mar 2022 00:52:42 +0000 (16:52 -0800)]
nfsd: Do not exempt NFSv3 Fsinfo from the TLS check

The Fsinfo RPC is exempt from the check for
Kerberized NFS being required, as recommended
by RFC2623.  However, there is no reason to
exempt Fsinfo from the requirement to use TLS.

This patch fixes the code so that the exemption
only applies to Kerberized NFS and not
NFS-over-TLS.

This only affects NFS-over-TLS for an NFSv3
mount when it is required, but the client does
not do so.

(cherry picked from commit 3fc3fe90915f02e25b4f1d5070e8e01e465e873d)

2 years agouma: Don't allow a limit to be set in a warm zone
Mark Johnston [Wed, 30 Mar 2022 19:42:18 +0000 (15:42 -0400)]
uma: Don't allow a limit to be set in a warm zone

The limit accounting in UMA does not tolerate this.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit d53927b0bae45bf5b4b206b2dddf37bab319a1b3)

2 years agoifconfig.8: Document that -k can be used with -a
Mateusz Piotrowski [Tue, 29 Mar 2022 17:37:01 +0000 (19:37 +0200)]
ifconfig.8: Document that -k can be used with -a

MFC after: 2 weeks

(cherry picked from commit b710d4c85acbb74ed2ac0be9b315bba23139a4c2)

2 years agoifconfig.8: Improve -f synopsis
Mateusz Piotrowski [Tue, 29 Mar 2022 17:32:32 +0000 (19:32 +0200)]
ifconfig.8: Improve -f synopsis

- There is no need to mention in the synopsis that -f can be a list of
  comma-separated type:format pairs. Let's keep it simple instead.
- Mention that -f can be supplied multiple times.
- Add -f to other entries in the synopsis where it can be used.

MFC after: 2 weeks

(cherry picked from commit 52ec8807d8b3a59b7497a3aa94952c7ad4b162bd)

2 years agoifconfig.8: Document the synopsis of -C
Mateusz Piotrowski [Tue, 29 Mar 2022 17:16:07 +0000 (19:16 +0200)]
ifconfig.8: Document the synopsis of -C

As documented, the -C flag can only be used on its own. Any other
command modifiers and flags are ignored when -C is used. Reflect that in
synopsis.

MFC after: 2 weeks

(cherry picked from commit efb4f7fd09eb54e231c819888a65a8c596a36afc)

2 years agoifconfig.8: Show that -g groupname can be used on its own
Mateusz Piotrowski [Tue, 29 Mar 2022 17:14:20 +0000 (19:14 +0200)]
ifconfig.8: Show that -g groupname can be used on its own

MFC after: 2 weeks

(cherry picked from commit a9475cb38954937839debc29210cf75a258bab3b)

2 years agoifconfig.8: Cluster together short flags
Mateusz Piotrowski [Tue, 29 Mar 2022 17:12:50 +0000 (19:12 +0200)]
ifconfig.8: Cluster together short flags

MFC after: 2 weeks

(cherry picked from commit 2e053399fc3dd8464ee8761e35f1dc5100413fb2)

2 years agoifconfig.8: Add capability codes descriptions from handbook
Mateusz Piotrowski [Tue, 29 Mar 2022 11:11:46 +0000 (13:11 +0200)]
ifconfig.8: Add capability codes descriptions from handbook

We document capability codes (the CAPS field of "ifconfig wlan0 scan")
in both ifconfig(8) and the handbook. The list is more complete in the
manual page, while the descriptions of individual capabilities are more
detailed in the handbook.

In order to reduce content duplication and bit rot, let's move
handbook's details to the manual page and reference the manual page
whenever necessary.

Reviewed by: debdrup
Reviewed by: Pau Amma
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D34662

(cherry picked from commit 05621e0b2094d566aa39b82d01b4a6902a1b22b7)

2 years agox86/xen: fallback when VCPUOP_send_nmi is not available
Roger Pau Monné [Thu, 13 Jan 2022 13:48:14 +0000 (14:48 +0100)]
x86/xen: fallback when VCPUOP_send_nmi is not available

It has been reported that on some AWS instances VCPUOP_send_nmi
returns -38 (ENOSYS). The hypercall is only available for HVM guests
in Xen 4.7 and newer. Add a fallback to use the native NMI sending
procedure when VCPUOP_send_nmi is not available, so that the NMI is
not lost.

Reported and Tested by: avg
Fixes: b2802351c162 ('xen: fix dispatching of NMIs')
Sponsored by: Citrix Systems R&D
(cherry picked from commit ad15eeeaba30cdf10036b7869d27441cfc9f0674)

2 years agoxen/blkback: fix reconnection of backend
Roger Pau Monné [Tue, 11 May 2021 10:19:29 +0000 (12:19 +0200)]
xen/blkback: fix reconnection of backend

The hotplug script will be executed only once for each backend,
regardless of the frontend triggering reconnections. Fix blkback to
deal with the hotplug script being executed only once, so that
reconnections don't stall waiting for a hotplug script execution
that will never happen.

As a result of the fix move the initialization of dev_mode, dev_type
and dev_name to the watch callback, as they should be set only once
the first time the backend connects.

This fix is specially relevant for guests wanting to use UEFI OVMF
firmware, because OVMF will use Xen PV block devices and disconnect
afterwards, thus allowing them to be used by the guest OS. Without
this change the guest OS will stall waiting for the block backed to
attach.

Fixes: de0bad00010c ('blkback: add support for hotplug scripts')
Sponsored by: Citrix Systems R&D
(cherry picked from commit 4772e86beb089ee08a3bff8ad359e83a4c623238)

2 years agoxen/netback: do not attempt to connect in the Initialised state
Roger Pau Monné [Tue, 16 Mar 2021 11:43:49 +0000 (12:43 +0100)]
xen/netback: do not attempt to connect in the Initialised state

Only attempt to fetch the configuration data and connect the shared
ring once the frontend has switched to the 'Connected' state. This
seems to be inline with what Linux netback does, and is required to
make newer versions of NetBSD netfront work, since NetBSD only
publishes the required configuration before switching to the Connected
state.

Sponsored by: Citrix Systems R&D
(cherry picked from commit 4489124c04727a4aad418eec3148e0c8de23ff4d)

2 years agoRevert "mii: include missing sources in loadable module"
Mitchell Horne [Mon, 11 Apr 2022 17:54:13 +0000 (14:54 -0300)]
Revert "mii: include missing sources in loadable module"

This reverts commit b9ec0b7e86ac01d3c8634d5b3a7658b5d9d34267. It breaks
the build.

Reported by: Jenkins, kp

2 years agolibpfctl: relocate implementations of pfr_add/get/set_addrs
Reid Linnemann [Mon, 4 Apr 2022 14:43:38 +0000 (16:43 +0200)]
libpfctl: relocate implementations of pfr_add/get/set_addrs

Reviewed by: kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34740

(cherry picked from commit 4823489ab61dbaef4405cf03d2a48e77e593ce9c)

2 years agopfsync: Add CTLFLAG_VNET to carp_demotion_factor sysctl
Luiz Amaral [Sat, 2 Apr 2022 10:09:06 +0000 (12:09 +0200)]
pfsync: Add CTLFLAG_VNET to carp_demotion_factor sysctl

When trying to avoid a CARP demotion during a pfsync service restart, I
noticed that a non-default value for the net.pfsync.carp_demotion_factor
sysctl was not being applied during the demotion. The CARP was always
demoted by 240.

After investigating, I realized that the sysctl was using VNET_NAME()
without the CTLFLAG_VNET.

PR: 262983
Reviewed by: kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34737

(cherry picked from commit 654c1b8ef3c0fcbad3a77ea2a6f35c0dffc86e88)

2 years agoriscv: eliminate physmap global
Mitchell Horne [Thu, 7 Apr 2022 15:13:19 +0000 (12:13 -0300)]
riscv: eliminate physmap global

Since physical memory management is now handled by subr_physmem.c, the
need to keep this global array has diminished. It is not referenced
outside of early boot-time, and is populated by physmem_avail() in
pmap_bootstrap(). Just allocate the array on the stack for the duration
of its lifetime.

The check against physmap[0] in initriscv() can be dropped altogether,
as there is no consequence for excluding a memory range twice.

Reviewed by: markj
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34778

(cherry picked from commit 8a0339e679aada927966be10f897891b447edb0b)

2 years agosavecore: include '-u' flag in usage message
Mitchell Horne [Tue, 5 Apr 2022 19:20:42 +0000 (16:20 -0300)]
savecore: include '-u' flag in usage message

Reported by: Pau Amma <pauamma@gundo.com>
Fixes bc7ed46b635e ("Add '-u' switch that would...")
MFC after: 3 days

(cherry picked from commit 173fc6f4562ecb4228653328d578d427d99dd54a)

2 years agomem(4): Improve ioctl section formatting
Mitchell Horne [Thu, 24 Feb 2022 16:15:17 +0000 (12:15 -0400)]
mem(4): Improve ioctl section formatting

Add the missing .El which fixes the indentation of the memory range
definitions and operation. Add subsection headings to further clarify
this section. Do the same for the RETURN VALUES section, and mention
explicitly that MEM_EXTRACT_PADDR always returns zero.

Reviewed by: markj, 0mp, Pau Amma <pauamma@gundo.com>
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D34574

(cherry picked from commit 071b78ce8fecd874c9aaa329467399c7b500c2e8)

2 years agomii: include missing sources in loadable module
Milan Obuch [Sat, 2 Apr 2022 18:28:33 +0000 (15:28 -0300)]
mii: include missing sources in loadable module

As of today, using 'kldload miibus' is not equivalent to using 'device
miibus' in a kernel config. Newly introduced PHY drivers (DP83822,
DP83867, VSCPHY) and source files/PHY driver for FDT-enabled kernels
are missing. Without including them, kernel modules using any function
from dev/mii/mii_fdt.c refuse to load. Additionally, miivar.h directly
includes opt_platform.h.

Add the missing sources to the module build, with the FDT-only files
gated behind an OPT_FDT check. Maintain the alphabetical listing of
SRCS, but move the required header files to a separate line to improve
readability.

Reviewed by: mhorne, mindal@semihalf.com
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34256

(cherry picked from commit 517ea731d4e803450537e9369d6a16aa4081acd7)

2 years agocgem: Support building as a loadable kernel module
Milan Obuch [Sat, 2 Apr 2022 16:53:37 +0000 (13:53 -0300)]
cgem: Support building as a loadable kernel module

For development, building a driver as kernel module is both convenient
and a time saver (no need for reboot on some change, testing it requires
just kldunload and kldload, a matter of seconds). For some special
cases, it may be even desirable to postpone initializing the network
interface after some action is done (loading a FPGA bitstream may be
required for Zynq/ZynqMP based hardware as an example).

Building is limited to ARM, ARM64 and RISC-V architectures (for Zynq,
ZynqMP, PolarFire Soc based boards, and HiFive based boards are known to
use CGEM at the moment).

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34687

(cherry picked from commit 242cd60a0a670ff7cc446436bedd129fbdce062c)

2 years agolibc: Check for readdir(2) errors in fts(3)
Ganael LAPLANCHE [Mon, 28 Mar 2022 14:54:02 +0000 (10:54 -0400)]
libc: Check for readdir(2) errors in fts(3)

Previously, such errors were not distinguished from the end-of-directory
condition.

With improvements from Mahmoud Abumandour <ma.mandourr@gmail.com>.

Reviewed by: markj
PR: 262038

(cherry picked from commit 0cff70ca66547ca5b04030ef07e6a0b9759a0184)

2 years agoaudit: Initialize vattr fields before calling VOP_GETATTR
Mark Johnston [Sun, 20 Mar 2022 01:59:13 +0000 (21:59 -0400)]
audit: Initialize vattr fields before calling VOP_GETATTR

Some filesystems do not fill out certain optional vattr fields.  To
ensure that they do not get copied out to userspace uninitialized, use
VATTR_NULL to provide default values.

Reported by: KMSAN
Sponsored by: The FreeBSD Foundation

(cherry picked from commit ecd764b0ea7a1b7fb5f1e6632f8d8db9233f06ea)

2 years agonet: Fix LLE lock leaks
Mark Johnston [Fri, 8 Apr 2022 15:46:19 +0000 (11:46 -0400)]
net: Fix LLE lock leaks

Historically, lltable_try_set_entry_addr() would release the LLE lock
upon failure.  After some refactoring, it no longer does so, but
consumers were not adjusted accordingly.

Also fix a leak that can occur if lltable_calc_llheader() fails in the
ARP code, but I suspect that such a failure can only occur due to a code
bug.

Reviewed by: bz, melifaro
Reported by: pho
Fixes: 0b79b007ebfc ("[lltable] Restructure nd6 code.")
Sponsored by: The FreeBSD Foundation

(cherry picked from commit dd91d8448665dd31df5be7341756394293c6e36c)

2 years agoi386: Fix the nodevice apic build
Mark Johnston [Fri, 8 Apr 2022 15:47:52 +0000 (11:47 -0400)]
i386: Fix the nodevice apic build

PR: 263124
Fixes: 62d09b46ad75 ("x86: Defer LAPIC calibration until after timecounters are available")
Reviewed by: kib, jhb, emaste
Sponsored by: The FreeBSD Foundation

(cherry picked from commit aa597d4049ffee69d413ea2154f4b312ffbaf646)

2 years agovidcontrol: disable p, P, and H when vt(4) is in use
Ed Maste [Wed, 6 Apr 2022 23:39:19 +0000 (19:39 -0400)]
vidcontrol: disable p, P, and H when vt(4) is in use

These options use the CONS_SCRSHOT ioctl to capture the contents of the
current console, which is not yet supported by vt(4).  Disable the
options when vt(4) is in use rather than emitting a possibly confusing
error message.

This change should be reverted if CONS_SCRSHOT is implemented for vt(4).

PR: 263099
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

(cherry picked from commit c71ae91f1976746b380a8aada8676d7ae084fdc5)
(cherry picked from commit 1f4442f71fa33a8ef6d3da808e32872fb23a5700)