Commit Graph

309266 Commits

Author SHA1 Message Date
Mateusz Piotrowski ae0fd05a33 p9fs.4: Cross-reference mount(8)
MFC after:	3 days
2026-05-15 12:13:20 +02:00
Mateusz Piotrowski e0c3d21e3b bhyve.8: Improve readability by not breaking -f's synopsis
MFC after:	3 days
2026-05-15 11:49:43 +02:00
Mateusz Piotrowski 7abddbb3cd bhyve.8: Fix formatting of -G's "w" prefix
"w" is a command modifier, not an argument. Use Cm.

Fixes:	2cdff9918e byhve: add option to specify IP address for gdb
MFC after:	3 days
2026-05-15 11:48:43 +02:00
Mark Johnston b99954433d linux: Fix some problems with header pollution
- Avoid including sys/proc.h in linux_vdso_gtod.c.  It's not needed, but
  the implicit inclusion of sys/param.h via sys/ucred.h->bsm/audit.h was
  bringing in some required definitions.
- Include a couple of required headers: sys/time.h (for struct bintime),
  and limits.h (for INT_MAX).
- Move some helpers from linux.h, which depend on sys/param.h for NODEV,
  to the one CU where they're actually used.

No functional change intended.

Reviewed by:	imp, kib, emaste
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D56982
2026-05-15 00:39:25 +00:00
Rick Macklem 074c42ade3 RELNOTES: Add an entry for commit b92b9da330 2026-05-14 16:04:26 -07:00
Rick Macklem b92b9da330 nfsd: Allow vfs.nfsd.srvmaxio to be up to 4Mbytes
Without this patch, the maximum setting for
vfs.nfsd.srvmaxio was 1Mbyte.  This patch increases
that to 4Mbytes.

The same as for any setting above 128Kbytes, settings up to
4Mbytes require that kern.ipc.maxsockbuf be increased.
(A message generated after setting vfs.nfsd.srvmaxio via
the /etc/rc.conf variable nfs_server_maxio will indicate
the minimum setting, which will be somewhat greater than
four times the setting of vfs.nfsd.srvmaxio.)

