Commit Graph

145256 Commits

Author SHA1 Message Date
Gordon Bergling
816d5c1e98 isci(4): Fix common typos in source code comments
- s/assinged/assigned/

MFC after:	3 days
2022-11-01 08:34:11 +01:00
Gordon Bergling
34fcce0087 xilinx: Fix a typo in a source code comment
- s/interrut/interrupt/

MFC after:	3 days
2022-11-01 08:00:53 +01:00
Gordon Bergling
5014dc958f isci(4): Fix a typo in a source code comment
- s/interrutp/interrupt/

MFC after:3 days
2022-11-01 07:58:26 +01:00
Gordon Bergling
e902e62644 bxe(4): Fix a typo in a source code comment
- s/interrutps/interrupts/

MFC after:	3 days
2022-11-01 07:55:55 +01:00
Mark Johnston
60013d9c50 dtrace: Fix the i386 FBT build
Reported by:	Jenkins
Fixes:	0e69c95915 ("dtrace: Fix up %rip for invop probes on x86")
2022-11-01 00:17:48 -04:00
Bjoern A. Zeeb
e7fe037310 LinuxKPI: 802.11: pass internal variable to lkpi_80211_mo_sta_state()
With mac80211 operations (MO) tracing on we have seen some ill-ordered
executions of MO functions.  In order to limit visibility of the mac80211
sta, pass the internal version into lkpi_80211_mo_sta_state() and only
there convert to the argument needed.  This mostly eases tracing and
debugging.

Sposnored by:	The FreeBSD Foundation
MFC after:	3 days
2022-11-01 00:00:18 +00:00
Mark Johnston
0e69c95915 dtrace: Fix up %rip for invop probes on x86
When a breakpoint exception is raised, the saved value of %rip points to
the instruction following the breakpoint.  However, when fetching the
value of %rip using regs[], it's more natural to provide the address of
the breakpoint itself, so modify the kinst and fbt providers accordingly.

Reported by:	khng
Reviewed by:	christos, khng
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D37218
2022-10-31 19:11:36 -04:00
Bjoern A. Zeeb
05e640dc9e LinuxKPI: 802.11: update struct member types
Update struct member types for ongoing work towards HT support.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-10-31 22:24:08 +00:00
Bjoern A. Zeeb
1d70218e9e LinuxKPI: 802.11 update header files
Adjust struct members, add more (for HE dummy) defines, add more
(wrapper) functions in order to acoomodate another driver.

MFC after:	3 days
2022-10-31 22:09:25 +00:00
Kristof Provost
444a77ca85 pf: expose syncookie active/inactive status
When syncookies are in adaptive mode they may be active or inactive.
Expose this status to users.

Suggested by:	Guido van Rooij
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-10-31 18:14:09 +01:00
Alexander V. Chernikov
728ca8506d netlink: fix CTRL_CMD_GETFAMILY lookup/dumps.
Reported by:	bapt
2022-10-31 17:12:42 +00:00
Gleb Smirnoff
c348e88053 tcp: make tcp_handle_wakeup() static and robust
It is called only from tcp_input() and always has valid parameter.

Reviewed by:		rscheff, tuexen
Differential revision:	https://reviews.freebsd.org/D37115
2022-10-31 08:57:15 -07:00
Gleb Smirnoff
19acc50667 inpcb: retire suppresion of randomization of ephemeral ports
The suppresion was added in 5f311da2cc with no explanation in the
commit message of the exact problem that was fixed. In the BSDCan
2006 talk [1], slides 12 to 14, we can find that it seems that there
was some problem with the TIME_WAIT state not properly being handled
on the remote side (also FreeBSD!), and this switching off the
suppression had hidden the problem.  The rationale of the change was
that other stacks may also be buggy wrt the TIME_WAIT.

I did not find the actual problem in TIME_WAIT that the suppression
has hidden, neither a commit that would fix it.  However, since that
time we started to handle SYNs with RFC5961 instead of RFC793, see
3220a2121c.  We also now have the tcp-testsuite [2], that has full
coverage of all possible scenarios of receiving SYN in TIME_WAIT.

This effectively reverts 5f311da2cc
and 6ee79c59d2.

[1] https://www.bsdcan.org/2006/papers/ImprovingTCPIP.pdf
[2] https://github.com/freebsd-net/tcp-testsuite

Reviewed by:		rscheff
Discussed with:		rscheff, rrs, tuexen
Differential revision:	https://reviews.freebsd.org/D37042
2022-10-31 08:57:11 -07:00
Gleb Smirnoff
65a58d6390 icmp: doesn't need tcp_var.h 2022-10-31 08:44:55 -07:00
Gleb Smirnoff
f504685a7a rack/bbr: put back assertion that connection is not in TIME-WAIT
The assertion was incorrectly removed in 0d7445193a.  The leak of
a TIME-WAIT state into tfb_do_segment_nounlock method was fixed in
31bc602ff8.  The TIME-WAIT connections are processed by the main
tcp_input() always.
2022-10-31 08:30:59 -07:00
Alexander V. Chernikov
830352ccca netlink: fix genetlink CTRL_ATTR_MCAST_GRP_MAX define.
Reported by:	harti
2022-10-31 15:03:27 +00:00
Alexander V. Chernikov
03de61aabb netlink: fix NLMSG_SPACE() macro.
Reported by:	bapt
2022-10-31 15:02:12 +00:00
Alexander V. Chernikov
fc47afbfaf netlink: fix generic netlink privilege check.
Reported by:	bapt
2022-10-31 13:40:25 +00:00
Kristof Provost
23559c9d0d netgraph/ng_bridge: add missing array terminator
PR:		267457
Reported by:	Robert Morris <rtm@lcs.mit.edu>
MFC after:	1 week
2022-10-31 09:47:01 +01:00
Justin Hibbits
e85414931a dtrace: Load fasttrap on powerpc with dtraceall
This was missing from the original port of DTrace to powerpc 10 years
ago.

MFC after:	3 weeks
2022-10-30 16:00:56 -04:00
Justin Hibbits
fe4a5593b3 dtrace: Add pid provider to the build for powerpc
The fasttrap pid provider has been in place for a long time, but stopped
getting built by efe88d92da in preparation for 64-bit atomics.  32-bit
emulation of 64-bit atomics was added in 9aafc7c05.

MFC after:	3 weeks
2022-10-30 16:00:56 -04:00
Justin Hibbits
ec9388ddba dtrace: Make pid provider work on trivial tests
'newpc' needs set in the "common" case.  With this, the trivial test

 $ dtrace -n 'pid$target:libc:strlen:entry { trace(timestamp); }' -p
 <pid>

now works.

MFC after:	3 weeks
2022-10-30 16:00:44 -04:00
Bjoern A. Zeeb
cca40d7cc7 LinuxKPI: add timekeeping.h, another dummy (empty) header file
The file is included by a driver but it seems we don't need to implement
anything here.

MFC after:	3 days
2022-10-30 17:35:24 +00:00
Doug Moore
a2c57c60d9 iommu_gas: drop fini cleanup loop
Assertions suggest that the loop in iommu_gas_fini_domain is executed
zero times, so remove it.

Reviewed by:	alc, kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D37204
2022-10-29 12:56:06 -05:00
Warner Losh
010175a76d modules: Add missing opt_*.h files for stand-alone compile
Standalone compile that we at least create these opt_*.h files.

Sponsored by:		Netflix
2022-10-29 10:18:06 -06:00
Warner Losh
50a3621836 modules: Remove duplicate opt_global.h target
The default one does the right thing these days.

Sponsored by:		Netflix
2022-10-29 10:18:06 -06:00
Warner Losh
f7026fbbb2 sys/modules: MODULES_OVERRIDE takes precedence over EXTRA_MODULES and WITHOUT_MODULES
MODULES_OVERRIDE has traditionally taken precedence over EXTRA_MODULES
and WITHOUT_MODULES as the exact list of modules to build. Over time,
things have been added that has broken this. Move the .endif that makes
this the case to the right place. The so called 'ALL_MODULES' option is
the only thing with higher precedence, but it's not quite all the
options anymore (though it is much more of them, and doesn't quite
work on !x86).

Sponsored by:		Netflix
2022-10-29 10:17:40 -06:00
Warner Losh
25b1b63dba dtb: Be much less verbose in the building of dtb
Make the dtb/dtbo files with less noise. Remove echo statements, but add
back the call for the non-meta builds to replace the removed noise.

Suggetions by:		jrtc27
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D37073
2022-10-29 10:13:54 -06:00
Mitchell Horne
f396f9b6c9 linux, linux64: fix module load
The previous commit added references to to the syscallnames arrays, but
failed to add the relevant source files to the module build. Thus, the
modules failed to load due to missing symbols.

Reported by:	cy
Fixes:	1da65dcb1c ("linux: populate sv_syscallnames in each sysentvec")
Sponsored by:	The FreeBSD Foundation
2022-10-29 13:11:24 -03:00
Mitchell Horne
3317848808 linux, linux64: improve SRCS formatting
Sort the entries alphabetically, and list them with one entry per line.
This makes the diffs much cleaner when adding or removing a new entry,
as I will do in the next commit.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-10-29 13:11:24 -03:00
Mark Johnston
1f6b6cf177 atomic: Intercept atomic_(load|store)_bool for kernel sanitizers
Fixes:		2bed73739a ("atomic: Add plain atomic_load/store_bool()")
2022-10-29 11:10:58 -04:00
Mike Karels
234c1463a7 genet: add another case where headers need pullup
Wake On LAN packets sent by wake(8) via BPF are lost if txcsum is
enabled.  These fall into the "other protocol" case where gen_parse_tx
did nothing.  Add code to shift up to gen_tx_hdr_min bytes of the
packet along with the Ethernet header in this case.
2022-10-29 07:52:57 -05:00
Konstantin Belousov
6b69465efb vfs_domount(): ensure that v_mountedhere and VIRF_MOUNTPOINT are set under the vnode lock
Fixes:	f7833196bd
Reported and tested by:	pho
Reviewed by:	jah, markj (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D37198
2022-10-29 14:29:55 +03:00
Doug Moore
8b221ca631 iommu_gas: start space search from 1st free space
Maintain a pointer to an element in the domain map that is left of any
sufficiently large free gap in the tree and start the search for free
space there, rather than at the root of the tree. On find_space, move
that pointer to the leftmost leaf in the subtree of nodes with
free_down greater than or equal to the minimum allocation size before
starting the search for space from that pointer. On removal of a node
with address less than that pointer, update that pointer to point to
the predecessor or successor of the removed node.

In experiments with netperf streaming, this reduces by about 40% the
number of map entries examined in first-fit allocation.

Reviewed by:	alc, kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D36624
2022-10-29 00:50:44 -05:00
Mitchell Horne
aba921bd9e ddb: print the actual syscall name
Some architectures will pretty-print a system call trap in the
backtrace. Rather than printing the symbol, use the syscallname()
function to pull the string from the sv_syscallnames array corresponding
to the process. This simplifies the function somewhat.

Mostly, this will result in dropping the "sys" prefix, e.g. "sys_exit"
will now be printed simply as "exit".

Make two minor tweaks to the function signature: use a u_int for the
syscall number since this is a more correct type (see the 'code' member
of struct syscall_args), and make the thread pointer the first argument.
The latter is more natural and conventional.

Suggested by:   jrtc27
Reviewed by:	jrtc27, markj, jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37200
2022-10-28 18:21:08 -03:00
Mitchell Horne
1da65dcb1c linux: populate sv_syscallnames in each sysentvec
This allows the syscallname() function to give a usable result for Linux
ABIs.

Reported by:	jrtc27
Reviewed by:	jrtc27, markj, jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37199
2022-10-28 18:21:08 -03:00
Andrew Turner
fe36346a89 Disable Hyper-V on arm64
It unconditionally calls into the Hyper-V firmware. As most arm64
boards don't have said firmware disable it for now.
2022-10-28 22:17:00 +01:00
Andrew Turner
16c10e99b8 Remove the hyperv option from std.dev
It's already in std.hyperv and we don't need to repeat it here.
2022-10-28 22:17:00 +01:00
John Baldwin
854d066251 wg: Trim compat shims for versions older than current stable/13.
Reviewed by:	kevans, markj, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36913
2022-10-28 13:36:13 -07:00
John Baldwin
c640d1af2c wg: Retire now unused support.h.
Reviewed by:	kevans, markj, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36912
2022-10-28 13:36:13 -07:00
John Baldwin
dcf581bb49 wg: Use zfree.
Reviewed by:	kevans, markj, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36911
2022-10-28 13:36:13 -07:00
John Baldwin
e32e1a160e wg: Use atomic(9) instead of concurrency-kit atomics.
Kernel sanitizers only support atomic(9) operations.

Reviewed by:	kevans, markj, emaste
Reported by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36910
2022-10-28 13:36:13 -07:00
John Baldwin
744bfb2131 Import the WireGuard driver from zx2c4.com.
This commit brings back the driver from FreeBSD commit
f187d6dfbf plus subsequent fixes from
upstream.

Relative to upstream this commit includes a few other small fixes such
as additional INET and INET6 #ifdef's, #include cleanups, and updates
for recent API changes in main.

Reviewed by:	pauamma, gbe, kevans, emaste
Obtained from:	git@git.zx2c4.com:wireguard-freebsd @ 3cc22b2
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36909
2022-10-28 13:36:12 -07:00
Warner Losh
31bfa27894 sys/modules: Catchup to armv[45] being removed
Now that armv[45] are removed, simplify some tests for armv[67] that are
now either always true, or always true when we're on arm.

Sponsored by:		Netflix
2022-10-28 14:11:04 -06:00
Warner Losh
c8a63d71fe sys/modules: Delete now empty if
Ah, the joys of pushing a commit with a dirty editor buffer that all the
checks in git didn't catch... Also, my eyeballs missed it too :(.

Fixes:		ba9f71ddec
Noticed by:	jrtc27
Sponsored by:	Netflix
2022-10-28 14:10:09 -06:00
Colin Percival
5ad8c32c72 ns8250: Fix sense of LSR_TEMT FCR check
When flushing the UART, we need to drain manually if LSR_TEMT is
*not* asserted, aka. if the transmit FIFO is not empty.

Reported by:	void <void@f-m.fm>
Fixes:		c4b68e7e53 "ns8250: Check if flush via FCR succeeded"
Differential Revision:	https://reviews.freebsd.org/D37185
2022-10-28 12:20:28 -07:00
Warner Losh
ba9f71ddec sys/modules: simplify a little by moving syscons to x86 only
syscons is x86 only now that sparc has been retired. No need for the
extra if. Also alphabetize p2sb.

Sponsored by:		Netflix
2022-10-28 11:52:40 -06:00
Warner Losh
445875aefd sys/modules: tidy up a bit by moving _hyperv to aarch64 section
Suggested by:	jhb
Sponsored by:	Netflix
2022-10-28 11:46:48 -06:00
Andrew Turner
227046a4d2 Enable more extres options when FDT is missing
These now build when FDT is not included in the kernel config.

Sponsored by:	Innovate UK
2022-10-28 18:31:56 +01:00
Andrew Turner
5566f84822 Only include regdev_if.h when it's needed
We don't need to include regdev_if.h when not building for FDT.

Sponsored by:	Innovate UK
2022-10-28 18:31:55 +01:00