Commit Graph

283574 Commits

Author SHA1 Message Date
Yuri Pankov
b0cf48305f em(4): update sysctl list, mention iflib(4)
Some of the settings, e.g. disabling/enabling msix, are now handled
as generic iflib variables; mention iflib explicitly in tunables
section (in addition to SEE ALSO).

Reviewed by:	cc, gbe (manpages)
Differential Revision:	https://reviews.freebsd.org/D39999
2023-05-09 10:00:32 +02:00
Kyle Evans
20d8d9809a Revert "uart(4): add Sunrise Point UART controllers"
This reverts commit d1b6271118.

I've received multiple reports of machines failing to boot with
this hardware; back it out for now until we can fix it.

PR:		271147
MFC after:	Morning coffee
2023-05-09 01:38:32 -05:00
Kyle Evans
20c61a7c51 acl(3): improve discoverability of acl_get_perm_np(3)
- Mention it in acl(3) as an available function, xref
- Mention it in acl_get_permset(3), as acl_get_perm_np(3) is a natural
    follow-up to acl_get_permset(3)

Sponsored by:	Klara, Inc.
2023-05-08 22:45:12 -05:00
Yuri Pankov
7adea6dbed calendar: cleanup obsolete directories
Follow 5282ada06b and don't reinstall obsolete directories.
2023-05-09 00:43:12 +02:00
Ed Maste
9c6f3dfda6 bhyve: specify OpenSSL 1.1 API
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 can then switch bhyve to use OpenSSL 3.0 APIs.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39998
2023-05-08 14:32:27 -04:00
Ed Maste
76887e84be 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.

PR:		269572, 271213 [exp-run]
Reviewed by:	mjg, jhb
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39941
2023-05-08 14:25:15 -04:00
Kristof Provost
f76df4718d if_ovpn tests: fix route_to test case
* Move the .254 address to the tunnel device so we reply through the
  tunnel.
* Remove the network route to 'break' routing, which we then 'fix' with
  pf's route-to, which is the functionality we wanted to test in the
  first place.