Requested by:	Cedric Blancher <cedric.blancher@gmail.com>
MFC after:	2 weeks
Fixes:	13d3bd165e ("subr_uio.c: Remove a KASSERT() for large NFS server I/O")
2026-05-14 15:33:23 -07:00
Rick Macklem 13d3bd165e subr_uio.c: Remove a KASSERT() for large NFS server I/O
When the NFS server is set to allow an I/O size greater
than 1Mbyte (not allowed in FreeBSD's main yet), a
KASSERT() in allocuio() can fail when:
zfs_freebsd_write()->zfs_write()->zfs_uiocopy()
->cloneuio()->allocuio()
is called for a large NFS server write.

Since the userland API callers to allocuio() already
check that the size does not exceed UIO_MAXIOV,
there does not seem to be a need to a KASSERT()
here.

Removing the KASSERT() allows NFS server writes
of greater than 1Mbyte to work, once the NFS code
is patched to allow them.

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57005
2026-05-14 15:17:55 -07:00
Colin Percival 4080419d9a Cloud releases: More firstboot_pkg_upgrade
Update a couple more cloudware images which I forgot about earlier.

Reviewed by:	ziaee
Fixes: 464a351267 ("Cloud releases: Switch to firstboot_pkg_upgrade")
Differential Revision:	https://reviews.freebsd.org/D57006
2026-05-14 14:59:11 -07:00
Alexander Ziaee 464a351267 Cloud releases: Switch to firstboot_pkg_upgrade
Cloud images are deployed with base system packages. Introduce a
firstboot package auto updater to patch the base system on first boot.

MFC after:		1 hour
MFC to:			stable/15
Reviewed by:		cperciva
Sponsored by:		Google Cloud
Differential Revision:	https://reviews.freebsd.org/D56890
2026-05-14 17:05:12 -04:00
Ed Maste 2574974648 OpenSSH: Update to 10.3p1
Full release notes are available at
https://www.openssh.com/txt/release-10.3

Selected highlights from the release notes:

 * ssh(1), sshd(8): remove bug compatibility for implementations
   that don't support rekeying. If such an implementation tries to
   interoperate with OpenSSH, it will now eventually fail when the
   transport needs rekeying.

 * ssh(1), sshd(8): support IANA-assigned codepoints for SSH agent
   forwarding, as per draft-ietf-sshm-ssh-agent. Support for the new
   names is advertised via the EXT_INFO message. If a server offers
   support for the new names, then they are used preferentially.

 * ssh(1): add a ~I escape option that shows information about the
   current SSH connection.

 * sshd(8): add 'invaliduser' penalty to PerSourcePenalties, which is
   applied to login attempts for usernames that do not match real
   accounts. Defaults to 5s to match 'authfail' but allows
   administrators to block such attempts for longer if desired.

 * Support the ed25519 signature scheme via libcrypto.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56999
2026-05-14 18:59:30 +00:00
Warner Losh fb4e7898a3 Revert "nvme: Only attach to storage NVMe devices"
This reverts commit 0a19464bf7. It's
incorrect for ahci attachments. Reverting to merge to stable/15
to merge to releng/15.1 for the release.

Sponsored by:		Netflix
2026-05-14 09:35:35 -06:00
Mitchell Horne 988c039804 linux/io: handle memtype_wc mapping for !DMAP range
The amdgpu driver in drm-kmod will attempt to update/reserve certain GPU
VRAM ranges as write-combining. Depending on the system, this address
range may fall outside of FreeBSD's constructed DMAP. We cannot use
pmap_change_attr() in this case.

When INVARIANTS is enabled, this results in the following:

  panic: physical address 0x880000000 not covered by the DMAP

Add a guard against triggering the KASSERT in PHYS_TO_DMAP().

This limitation in our implementation of arch_io_reserve_memtype_wc() is
already known in drm-kmod's amdgpu_bo_init(), and errors are ignored
there (see "BSDFIXME"). This change is only to eliminate the preventable
assertion failure within this scheme.

Tested by:	kevans
Reviewed by:	kib, emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D56971
2026-05-14 11:25:09 -03:00
Ed Maste 4cdcacb9b2 usbdevs: Add TP-Link UB500 (RTL8761BUV) USB ID
This device is not yet supported.

Unfortunately some recently purchased UB400 dongles also contain this
Realtek IC.

Sponsored by:	The FreeBSD Foundation
2026-05-14 09:50:46 -04:00
Robert Clausecker aa92784fcb libc/timespec_get*.3: expose STANDARDS section
We now have .St -isoC-2023, so the STANDARDS section can go live.

Fixes:		9b5d724cad
MFC after:	1 week
2026-05-14 12:34:47 +02:00
Robert Clausecker 68251761c7 libc/ctime.3: timegm() is in C23.
See also:	D53951, https://wiki.freebsd.org/C23
MFC after:	1 week
2026-05-14 12:34:40 +02:00
Andrew Turner b8606c3406 arm64: Fix the includes for rsi.c
This depended on header pollution only present when FDT is defined. As
FDT isn't check for in this file we can remove opt_platform.h and
include the correct set of vm header files.

Reported by:	ivy
Fixes:	76a2904c35 ("arm64: Add RSI detection for CCA")
Sponsored by:	Arm Ltd
2026-05-14 10:25:14 +01:00
Alex S 96f262dcac tests/sys/arch/amd64: Add a basic ptrace syscall tampering test
Signed-off-by: Alex S <iwtcex@gmail.com>
Reviewed-by: kib
Pull-request: https://github.com/freebsd/freebsd-src/pull/2190
2026-05-13 16:40:16 -04:00
Mariusz Zaborski 45fa572b94 cap_sysctl: fix typo 2026-05-13 21:59:38 +02:00
Mariusz Zaborski efc1f50ec4 cap_net: fix typos 2026-05-13 21:59:38 +02:00
Mariusz Zaborski 4569c022db cap_dns: fix typos 2026-05-13 21:59:37 +02:00
Mariusz Zaborski 69e9d5d306 cap_fileargs: fix typo 2026-05-13 21:59:37 +02:00
Chuck Silvers bab04ddf1f ufs: support unmapped bufs for indirect blocks in bmap
Use unmapped bufs for indirect block buffers in bmap, and use sf_bufs
for transient mapping them when we need to read the specific pointer.

[kib note: I changed the original patch to use sf_buf instead of
explicit DMAP utilization, making the change MI].

Tested by:	pho
Reviewed by:	kib
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D53424
2026-05-13 22:46:00 +03:00
Konstantin Belousov cb31a26616 ptrace: clear TDP_USERWR after transparent attach only on attach
The flag indicates that the modifying ptrace op was issued, and clearing
it after transparent attach is needed to not leak the flag to later
operations, since it is cleared on the syscall enter.

But clearing it there unconditionally is too strong.  The clearing
should be only done for attach situation.

Reported by:	Alex S <iwtcex@gmail.com>
Fixes:	9997693427
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56928
2026-05-13 22:40:03 +03:00
Mitchell Horne 54d0ae979d gpart.8: add entry for xbootldr partition type
Reviewed by:	emaste, markj
Sponsored by:	The FreeBSD Foundation
Fixes:	dab8138e13 ("g_part,mkimg: Add additional GPT partition types")
Differential Revision:	https://reviews.freebsd.org/D56969
2026-05-13 16:35:11 -03:00
John Baldwin 52fa2f9f8d clock_gettime.2: Fix a couple of typos
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D56990
2026-05-13 14:11:26 -04:00
Ryan Libby 3335527524 vnlru: avoid cache line contention
Reviewed by:	kib, olce
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D56951
2026-05-13 10:43:21 -07:00
Ryan Libby e30e507a77 vfs_bio: mark uma zone pointer __read_mostly
Reviewed by:	kib, olce
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D56949
2026-05-13 10:43:21 -07:00
Ryan Libby 2a56cedac2 bq_insert: delay the BUF_UNLOCK if not bd_flush()ing
Reduce bufqueue lock contention by delaying the BUF_UNLOCK to after
dropping the bufqueue lock.  Still do the early BUF_UNLOCK if we
actually have to bd_flush.

Reviewed by:	kib, markj
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D56948
2026-05-13 10:43:21 -07:00
Mariusz Zaborski ee04ee95ab cap_net: fix error propagation for ENOTCAPABLE in cap_getaddrinfo
Fixes:		b60053fde1 ("libcasper: Fix inconsistent error codes of cap_get{addr,name}info()")
2026-05-13 18:42:45 +02:00
John Baldwin 04987aa1d8 arm64/vmm: Enforce a data barrier before tlbi for non-VHE
Exception entry does not include an implicit, architectural data
barrier.

Reported by:	Ben Simner <ben.simner@cl.cam.ac.uk>
Reviewed by:	andrew
Fixes:		5577bb2f67 ("arm64/vmm: Support tlbi from VHE")
Differential Revision:	https://reviews.freebsd.org/D56855
2026-05-13 12:33:52 -04:00
John Baldwin 8766e2122a mandoc: Updating FreeBSD thead library descriptions
Remove libkse as it has been obsolete for many years and drop 1:1 from
description of libthr.

Reviewed by:	brooks
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D56850
2026-05-13 12:33:29 -04:00
John Baldwin 538f0564c1 mandoc: Add an entry for libsys to lib.in
Reviewed by:	brooks, emaste
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D56849
2026-05-13 12:33:12 -04:00
Navdeep Parhar e03c00b47b cxgbe(4): Query and report IPsec offload related parameters
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2026-05-13 08:51:46 -07:00
Ed Maste f6178451ee src.opts.mk: Comment about CTF & DTRACE relationship
WITH_CTF enables building userland components with CTF, and not the ctf*
tools as one might expect.  The tools are actually included with the
DTRACE knob.  Add a comment where the dependency is handled, as this has
caused confusion.

Reported by:	ivy
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56977
2026-05-13 09:37:58 -04:00
Olivier Certner 23005ed3a1 acpi_spmc(4): Update copyright
Sponsored by:   The FreeBSD Foundation
2026-05-13 14:38:26 +02:00
Olivier Certner 91d3fb31e8 acpi_spmc(4): If verbose, print called functions
...as a debugging aid, in order to be able to check that some functions
are effectively called and to identify them quickly if they cause
a hang.

Reviewed by:    obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56883
2026-05-13 14:38:26 +02:00
Olivier Certner 69a303ace7 acpi_spmc(4): Auto-detect DSM revisions by default
Which revisions to use for the Intel and AMD DSMs is unclear.  For the
Intel one, the written specification indicates only 0, but Linux uses
1 (possibly an oversight).  For the AMD one, for which there is no
specification, Linux uses 0, but at least on the Framework 13 AMD 7040
series, the "enumerate functions" function only returns a mask that
covers all the functions we expect when called with revision 2.

Introduce an auto-detection strategy where each revision starting from
0 is tried in turn up to some limit (included; default: 15).  As soon as
a revision implements all expected functions, we stop the loop and use
that one, in effect selecting the minimum revision that implements all
we need, which should avoid potential backwards-compatibility problems.
If no revision implements all expected functions, the highest available
revision in the checked range is selected, but higher revisions that do
not bring new functions are discarded (see the explanatory comment in
acpi_spmc_probe_dsm()).

The revision policy is still tunable using the same existing sysctl(8)
knobs 'debug.acpi.spmc.intel_dsm_revision' and
'debug.acpi.spmc.amd_dsm_revision'.  They have been extended so that
a negative value indicates to use the auto-detection mechanism up to
a revision of minus the value.  As before, a 0 or positive value
requests a specific revision.  A new knob is introduced for the
Microsoft DSM just in case ('debug.acpi.spmc.ms_dsm_revision').

Since now the revision can be auto-detected, and thus depends on
a particular device instance, move it into 'struct dsm_info' on the
softc.  This also enables finishing the split between static and
dynamic/tunable information, allowing to constify all the DSM
descriptors.

Print the revision eventually used along with the supported functions.

Tested on an Intel Framework laptop.

Reviewed by:    obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56882
2026-05-13 14:38:26 +02:00
Olivier Certner b82e41d394 acpi_spmc(4): Trivial simplification in detach function
Reviewed by:    obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56881
2026-05-13 14:38:25 +02:00
Olivier Certner b092ee5206 acpi_spmc(4): softc: Move supported functions into a DSM info structure
This is in preparation to adding the revision as a probed information.

Reviewed by:    obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56880
2026-05-13 14:38:25 +02:00
Olivier Certner 65ecfb4a66 acpi_spmc(4): Only run DSM functions reported present
Examination of the DSDT in a Framework laptop generally hints at
firmware designers sometimes providing ACPI methods for convenience
(e.g., same firmware for multiple models) but not using them (or not
expecting them to be used) depending on tweaks or the actual hardware
platform.

On an Intel Framework laptop, we specifically observe the presence of
a Microsoft DSM that just reports availability of the SLEEP_ENTRY and
SLEEP_EXIT (7 and 8) functions although the Microsoft specification
requires other functions, whose purpose is similar to corresponding
Intel DSM's ones (such as DISPLAY_OFF).  However, we currently always
call the latter even on the Microsoft DSM.  On that laptop, fortunately,
the way the code is structured in the _DSM method leads to nothing being
executed on this call.

Given the similarity of intent between most functions from the Microsoft
DSM on one side and those of ADM and Intel on the other, it is
imaginable that other firmware developers could use a strategy where
functions are in fact aliased, in which case insisting on calling the
Microsoft's DSM function even if not enumerated would cause the action
to be performed twice (because we also call the corresponding function
on the Intel/AMD DSM), which may or may not cause other problems and in
any case seems a waste.

So, by default, do not try to run any function that is not enumerated,
as that looks like the safest approach.  Add a debug sysctl(8) knob to
revert to the previous behavior, just in case
('debug.acpi.spmc.force_call_expected_functions').

acpi_spmc_run() now checks if a DSM/function combination has been
enumerated, and skips the actual call if it does not.  This allows to
remove all checks from the acpi_spmc_*_notif() functions, making the
code much more compact.

acpi_spmc_get_constraints() now checks whether
DSM_GET_DEVICE_CONSTRAINTS is supported in order to determine which DSM
to use and whether to call the function at all.

Reviewed by:    obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56879
2026-05-13 14:38:25 +02:00
Olivier Certner ba4f05b55f acpi_spmc(4): Factor out testing for present DSMs/functions
Since we are now keeping in the softc the information about which DSM
functions are available (in supported_functions[]), the 'dsms' field
there is somewhat redundant.

Make it completely redundant by keeping the bit representing the
enumeration function itself in each element of supported_functions[],
and then remove the field.

As a result, convert has_dsm() to rely on supports_function().

Adapt acpi_spmc_dsm_check_functions() so that it does not take into
account the enumeration function bit.

While here, use the self-explanatory stance
IDX_TO_BIT(DSM_ENUM_FUNCTIONS) instead of a hardcoded 1.

Reviewed by:    obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56878
2026-05-13 14:38:25 +02:00
Olivier Certner d765d209c3 acpi_spmc(4): acpi_spmc_run_dsm(): Rename, rename parameters, constify
This function actually runs a function of a given DSM.  Remove the
'_dsm' suffix to remove the inaccuracy and make things simpler.

Reviewed by:    obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56877
2026-05-13 14:38:24 +02:00
Olivier Certner 6da01f06ef acpi_spmc(4): Be less verbose by default
Do not print by default details of failures that are unlikely to help
a normal user and to have a crucial influence on whether suspension
works correctly.  Do so only on a verbose boot or if requested
explicitly by the user via 'debug.acpi.spmc.verbose'.

In particular:
- On an Intel Framework laptop, the Microsoft DSM only reports the
  SLEEP_ENTRY and SLEEP_EXIT functions.  That makes some sense since,
  according to its specification, all functions of a Microsoft DSM
  except these two are in fact redundant with Intel DSM's ones (also,
  that of AMD DSM's ones).  Those functions being missing are only
  a potential problem if there is no other DSM than Microsoft's (yet to
  be observed in the field).
