e00bae5c markj May 27, 2021, 7:52 p.m.
Previously, a negative change list length would be treated the same as
an empty change list.  A negative event list length would result in
bogus copyouts.  Make kevent(2) return EINVAL for both cases so that
application bugs are more easily found, and to be more robust against
future changes to kevent internals.

Reviewed by:	imp, kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30480
cgit
f8851007 markj May 27, 2021, 7:52 p.m.
ktrstructarray() may be used to create copies of kevent(2) change and
event arrays.  It is called before parameter validation is done and so
should check for bogus array lengths before allocating a copy.

Reported by:	syzkaller
Reviewed by:	kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30479
cgit
434c46c0 dchagin May 27, 2021, 6:52 p.m.
PR:		256203
Submitted by:	Steve Kargl sgk at troutmask.apl.washington.edu
MFC after:	2 weeks
cgit
427f12f1 vangyzen May 27, 2021, 4:44 p.m.
When collecting kernel stacks for a target process, if the process
adds a thread between the two calls to sysctl, ignore the additional
threads.  Previously, procstat would print only a useless error
message.  Now, it prints a consistent snapshot of the stacks.
We know that snapshot is already stale, but it could still be stale
even with a more complex fix to reallocate and retry, so such a fix
is hardly worth the effort.

Reported by:	Daniel.Mitchell@emc.com
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
cgit
8c69d988 rrs May 27, 2021, 2:50 p.m.
The last set of commits fixed both a panic (in rack) and an ACK-war (in freebsd and bbr).
However there was a missing case, i.e. where we get an out-of-order FIN by itself.
In such a case we don't want to leave the FIN bit set, otherwise we will do the
wrong thing and ack the FIN incorrectly. Instead we need to go through the
tcp_reasm() code and that way the FIN will be stripped and all will be well.

Reviewed by: mtuexen,rscheff
Sponsored by: Netflix Inc
Differential Revision:	https://reviews.freebsd.org/D30497
cgit
4cc8a9da bz May 27, 2021, 1:38 p.m.
Add HWEIGHT32() macro needed by iwlwifi and while here add the 8/16/64
variants likewise.

Sponsored by:	The FreeBSD Foundation
MFC after:	12 days
Reviewed by:	hselasky
Differential Revision: https://reviews.freebsd.org/D30501
cgit
9b6835f3 bz May 27, 2021, 12:26 p.m.
Now that mlx4 and ofed either are operating on ifnet functions
directly or have a private copy of these macros, we can remove them
from linux/netdevice.h.
With this only the #define for net_device to ifnet is left.

Sponsored by:	The FreeBSD Foundation
MFC after:	12 days
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D30478
cgit
825b7d4c bz May 27, 2021, 12:26 p.m.
The LinuxKPI net_device actually is an ifnet; in order to further
clean that up so we can extend "net_device" migrate the few macros
left into ofed and make sure the header is included in all files
which need access to the macros.

Sponsored by:	The FreeBSD Foundation
MFC after:	12 days
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D30477
cgit
60afad6f bz May 27, 2021, 12:26 p.m.
The LinuxKPI net_device actually is an ifnet;  in order to further
clean that up so we can extend "net_device" replace the few macros
inline in mlx4.

Sponsored by:	The FreeBSD Foundation
MFC after:	12 days
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D30476
cgit
16fa3dcb hselasky May 27, 2021, 7:42 a.m.
Fixes the following compile warning:
      implicit declaration of function 'sysctlbyname' is invalid in C99
      [-Wimplicit-function-declaration]

Found by:	J87
Differential Revision:	https://reviews.freebsd.org/D30484
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
cgit
0a9e7899 pho May 27, 2021, 6:52 a.m.
5ef87bf8 np May 27, 2021, 5:57 a.m.
CTRL and OFLD tx queues do not have automatic tx credit flush enabled so
it is okay for the cidx not to be the same as the pidx when the queue is
destroyed.

Reported by:	Jithesh Arakkan @ Chelsio
MFC after:	1 week
Sponsored by:	Chelsio Communications
cgit
740d722d np May 27, 2021, 5:31 a.m.
This fixes a panic on driver module unload.

Fixes:	24b98f288d11 cxgbe(4): Overhaul CLIP (Compressed Local IPv6) table management.
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
cgit
8d5c7813 markj May 26, 2021, 8:30 p.m.
Approved by:	so
Security:	FreeBSD-SA-21:12.libradius
Security:	CVE-2021-29629
MFC after:	now
Sponsored by:	The FreeBSD Foundation
cgit
f4c460da donner May 26, 2021, 7:59 p.m.