Commit Graph

142008 Commits

Author SHA1 Message Date
Gordon Bergling
bef80a7285 vxlan(4): Fix two typos in sysctl descriptions
- s/fowarding/forwarding/

MFC after:	3 days
2022-03-28 19:35:34 +02:00
Gordon Bergling
75fdc440c8 extra_tcp_stacks: Fix two typos in source code comments
- s/recusive/recursive/

MFC after:	3 days
2022-03-28 19:34:45 +02:00
Gordon Bergling
982015d2d2 xen(3): Fix a typo in a source code comment
- s/mmaping/mapping/

MFC after:	3 days
2022-03-28 19:32:53 +02:00
Gordon Bergling
c55ecce1c1 netinet6: Fix a typo in a source code comment
- s/maping/mapping/

MFC after:	3 days
2022-03-28 19:32:10 +02:00
Gordon Bergling
79438267b3 netgraph(3): Fix a typo in a source code comment
- s/failes/fails/

MFC after:	3 days
2022-03-28 19:31:50 +02:00
Gordon Bergling
a216b9c2e0 qlnxe(4): Fix a typo in a source code comment
- s/existance/existence/

MFC after:	3 days
2022-03-28 19:31:18 +02:00
Gordon Bergling
e4c1b3f060 isci(4): Fix a typo in a source code comment
- s/recored/recorded/

MFC after:	3 days
2022-03-28 19:30:31 +02:00
Gordon Bergling
9a9d901bf2 exca(4): Fix a typo in a source code comment
- s/maping/mapping/

MFC after:	3 days
2022-03-28 19:30:10 +02:00
Gordon Bergling
22ba115b49 drm2: Fix a typo in a source code comment
- s/mmaping/mapping/

MFC after:	3 days
2022-03-28 19:29:27 +02:00
Gordon Bergling
fc48cc124c ipfilter(4): Fix a typo in a source code comment
- s/existance/existence/

MFC after:	3 days
2022-03-28 19:29:06 +02:00
Gordon Bergling
c9023cf7fe cxgbe(4): Fix a typo in a source code comment
- s/begining/beginning/

MFC after:	3 days
2022-03-28 19:28:15 +02:00
Emmanuel Vadot
50bb3a33d8 Bump __FreeBSD_version after linuxkpi updates 2022-03-28 18:31:31 +02:00
Emmanuel Vadot
2192bc3255 linuxkpi: Change irq_work_queue to return a bool
This was changed in Linux v5.10

MFC after:	1 week
Sponsored by:	Beckhoff Automation GmbH & Co .KG
2022-03-28 18:31:31 +02:00
Mark Johnston
ecd764b0ea 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
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2022-03-28 11:23:45 -04:00
John F. Carr
964bf2f902 hpet: Allow a MMIO window smaller than 1K
Some new AMD systems provide a HPET MMIO region smaller than the 1KB
specified, and a correspondingly small number of timers.  Handle this in
the HPET driver rather than requiring a 1KB window.  This allows the
HPET driver to attach on such systems.

PR:		262638
Reviewed by:	markj
MFC after:	1 month
2022-03-28 11:23:45 -04:00
Emmanuel Vadot
17ee6aca65 linuxkpi: Add llnode member in struct irq_work
This was added in Linux v5.8 and started to be used in drm code in v5.9

MFC after:	1 week
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-03-28 14:49:39 +02:00
Mateusz Guzik
bd7762c869 pf: add a rule rb tree
with md5 sum used as key.

This gets rid of the quadratic rule traversal when "keep_counters" is
set.

Reviewed by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-28 11:45:03 +00:00
Mateusz Guzik
1a3e98a5b8 pf: pre-compute rule hash
Makes it cheaper to compare rules when "keep_counters" is set.
This also sets up keeping them in a RB tree.

Reviewed by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-28 11:44:52 +00:00
Mateusz Guzik
93f8c38c03 pf: add pf_config_lock
For now only protects rule creation/destruction, but will allow
gradually reducing the scope of rules lock when changing the
rules.

