Commit Graph

283994 Commits

Author SHA1 Message Date
John Baldwin
73cc3dbce1 riscv pmap: Add an __unused wrapper for a variable only used under PV_STATS. 2023-05-25 10:44:53 -07:00
John Baldwin
61fab1341a powerpc booke: Add an __unused wrapper for a variable only used under DEBUG. 2023-05-25 10:44:53 -07:00
Pierre Pronchery
07523f1d4f libradius: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

Future work should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-25 13:15:45 -04:00
Pierre Pronchery
77d788e23d libfetch: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

Future work should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-25 13:15:45 -04:00
Mitchell Horne
cadaabcc72 riscv timer: use stimecmp CSR when available
The Sstc extension defines a new stimecmp CSR, allowing supervisor
software to set the timer, rather than just read it. When supported,
using this avoids the frequent trips through the SBI every time the
CPU's timer expires.

Reviewed by:	jhb
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40241
2023-05-25 14:07:49 -03:00
Mitchell Horne
8bebb78682 riscv: S-mode extension parsing
There are now several Supervisor-mode extensions that have entered the
'ratified' status, so begin parsing and reporting a few of these.

Recognize the following extensions:
 - Sstc: stimecmp/vstimecmp CSR
 - Svnapot: NAPOT* translation contiguity
 - Svpbmt: page-based memory types
 - Svinval: fine-grained TLB invalidation instructions
 - Sscofpmf: performance counter overflow

*i.e. "naturally aligned power-of-2" page granularity

For now, provide globals for Sstc and Sscofpmf, as we will make use of
these in the near future.

Plus, update the copyright statement after my recent work on this file.

Reviewed by:	jhb
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40240
2023-05-25 14:07:26 -03:00
Alfredo Mazzinghi
ef0a711fd5 riscv: Use PMAP_MAPDEV_EARLY_SIZE in locore and pmap_bootstrap
Use PMAP_MAPDEV_EARLY_SIZE instead of assuming that its value is always
L2_SIZE. Add compile-time assertions to check that the size matches the
expectations in locore.

Reviewed by:	mhorne
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D40110
2023-05-25 14:06:16 -03:00
Mykola Hohsadze
ffa75b573f arm64/disassem.c: Add shifted register instruction definitions
Add disassembly support for the following shifted register instructions:
 * adds
 * subs
 * sub
 * neg
 * negs
 * cmp
 * cmn

The 'Mandatory Tokens' checks are relaxed to allow for the alias
instructions (e.g. cmp) which hard-code one or more registers as xzr.

Reviewed by:	mhorne
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D40006
2023-05-25 14:06:15 -03:00
Mykola Hohsadze
8a852d3e9f arm64/disassem.c: Make output lowercase
Update the few uppercase fields fields to be consistent with others.

Reviewed by:	mhorne
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D39820
2023-05-25 14:06:15 -03:00
Ed Maste
01aee8c92d libfetch: do not call deprecated OpenSSL functions
As of OpenSSL 1.1 SSL_library_init() and SSL_load_error_strings() are
deprecated.  There are replacement initialization functions but they do
not need to be called: "As of version 1.1.0 OpenSSL will automatically
allocate all resources that it needs so no explicit initialisation is
required."

Wrap both calls in an OPENSSL_VERSION_NUMBER block.

PR:		271615
Reviewed by:	Pierre Pronchery <pierre@freebsdfoundation.org>
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40265
2023-05-25 12:20:15 -04:00
John Baldwin
555b62e1c8 less: Re-enable -Wdeprecated-non-prototype warnings.
These were fixed in the most recent update to contrib/less.
2023-05-25 09:16:20 -07:00
Stefan Eßer
76238846ad contrib/bc: upgrade to version 6.6.0
This update removes printing of a leading zero in scientific or
engineering output modes (which are an extended feature of this
implementation).

(cherry-picked from commit 8b83ef067441f6d3a4a55e92d1738724954a057c)