- The details of malformed/unapplicable constraints or ones with a newer
  format the driver does not know about are not readily actionable
  pieces of information, but rather debug/developer-oriented ones.  When
  verbosity is not requested, only print the details of the first such
  failure to encourage reporting and at the same time avoid cluttering
  the output.
- Detecting and printing unknown DSM functions is not directly
  actionable either, and the driver not using these functions may not
  prevent suspending (but might, e.g., prevent reaching deeper sleep
  states).

Reviewed by:    obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56876
2026-05-13 14:38:24 +02:00
Olivier Certner 37c59fdc3b acpi_spmc(4): Add a sysctl knob to request verbosity
The driver will be more verbose on this knob being non-zero or
'bootverbose' being set.  The corresponding variable is typed as an
integer to leave room for expansion.  To be used in subsequent commits.

Reviewed by:    obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56875
2026-05-13 14:38:24 +02:00
Olivier Certner f56201cee3 acpi_spmc(4): acpi_spmc_probe_dsm(): Remove passing superfluous handle
The handle is already held by the softc, which is also passed.

No functional change (intended).

Reviewed by:    imp, obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56818
2026-05-13 14:38:24 +02:00
Olivier Certner 310cbb8924 acpi_spmc(4): Enable multiple instances
Support the (so far hypothetical) case of a machine with multiple
instances of the PNP0D80 device (e.g., if multiple DSMs are not
implemented on the same device), by allowing multiple instances of the
device to co-exist.

This is achieved by moving 'supported_functions' from 'struct dsm' into
the softc, so each instance has its own view of which functions are
supported.

Consequently, the check on the instance unit on probe can be removed.

Reviewed by:    imp (older version), obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56817
2026-05-13 14:38:23 +02:00
Olivier Certner 5ba100a35c acpi_spmc(4): Global message on constraints parsing failure
...in order to indicate to users that power state constraints will not
be checked at all.

Reviewed by:    imp, obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56816
2026-05-13 14:38:23 +02:00
Olivier Certner ee13d62417 acpi_spmc(4): Constraint parsing: Clearer error messages
Reviewed by:    imp, obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56815
2026-05-13 14:38:23 +02:00
Olivier Certner 0813dc0325 acpi_spmc(4): In-kernel strdup() cannot fail, remove dead code
No functional change (intended).

Reviewed by:    imp, obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56814
2026-05-13 14:38:22 +02:00
Olivier Certner 921a6d6c38 acpi_spmc(4): Gracefully support a standalone Microsoft DSM
In acpi_spmc_get_constraints(), stop assuming that if there is no AMD
DSM, then the Intel one is present.  Although this is likely to be the
overwhelming majority of cases on amd64, there is no technical reason
nor constraint in our code that really needs assuming that.  On (so far
hypothetical) machines with only the Microsoft DSM, this assumption
would cause a cryptic and irrelevant error message (and, prior to the
previous commit, a panic on INVARIANTS).

Warn the user if both the Intel and AMD DSMs are present, and use the
constraints reported by the Intel one (see the comment for why).

Reviewed by:    imp (older version), obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56813
2026-05-13 14:38:22 +02:00