Reviewed by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-28 11:44:46 +00:00
Mateusz Guzik
2f968abce5 pf: include anchor path when hashing a rule
Otherwise all anchors hash to the same value.

Note this can result in checksum mismatches between pfsynced hosts,
but it has to be sorted out as the previously computed checksum
would fail to indicate changed anchors.

Reviewed by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-28 11:44:39 +00:00
Alexander V. Chernikov
1b8b69508b routing: copy nexthop fib when changing existing nexthop
MFC after:	1 day
2022-03-28 11:32:30 +00:00
Andrew Turner
f461b95561 Fix a sign mismatch warning in the physmem code
Make sure both sides of a comparison are unsigned. As the values being
compared are size_t make the the value in the for loop size_t too.

Sponsored by:	The FreeBSD Foundation
2022-03-28 11:51:09 +01:00
Andrew Turner
029c1c4828 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
2022-03-28 10:10:15 +01:00
Konstantin Belousov
c1a24b9dbe sys/stdatomic.h: be nicer to c++
Use of stdatomic.h is undefined in C++, even the C++ 2020 standard does not
list stdatomic.h as a C library header supported by the language.  More,
there are some subtle differences between the <atomic> C++ header, and
C11+ stdatomic.h provided features.

Nonetheless, it is a quality of the implementation aspect, so let mis-users
mis-use stdatomic.h as they want, by making a compat shim for _Bool.

PR:	262683
Reported by:	yuri
Reviewed by:	dim, emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D34686
2022-03-28 03:16:02 +03:00
Gordon Bergling
1dc2c71ed8 netgraph(4): Fix a typo in a source code comment
- s/shapshot/snapshot/

MFC after:	3 days
2022-03-27 20:08:44 +02:00
Gordon Bergling
ef88adc527 pf(4): Fix a typo in a source code comment
- s/seaching/searching/

MFC after:	3 days
2022-03-27 19:57:49 +02:00
Gordon Bergling
1920133d8f mac_veriexec: Fix a typo in a source code comment
- s/seach/search/

MFC after:	3 days
2022-03-27 19:56:15 +02:00
Gordon Bergling
8eb774fe54 ath: Fix a typo in a source code comment
- s/ony/only/

MFC after:	3 days
2022-03-27 19:28:49 +02:00
Gordon Bergling
c1ad8a39a1 nfsclient: Fix a typos in source code comments
- s/ony/only/

Obtained from:	NetBSD
MFC after:	3 days
2022-03-27 19:27:05 +02:00
Mateusz Guzik
2533b5dc82 vfs: add missing bits to vdropl_impl
This completes the patch which was originally meant to go in.