MFC after:	2 weeks
2023-05-25 17:55:31 +02:00
Johannes Totz
5804b7ab37 superio: Add device ID for ITE IT8613
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39969
2023-05-25 11:06:51 -04:00
Alexander V. Chernikov
6d204407ec ifconfig: fix ifconfig IFX inet[6] ADDR -alias
Internally, inet and inet6 family handlers store state for
 address addition and deletion separately, as, for example,
 "ifconfig lo0 inet 127.0.0.2/32" triggers a) deletion of the
 first interface address and b) addition of a new one.
The current logic behind handling "-alias" being the last argument
 is to copy the address from "addition" state to the "deletion"
 state. It is done by the generic ifconfig code, which explicitly
 typecasts opaque handler state pointers to "struct ifreq", which
 doesn't work in the Netlink case.

Fix this by introducing family-specific "af_copyaddr" handler,
 which removes the peeking & typecasting logic from the generic code.

Reported by:	otis
Tested by:	otis
2023-05-25 15:03:35 +00:00
John Baldwin
6c08fd3dc8 Enable -Wstrict-prototypes by default in the kernel for clang 15+.
PR:		271072 (exp-run)
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39734
2023-05-25 07:11:38 -07:00
John Baldwin
3dad1c6696 Enable -Wstrict-prototypes for all clang versions at WARNS >= 3.
Previously clang 15+ only enabled it for WARNS >= 5.

PR:		271072 (exp-run)
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39732
2023-05-25 07:11:38 -07:00
John Baldwin
4ef3b0c138 ldns: Silence -Wstrict-prototypes warnings.
Hopefully upstream will fix the function declaration of
ldns_edns_option_list_new in the future.
2023-05-25 07:11:38 -07:00
John Baldwin
48f52d9179 zfs: Fix build on 32-bit platforms after most recent import.
unsigned long is not a uint64_t on 32-bit platforms.  The zfs.4
manpage documents this variable as a uint, and it is only compared
with other variables of type int, so uint_t makes more sense than
unsigned long.