Reported by:	markj
Sponsored by:   Rubicon Communications, LLC ("Netgate")
2023-05-08 17:44:47 +02:00
Kristof Provost
f7ee28e755 if_ovpn: notify userspace when we've used half of the sequence numbers
OpenVPN uses the sequence number (as well as a userspace supplied nonce)
to build the IV. This means we should avoid re-using sequence numbers.
However, userspace doesn't know how many packets we've sent (and thus
what sequence number we're up to).

Notify userspace when we've used half of the available sequence numbers
to tell it that it's time for a key renegotiaton.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D39570
2023-05-08 16:43:25 +02:00
Mykola Hohsadze
9f60b8ce60 arm64/disassem.c: Add detection of xzr and sp
Added support to distinguish between XZR/WZR and SP/WSP registers.

Add new OP_ flags to indicate if the instruction allows the use of SP
for a given register field. "wSP" and "SP" are removed from w_reg and
x_reg, and helper functions are introduced for this purpose of detecting
the correct name of the x31 register.

mhorne: While here, adjust some whitespace issues from a previous
commit.

Reviewed by:	mhorne
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D39862
2023-05-08 10:59:35 -03:00
Yuri Pankov
1e37655ec3 vt(4): document enable_altgr
Reviewed by:	bcr
Differential Revision:	https://reviews.freebsd.org/D39997
2023-05-08 15:51:43 +02:00
Dag-Erling Smørgrav
4849767cb1 md5: Improve compatibility.
* Overhaul the GNU compatibility mode to more closely emulate what the GNU tools do.

* Add a Perl compatibility mode which emulates the shasum tool that ships with Perl.  This is currently not installed.

* Overhaul the tests.

Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D39446
2023-05-08 06:56:22 +00:00
Warner Losh
f710a4de92 twe: Add deprecation notice
This was flagged for removal in 14 over a year ago. Add deprecation to
man page.

MFC After: 3 days
2023-05-07 23:14:12 -06:00
Warner Losh
be68c895c8 MAINTAINERS: Add myself to stand
People email me when the boot loader breaks anyway, so ask to be
included in reviews. And ask strongly since I've had to deal with too
many major breakages lately, distruting other things I need to do.

Sponsored by:		Netflix
2023-05-07 22:30:10 -06:00
Warner Losh
4e2ddfba50 ciss: Fix typo
Although unused, fixed type in CISS_BOARD_UNKNOWN #define.

Submitted by: Peter Eriksson (a trivial part of D25155)
2023-05-07 22:25:01 -06:00
Jason A. Harmening
356e698011 unionfs(): destroy root vnode if upper registration fails
If unionfs_domount() fails, the mount path will not call VFS_UNMOUNT()
to clean up after it.  If this failure happens during upper vnode
registration, the unionfs root vnode will already be allocated.
vflush() it in order to prevent the vnode from being leaked and the
subsequent vfs_mount_destroy() call from getting stuck waiting for
the mountpoint reference count to drain.

Reviewed by:	kib, markj
Tested by:	pho
Differential Revision: https://reviews.freebsd.org/D39767
2023-05-07 18:30:43 -05:00
Jason A. Harmening
0745d837c2 unionfs: prevent upperrootvp from being recycled during mount
If upperrootvp is doomed by a concurrent unmount, unionfs_nodeget()
may return without a reference or lock on it.  unionfs_domount() must
prevent the vnode from being recycled for use by a different file until
it is finished with the vnode, namely once vfs_register_upper_from_vp()
fails.  Accomplish this by holding the reference returned by namei()
a bit longer.

Reviewed by:	kib, markj
Tested by:	pho
Differential Revision:	https://reviews.freebsd.org/D39767
2023-05-07 18:30:43 -05:00
Jason A. Harmening
0809172985 unionfs: fixes to unionfs_nodeget() error handling
If either the lower or upper vnode is found to be doomed after
locking it, the newly-created unionfs node won't be associated
with it and its lock will be dropped.  In that case, clear the
uppervp and lowervp locals as necessary to avoid further use
of the vnode in unionfs_nodeget().  If the upper vnode is doomed
but the lower vnode remains valid, additionally reset the unionfs
node's v_vnlock field to point to the lower vnode lock.

Reviewed by:	kib, markj
Tested by:	pho
Differential Revision:	https://reviews.freebsd.org/D39767
2023-05-07 18:30:43 -05:00
Mariusz Zaborski
95950880ad libc: document when the namespace was created
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D39989
2023-05-07 11:45:13 +02:00
Elliott Mitchell
af8e0a60d9 RELNOTES: fix consistency
Colons on the commit ids started being lost at 89d197cc99 and
continued subsequent updates.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D39991
2023-05-06 23:32:04 -06:00
Alexander Motin
572b77f8da mountd: Improve error message for exports lines
Currently mountd print error message "symbolic link in export path or
statfs failed" in case some path component in an exports line fails
validation.  This revision improves the error message by giving more
information about the precise error as well as the path component that
caused the issue.

Submitted by:	Andrew Walker <awalker@ixsystems.com>
Reviewed by:	mav, rmacklem
Differential Revision:	https://reviews.freebsd.org/D39840
2023-05-06 15:02:08 -04:00
Mitchell Horne
39f92a76a9 hwpmc: pass pmc pointer to more class methods
In many cases this avoids an extra lookup, since the callers always have
pm at hand. We can also eliminate several assertions, mostly for pm !=
NULL. The class methods are an internal interface, and the callers
already handle such a scenario. No functional change intended.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39915
2023-05-06 14:49:19 -03:00
Mitchell Horne
a35453b9c7 hwpmc: unused/diagused annotations in tsc class
These are preferred over casts to void. No functional change.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39914
2023-05-06 14:49:19 -03:00
Mitchell Horne
fa88954fd8 hwpmc: remove stub pmd_switch_{in,out} methods
Most platforms (non-x86) don't require these methods and implement stub
versions. If we initialize the pmc_mdep structure to always point to the
generic versions, then we can purge the duplicate stubs.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39913
2023-05-06 14:49:19 -03:00
Mitchell Horne
772b2dc3ab hwpmc: remove pmd_pcpu_{init,fini} callbacks
These are unused on all platforms.

Reviewed by:	jkoshy, emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39912
2023-05-06 14:49:19 -03:00
Mitchell Horne
3a7c9fc01b hwpmc_logging: less macro magic for type names
Provide the log type names in their entirely, rather than relying on the
macro to prepend the prefix. This improves their searchability; for
example, if I see PMCLOG_TYPE_PMCALLOCATE in libpmc I will now be able
to find where that is emitted in the kernel with a simple grep.

Reviewed by:	jkoshy, emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39911
2023-05-06 14:49:19 -03:00
Mitchell Horne
31610e34b7 hwpmc: don't use deprecated copystr(9)
It is just wrapper around strlcpy(), but results in more complicated
code. Clean this up to use strlcpy() or snprintf() as appropriate.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39910
2023-05-06 14:49:19 -03:00
Mitchell Horne
aba91805aa hwpmc: use kstack_contains()
This existing helper function is preferable to the hand-rolled
calculation of the kstack bounds.

Make some small style improvements while here. Notably, rename every
instance of "r", the return address, to "ra". Tidy the includes in the
affected files.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39909
2023-05-06 14:49:19 -03:00
Mitchell Horne
5387495773 hwpmc: simplify arm64 kernel stack unwinding
Use the unwind_frame() function, which properly validates the frame
pointer and uses ADDR_MAKE_CANONICAL() for the pc, required when PAC is
enabled.

Reviewed by:	andrew, markj, jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39934
2023-05-06 14:49:19 -03:00
Mitchell Horne
bf66159342 pmcstat: augment an error message
It also applies to the -t argument.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39907
2023-05-06 14:49:19 -03:00
Mitchell Horne
7253dc57a0 hwpmc: formatting of CPU and class lists
The end result is much more legible in both cases.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39906
2023-05-06 14:49:19 -03:00
Mitchell Horne
3c8b7f49d0 hwpmc: trim MIPS CPU and class defs
MIPS is gone, and this is the last remaining bit in the pmc code.

Reviewed by:	jkoshy, emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39905
2023-05-06 14:49:18 -03:00
Mitchell Horne
ca43b2ae3e hwpmc: trim obsolete Intel CPU and class defs
No functional change.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39904
2023-05-06 14:49:18 -03:00
Mitchell Horne
8bd4459560 pmccontrol: drop Pentium 4 special case
This is dead code; we no longer support Pentium hardware in libpmc or
hwpmc.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2023-05-06 14:49:18 -03:00
Mitchell Horne
b6c9d2a3f8 pmc_events.h: event list formatting
Improve the legibility of the list. Bump overall indentation, fix some
whitespace, and sort the IAF block.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39903
2023-05-06 14:49:18 -03:00
Mitchell Horne
6bdf067890 pmc_events.h: update event list comment
This comment is no longer in sync with the contents of __PMC_EVENTS().
Update to reflect the removal of various Intel event definitions from
this list; these event definitions now come from Linux and live in
lib/libpmc/pmu-events/.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39902
2023-05-06 14:49:18 -03:00
Mitchell Horne
d71a439020 hwpmc: remove remaining UCP event definitions
Although this block has remained in __PMC_EVENTS(), there is no handling
of UCP in libpmc/libpmc.c, so it is not possible to select one of these
events. It should therefore be impossible to trigger the code removed
from ucp_start_pmc(). Note that the GQ_SNOOP_MSF MSR exists only for
Nehalem and Westmere architectures, and the related events do not exist
for later generations.

The Uncore support in hwpmc has severely atrophied in general. We have
uncore event definitions in pmu-events, but the kernel support was
written against Intel Performance Measurement Architecture version 2,
and is disabled for processor generations later than Westmere. Nehalem
and Westmere lack uncore event definitions in pmu-events. I'd be
surprised if Uncore support is usable on any machine in its current
state.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39901
2023-05-06 14:49:18 -03:00
Mitchell Horne
1be8ef2679 hwpmc: drop vestigial IAP event definitions
These are maintained elsewhere. No functional change.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39900
2023-05-06 14:49:18 -03:00
Konstantin Belousov
38843fe0f2 amd64: add MINIMALUP config
This is the MINIMAL config with SMP/NUMA options turned off.
Useful to ensure that UP configuration still builds, until it is removed
finally.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-05-06 14:24:07 +03:00
Konstantin Belousov
3a8c69c1ff amd64 MINIMAL config: remove sentence about acpi
On amd64 ACPI is required to boot, it cannot work as a module, and we do
not build the ACPI module for long time.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-05-06 14:24:07 +03:00
Konstantin Belousov
7c8e66ed8d amd64: convert UP code to dynamically allocated pmap->pm_pcid
Reported by:	peterj
Sponsored by:	The FreeBSD Foundation
2023-05-06 14:24:07 +03:00
Michael Tuexen
e044a0bce4 bblog: inherit TCP_LOG option from listener
When the TCP_LOG option is used to enable logging on a listening
socket, inherit this if the listener is not auto selected and does
not have a log id set.

Reviewed by:		cc
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D38436
2023-05-06 11:21:16 +02:00
Michael Tuexen
c2399dd2e2 tcp: improve BBLoging for PRUs
Log all errors for PRUs, except when INP_DROPPED is set. In that case,
don't log it.

Reviewed by:		glebius, rrs
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D39591
2023-05-06 11:12:06 +02:00
Michael Tuexen
113f56ba49 tcp_rack: allow the module to be loaded without TCP_BLACKBOX
PR:			271091
Reviewed by:		cc
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D39860
2023-05-06 11:02:50 +02:00
Ed Maste
3e696dfb70 libfido2: update to 1.10.0
Some highlights from NEWS:

 ** bio: fix CTAP2 canonical CBOR encoding in fido_bio_dev_enroll_*();
    gh#480.
 ** New API calls:
  - fido_dev_info_set;
  - fido_dev_io_handle;
  - fido_dev_new_with_info;
  - fido_dev_open_with_info.
 ** Documentation and reliability fixes.
 ** Support for TPM 2.0 attestation of COSE_ES256 credentials.

Relnotes:       Yes
Sponsored by:   The FreeBSD Foundation
2023-05-05 19:57:34 -04:00
Ed Maste
f540a43052 libfido2: update to 1.9.0
Some highlights from NEWS:

 ** Added OpenSSL 3.0 compatibility.
 ** Removed OpenSSL 1.0 compatibility.
 ** Support for FIDO 2.1 "minPinLength" extension.
 ** Support for COSE_EDDSA, COSE_ES256, and COSE_RS1 attestation.
 ** Support for TPM 2.0 attestation.
 ** Support for device timeouts; see fido_dev_set_timeout().
 ** New API calls:
  - es256_pk_from_EVP_PKEY;
  - fido_cred_attstmt_len;
  - fido_cred_attstmt_ptr;
  - fido_cred_pin_minlen;
  - fido_cred_set_attstmt;
  - fido_cred_set_pin_minlen;
  - fido_dev_set_pin_minlen_rpid;
  - fido_dev_set_timeout;
  - rs256_pk_from_EVP_PKEY.
 ** Reliability and portability fixes.
 ** Better handling of HID devices without identification strings; gh#381.

Relnotes:       Yes
Sponsored by:   The FreeBSD Foundation
2023-05-05 19:11:52 -04:00
Rick Macklem
648a208ef3 nfsd: Fix NFSv3 Readdir/ReaddirPlus reply for large i-node numbers
If the i-node number (d_fileno) for a file on the server did
not fit in 32bits, it would be truncated to the low order 32bits
for the NFSv3 Readdir and ReaddirPlus RPC replies.
This is no longer correct, given that ino_t is now 64bits.

This patch fixes this by sending the full 64bits of d_fileno
on the wire in the NFSv3 Readdir/ReaddirPlus RPC reply.

PR:	271174
Reported by:	bmueller@panasas.com
Tested by:	bmueller@panasas.com
MFC after:	2 weeks
2023-05-05 15:43:55 -07:00
Doug Ambrisko
7e0f8b79b7 Add mrsasutil(8) as alias to mfiutil(8)
mfiutil(8) in theory can work on devices attached to mrsas(4) but
mrsas(4) is missing the FreeBSD mfi(4) ioctl support.  Once that
support is added to mrsas(4) then mrsasutil(8) can manage mrsas(4)
attached devices.  So this commit depends on that.  When mrsasutil(8)
is run it automatically opens /dev/mrsas0 instead of /dev/mfi0.
Add -D <device> and -t <type> flag to optionally specify mrsas or mfi to
work with the existing -u <unit>.  Device is the device node with or
without /dev/

PR:			https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265794
Differential Revision:	https://reviews.freebsd.org/D36343
Tested by:		Dan Mahoney <freebsd@gushi.org>
Reviewed by:		jhb
2023-05-05 09:20:48 -07:00
Dimitry Andric
2df58f1907 Apply libc++ fix for compiling <type_traits> with gcc 13
Merge commit 484e64f7e7b2 from llvm-project (by Roland McGrath):

  [libc++] Use __is_convertible built-in when available

  https://github.com/llvm/llvm-project/issues/62396 reports that
  GCC 13 barfs on parsing <type_traits> because of the declarations
  of `struct __is_convertible`.  In GCC 13, `__is_convertible` is a
  built-in, but `__is_convertible_to` is not.  Clang has both, so
  using either should be fine.

  Reviewed By: #libc, philnik

  Differential Revision: https://reviews.llvm.org/D149313

Reported by:	Mark Millard <marklmi@yahoo.com>
MFC after:	3 days
2023-05-05 18:19:40 +02:00
Kyle Evans
494e7dfdbe daemon: EINTR from kevent(2) is not a fatal error
Simply resume waiting for events rather than exiting if we took a signal
here.

This at least fixes running programs under daemon(8) in the face of
suspend/resume, which I suspect hits us with a spurious EINTR rather
than a signal anyways.

Reported and tested by:	manu
Fixes:	8935a39932 ("daemon: use kqueue for all events")
2023-05-05 10:28:40 -05:00
Joseph Koshy
c2eae5c39a
man9: Add a manual page for kstack_contains(9).
Approved by:	gnn (mentor)
Reviewed by:	mhorne
Differential Revision: https://reviews.freebsd.org/D39933
2023-05-05 15:42:59 +01:00