Spotted by:	mhorne
Fixes: c35ec1efdc ("vfs: [1/2] fix stalls in vnode reclaim by not
requeieing from vnlru")
2022-03-27 14:35:37 +00:00
Mateusz Guzik
a4032e2a69 vfs: assorted tidy ups to lookup
No functional changes.
2022-03-26 17:06:09 +00:00
Alexander Leidinger
aeb91e95cf Log euid, rgid and jail on listen queue overflow
If you have numerous jails with multiple similar services running,
this helps to narrow down which services this log is referring to.
2022-03-26 11:17:55 +01:00
Eric van Gyzen
490b09f240 uma_zalloc_domain: call uma_zalloc_debug in multi-domain path
It was only called in the non-NUMA and single-domain paths.
Some of its assertions were duplicated in uma_zalloc_domain,
but some things were missed, especially memguard.

Reviewed by:	markj, rstone
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D34472
2022-03-25 20:10:38 -05:00
Eric van Gyzen
aca2a7faca stack_zero is not needed before stack_save
The man page was recently clarified to commit to this contract.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2022-03-25 20:10:38 -05:00
Eric van Gyzen
a8cbb835bf uma_zalloc: assert M_NOWAIT ^ M_WAITOK
The uma_zalloc functions expect exactly one of [M_NOWAIT, M_WAITOK].
If neither or both are passed, print an error and a stack dump.
Only do this ten times, to prevent livelock.  In the future, after
this exposes enough bad callers, this will be changed to a KASSERT().

Reviewed by:	rstone, markj
MFC after:	1 month
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D34452
2022-03-25 20:10:37 -05:00
Eric van Gyzen
863070bbf6 ksiginfo_alloc: pass M_WAITOK or M_NOWAIT to uma_zalloc
It expects exactly one of those flags.  A future commit will assert this.

Reviewed by:	rstone
MFC after:	1 month
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D34451
2022-03-25 20:10:37 -05:00
Eric van Gyzen
cfbb5f8ce0 vm_ksubmap_init: pass M_WAITOK to vmem_init -> uma_zalloc_arg
uma_zalloc_arg expects exactly one of the two WAIT flags.  A future
commit will assert this.

Reviewed by:	rstone
MFC after:	1 month
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D34450
2022-03-25 20:10:37 -05:00
Henri Hennebert
2e88306786 rtsx: Remove update of softc during probe and some var rename.
MFC after:	1 week
2022-03-25 15:24:49 -04:00
Mateusz Guzik
0f60088399 vfs: set cn_namelen when handling degenerate lookups
Turns out execve looks at it to store binary name, but in order to
trigger the problem one has to be trying to exec '/'. As is the value
would be left uninitialized (or rather set to -1 on debug kernels).

Fixes:	56244d3574 ("vfs: hoist degenerate path lookups out of the
loop")
2022-03-25 18:19:36 +00:00
John Baldwin
a7eb8afe9a Drop an OBE MP safe comment. 2022-03-25 10:01:39 -07:00
John Baldwin
b234b8d911 arm: Zero padding in mcontext_vfp_t in get_vfpcontext().
This can leak kernel stack data otherwise.

Reviewed by:	imp, markj
Sponsored by:	The University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D34594
2022-03-25 09:57:20 -07:00
D Scott Phillips
220c48e2d9 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
2022-03-25 09:49:33 -07:00
D Scott Phillips
7be7bd6775 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
2022-03-25 09:49:33 -07:00
D Scott Phillips
a693a30038 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
2022-03-25 09:49:33 -07:00
Dmitry Chagin
ff39d74aa9 linux(4): Add AT_NO_AUTOMOUNT to statx.
Specific to Linux AT_NO_AUTOMOUNT flag tells the kernel to not automount the
terminal component of pathname if it is a directory that is an automount point.
As it is the default for FreeBSD silencly ignore this flag.

glibc-2.34 uses this flag in the stat64 system calls which is used by i386.

Reviewed by:		trasz
Differential revision:  https://reviews.freebsd.org/D31524
MFC after:		2 weeks
2022-03-25 17:54:23 +03:00
Dmitry Chagin
aae8ae5ea5 linprocfs: Eliminate bogus comment (KSE).
Reviewed by:		trasz, emaste
Differential revision:	https://reviews.freebsd.org/D31525
MFC after:		2 weeks
2022-03-25 17:53:08 +03:00
Kristof Provost
3468cd95ca pf: ether l3 rules can only use addresses
Disallow the use of tables in ethernet rules. Using tables requires
taking the PF_RULES lock. Moreover, the current table code isn't ready
to deal with ethernet rules.

Disallow their use for now.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-25 11:13:47 +01:00
Navdeep Parhar
231f211240 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.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2022-03-25 00:39:00 -07:00
Bjoern A. Zeeb
9d9ba2b79b 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
MFC after:	3 days
2022-03-24 19:13:45 +00:00
John Baldwin
931983ee08 x86: Add a NT_X86_SEGBASES register set.
This register set contains the values of the fsbase and gsbase
registers.  Note that these registers can already be controlled
individually via ptrace(2) via MD operations, so the main reason for
adding this is to include these register values in core dumps.  In
particular, this will enable looking up the value of TLS variables
from core dumps in gdb.

The value of NT_X86_SEGBASES was chosen to match the value of
NT_386_TLS on Linux.  The notes serve similar purposes, but FreeBSD
will never dump a note equivalent to NT_386_TLS (which dumps a single
segment descriptor rather than a pair of addresses) and picking a
currently-unused value in the NT_X86_* range could result in a future
conflict.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D34650
2022-03-24 11:36:19 -07:00