(I also wasn't sure if ULONG would work as a ZFS_MODULE_PARAM type
on other OS's)
2023-05-25 07:11:38 -07:00
Andrew Gallatin
fd96685a4a Revert "When stopping powerd, set the CPU frequency back to its maximum value"
This reverts commit 1dcb6ad173.

As of "8cb16fdbea6b Restore original frequency on exit.", powerd
restores the original frequency itself.

Further, if the original frequency is not the same as the
first frequency found in the frequency list, then the restoration
done by the powerd_poststop will restore the wrong frequency.
This can happen on Intel machines where Turbo is not enabled,
but the turbo frequency is first in the list of frequencies.
In this case, turbo will be enabled when the user did not want
it to be.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D40197
Reviewed by: imp, mav
2023-05-25 09:40:26 -04:00
Dag-Erling Smørgrav
430d064ba5 ctags: Support writing to stdout instead of a file.
* Understand "-" to mean stdout as per convention.
* Check that the output is a regular file and ignore -u if not, otherwise we might try to rm /dev/stdout.
* As a bonus, if -u was specified but the output file does not exist, proceed as if -u had not been specified instead of erroring out.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	cracauer, debdrup
Differential Revision:	https://reviews.freebsd.org/D40237
2023-05-25 13:22:18 +00:00
Alexander V. Chernikov
4bf44dd73b ifconfig: switch IPv4/IPv6 address manipulations to Netlink.
Differential Revision: https://reviews.freebsd.org/D40182
2023-05-25 12:22:18 +00:00
Andrew Turner
8b709c88e5 Add brackets around GICv3 redistributor macros
The GICv3 redistributor register access macros take arguments that are
used as variables. Add brackets around them as is the style, and for
safety.

Sponsored by:	Arm Ltd
2023-05-25 09:50:34 +01:00
Enji Cooper
9a49a37929 mptutil: document that disabled/enabled are also supported
This change officially documents the fact that the `volume cache
enabled` and `volume cache disabled` are also supported.

While here, remove an unnecessary newline at the end of a warn*(3) call.
warn*(3) adds a newline automatically.

MFC after:	1 week
2023-05-24 21:56:42 -07:00
Warner Losh
46927f6744 stand/efi/eficom: Free comc_port if we can't find the serial port
If we can't find the serial port, free comc_port and return early. The
serial port just isn't there.

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D40223
2023-05-24 22:33:53 -06:00
Warner Losh
e5d4e036f2 stand/efi/eficom: Make aarch64 compat code probe correctly
Make the compat code more correct by probing using the eficom console
structure, not the comconsole one.

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D40222
2023-05-24 22:33:53 -06:00
Warner Losh
42b0b7a926 stand/efi/eficom: Don't allow this for !HYPERV machines
If the machine isn't hyperv on amd64, then this driver fails the probe
and will do nothing further now, even if explicitly listed in a config.

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D40221
2023-05-24 22:33:53 -06:00
Warner Losh
f28dff43ad stand/efi/eficom: better handling of absent device
Don't even have a comc_port when the port doesn't exist: always free it
if we probe that it's not there. Also, when it's not present, clear the
flags indicating presence to avoid disturbing other flags.

Sponsored by:		Netflix
Reviewed by:		tsoome, kevans
Differential Revision:	https://reviews.freebsd.org/D40220
2023-05-24 22:33:53 -06:00
Warner Losh
2efbc8e284 stand/efi/smbios: Move detection of smbios earlier.
It would be nice to make decisions early in boot, about maybe consoles,
based on smbios variables. Set them just after we setup the archsw so we
can use them everywhere.

Sponsored by:		Netflix
Reviewed by:		tsoome, kevans
Differential Revision:	https://reviews.freebsd.org/D40219
2023-05-24 22:33:53 -06:00
Mike Karels
8955236a10 bectl.8: update /home
The default location for home directories is moving from /usr/home
to /home, including the default zfs datasets.  Update accordingly.
Add zroot/usr/src as replacement example of nested datasets.

While here, mark zroot/var as "canmount off" as per current setup.

Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D40206
2023-05-24 22:08:39 -05:00
Pierre Pronchery
b238d51d0a ldns: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future ldns update should migrate to use the OpenSSL 3.0 APIs.

This is a recommit of c6750ddec9 after the ldns update in
5afab0e5e5.

PR:		271615
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40082
2023-05-24 22:16:48 -04:00
Pierre Pronchery
baef3a5b58 tcpdump: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future update should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-24 19:44:24 -04:00
Eric Joyner
9dc2f6e26f
ice(4): Update to 1.37.11-k
This driver update has no corresponding ice_ddp update, and doesn't
contain very many functional changes:
- Some refactoring for future SR-IOV PF support
- Various minor fixes

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Tested by:	jeffrey.e.pieper@intel.com
MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D39821
2023-05-24 16:38:28 -07:00
Przemyslaw Lewandowski
156424fce9
ixgbe: Change if condition for RSS and rxcsum
This patch fixes TCP connection hangs for 1 rxq and 1 txq without rxcsum
enabled. Documentation for 10G cards and other drivers suggest enabling
rxcsum for RSS and disabling otherwise. When PCSD bit is not set then
fragment checksum and IP identification are reported in the rx
descriptor. When PCSD bit is set then RSS hash value is reported in the
rx descriptor. RSS and RX IPP checksum are mutually exclusive.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

PR:		268910
Reviewed by:	erj@
Tested by:	jeffrey.e.pieper@intel.com
MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D38621
2023-05-24 16:29:40 -07:00
Peter Wemm
ba244e2a98
delete-old: add two files left behind in certs/blacklisted
The untrusted certs directory was renamed a while ago and these
files were moved to the new location.  Various upgrade paths cause
these files to be missed and prevent deletion of the directory.
2023-05-24 13:03:10 -07:00
Pierre Pronchery
96e6e5b5fe ppp: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future change should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-24 14:55:07 -04:00
Ed Maste
ffbd1c8bc0 libtelnet: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future change should migrate to use the OpenSSL 3.0 APIs, or just
remove libtelnet.

PR:		271615
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-24 14:31:14 -04:00
Ed Maste
ae60012e46 release/oci.conf: add missing vm_extra_pre_umount() steps
vm.subr's default vm_extra_pre_umount removes /qemu and
/etc/resolv.conf.  When vm_extra_pre_umount is overridden these steps
need to be performed in the cloud-specific conf file.

PR:		271602
Reviewed by:	dch, lwhsu
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40257
2023-05-24 13:11:07 -04:00
Kristof Provost
6342c9ed17 if_ovpn: atomic_set -> atomic_store
The intent is to set the value to UINT32_MAX, not to |= UINT32_MAX.
Happily the intent (ensure that we do not send further packets) is
achieved either way.

Reported by:	markj
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-05-24 18:29:21 +02:00
Andrew Turner
fa512fcd8f arm64: Print the spinlock count on panic
When the spinlock count is non-zero while taking a data abort we panic.
Print this count to help debugging.

Sponsored by:	Arm Ltd
2023-05-24 17:20:06 +01:00
Andrew Turner
0731b0a9f1 Print registers on an arm64 spinlock data abort
When checking if the spinlock count is correct in a data abort we can
panic without printing the registers. These are useful to debug the
abort, e.g. by giving the fault address register.

Reviewed by:	kib
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D40228
2023-05-24 17:20:06 +01:00
Andrew Turner
b81e1c6b72 Don't print leading 0's in the arm64 esr
We don't print leading zeros for other registers, so do the same with
ESR_EL1.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D40129
2023-05-24 17:20:06 +01:00
Andrew Turner
800b39cf99 arm64: Remove CNTHCTL_EL2 from arm64.h
It is also in hypervisor.h where it belongs.

Sponsored by:	Arm Ltd
2023-05-24 17:20:05 +01:00
Dag-Erling Smørgrav
5afab0e5e5 ldns: Upgrade to 1.8.3.
Merge commit 'cf3e3d5bd0a1fae39c74c7db5a4e8b10732d0766'

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D40226
2023-05-24 15:50:18 +00:00
Alexander V. Chernikov
12cfa3c1bd ifconfig: fix interface address ordering with Netlink. 2023-05-24 15:34:21 +00:00
Mike Karels
1186ef86c3 RELNOTES: add note about moving /usr/home to /home
Document change to pw and hence bsdinstall.
2023-05-24 10:32:07 -05:00
Mike Karels
aa1a1e7dc4 mksnap_ffs.8: update /home examples
The default location for home directories is moving from /usr/home
to /home.  Update the examples accordingly.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D40205
2023-05-24 10:31:50 -05:00
Ed Maste
d1639e43c5 cpuset: increase userland maximum size to 1024
Hardware with more than 256 CPU cores is now available and will become
increasingly common.  Bump CPU_MAXSIZE (used for userland cpuset_t
sizing) to 1024 to define the ABI for FreeBSD 14.

This change is reapplied after a change to decouple cpuset from bhyve:
commit e17eca3276 ("vmm: Avoid embedding cpuset_t ioctl ABIs").

PR:		269572, 271213 [exp-run]
Reviewed by:	mjg, jhb
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39941

(cherry picked from commit 76887e84be)
2023-05-24 10:59:05 -04:00
Randall Stewart
57a3a161a9 tcp: request tracking is not http specific.
This change is a name change only. TCP Request tracking can track sendfile and even non-sendfile requests. The
names however in the current code use http, and they should not. The feature is not http specific. Lets change the
name so they more properly reflect whats going on. This also fixes conflicts with http_req which caused application pain.

Reviewed by: tuexen
Sponsored by: Netflix Inc
Differential Revision:https://reviews.freebsd.org/D40229
2023-05-24 06:35:36 -04:00
Mitchell Horne
08637d5d15 ofw_cpu: quiet secondary CPU devices
We already do plenty to announce the different CPUs in dmesg. Follow the
ACPI CPU strategy of reporting the first CPU device, but quieting the
rest for non-verbose boot. This cuts down slightly on dmesg output.

Reviewed by:	manu, jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40243
2023-05-24 10:28:26 -03:00
Mitchell Horne
5edffecc4b ofw_cpu: whitespace cleanup
Reviewed by:	jhb, emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40242
2023-05-24 10:28:26 -03:00