6d317723 glebius May 12, 2022, 6:02 p.m.
3e11d3f6 dchagin May 12, 2022, 5:06 p.m.
On success gnu libc sched_getaffinity() should return 0, unlike underlying
Linux syscall which returns the size of CPU mask copied to user.

PR:		263939
MFC after:	2 weeks
6987c475 kbowling May 12, 2022, 3:43 p.m.
Extend the size of the local rx_buffer_size variable to account for
larger buffer sizes possible on 82580, i350 chips.

From i350 datasheet, 6.2.10 Initialization Control 4 (LAN Base Address
+ Offset 0x13):
When 4 ports are enabled maximum buffer size is 36 KB. When 2 ports are
enabled maximum buffer size is 72 KB. When only a single port is
enabled maximum buffer size is 144 KB.

and 8.3:
The overall available internal buffer size in the I350 for all ports is
144 KB for receive buffers and 80 KB for transmit Buffers. Disabled
ports memory can be shared between active ports and sharing can be
asymmetric. The default buffer size for each port is loaded from the
EEPROM on initialization.

From the reporter:
But for I350 when only 2 ports are used PBA size can be set as 72KB
(see datasheet RXPbsize or e1000_rxpbs_adjust_82580 function in
e1000_82575.c). In this case calculating the rx_buffer_size overflows
as 0x0048 << 10 = 73728 or 0x12000 pushed into u16. It is then set as
0x2000 or 8192.

PR:		263896
Reported by:	hannula@gmail.com
Tested by:	hannula@gmail.com
Approved by:	markj
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D35167
0e12eb7b emaste May 12, 2022, 3:16 p.m.
The PermitRootLogin option "prohibit-password" was added as a synonym
for "without-password" in 2015.  Then in 2017 these were swapped:
"prohibit-password" became the canonical option and "without-password"
became a deprecated synonym (in OpenSSH commit 071325f458).

The UsePAM description in sshd_config still mentioned
"without-password."  Update it to match the new canonical option.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
4143e4fb emaste May 12, 2022, 2:59 p.m.
In some build configurations a warning about (an absolute path for)
-fuse-ld= not being supported by GCC was emitted during cleandir or
other non-build make targets.

For these non-build targets COMPILER_TYPE is set to "none" but we
treated the .else case for COMPILER_TYPE==clang as implying gcc.
Check instead for COMPILER_TYPE==gcc.

PR:		263913
Reported by:	pstef
Reviewed by:	pstef
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
f9e90c24 hselasky May 12, 2022, 2:32 p.m.
This implementation uses the concurrency kit, CK, API directly which is
suitable for use with EPOCH(9) and RCU under FreeBSD.

No functional change intended.

The initial "linux/hash.h" code was obtained from DragonFlyBSD via
FreeBSD's drm-kmod in ports.

Differential Revision:	https://reviews.freebsd.org/D35162
Reviewed by:	bz@ and markj@
MFC after:	1 week
Sponsored by:	NVIDIA Networking
5326ebfd dchagin May 11, 2022, 6 p.m.
Reported by:		trasz
586ed321 dchagin May 11, 2022, 7:40 a.m.
Reviewed by:		jhb
Differential revision:	https://reviews.freebsd.org/D34982
MFC after:		2 weeks
c8b5c478 dchagin May 11, 2022, 7:39 a.m.
MFC after:		2 weeks
f35093f8 dchagin May 11, 2022, 7:36 a.m.
Linux has more tolerant checks of the user supplied cpuset_t's.

Minimum cpuset_t size that the Linux kernel permits in case of
getaffinity() is the maximum CPU id, present in the system / NBBY,
the maximum size is not limited.
For setaffinity(), Linux does not limit the size of the user-provided
cpuset_t, internally using only the meaningful part of the set, where
the upper bound is the maximum CPU id, present in the system, no larger
than the size of the kernel cpuset_t.
Unlike FreeBSD, Linux ignores high bits if set in the setaffinity(),
so clear it in the sched_setaffinity() and Linuxulator itself.

Reviewed by:		Pau Amma (man pages)
In collaboration with:	jhb
Differential revision:	https://reviews.freebsd.org/D34849
MFC after:		2 weeks
50dd2cea jmg May 11, 2022, 3:14 a.m.
Thanks-to:	kevans@
826c58d6 mjg May 11, 2022, midnight
Fixes:	ff80dd034a8ca732
Sponsored by:	Rubicon Communications, LLC ("Netgate")
bf46c0a9 mckusick May 10, 2022, 11:06 p.m.
No functional change.
cc1a53bc markj May 10, 2022, 9:38 p.m.
Leave -Wcast-align disabled, at least for now, since there are numerous
instances of that warning in places where buffer pointers are cast to
pointers to various filesystem structures.  Fixing this properly would
be too much work for too little gain.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
f775c417 markj May 10, 2022, 9:26 p.m.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation