Commit Graph

309297 Commits

Author SHA1 Message Date
Mateusz Piotrowski 30f500e97b p9fs.4: MLINK to virtio_p9fs.4
Technically, virtio_p9fs is an emulated device that masquerades
as a p9fs mount, but it does not make sense to have two separate manual
pages.

Reviewed by:	bnovkov, dfr
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D57013
2026-05-18 11:12:12 +02:00
Bjoern A. Zeeb ca67cfa523 fwget: update realtek and intel pci entries
For Realtek we only add new entries.

For Intel the old way of extracting IDs from the driver no longer
works.  The new list is shortened as we drop more specific entries
which were already covered by wildcard entries.  The new lists are
also sorted within the groups.
There are 4 entries the new driver no longer carries but are still
present in older versions, so we keep them manually.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2026-05-17 23:37:12 +00:00
Bjoern A. Zeeb 4f6c60c3d3 iwlwifi: firmware: reduce script to extract fwget information
Due to driver changes it is no longer feasible to extract the full
PCI ID / firmware / card type information in one go as we used to
be able to.
We have already changed the way we extract firmware information for
ports and marked the iwlwififw.4 man page as obsolete.

Reduce the script to simply extarct the fwget(8) information and,
compared to the old times, sort each section so diffs will be easier
to see in the future.  This was particular helpful this time to make
sure we do not lose entries with the change of technique.

We also keep the script in the best perl spirit to do the job but
not to win a price, especially given it seems we have to change
matters every (other) year.

Given we can no longer extract firmware information for the PCI IDs,
we need to "manually" check against the ports that names match.
Ideally we will simplify things for everything "mld-only" one day
to only have a single firmware package for these (even if size
increases slightly).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2026-05-17 23:37:12 +00:00
Bjoern A. Zeeb 56460a6a42 rtw89: firmware: extend script to extract fwget entries
The so far so consistent (file)names got an outlier so add the
one character longer pattern as well to catch that.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2026-05-17 23:35:55 +00:00
Konstantin Belousov 8ad8643a66 ufs: ufs_bmap_seekdata() needs mapped buffer for scan
PR:	295348
Reported and tested by:	 Alastair Hogge <agh@riseup.net>
Reviewed by:	mckusick
Fixes:	bab04ddf1f ("ufs: support unmapped bufs for indirect blocks in bmap")
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57036
2026-05-18 01:09:26 +03:00
Koine Yuusuke 436f47a80c intelhfi: Add IA32_PM_ENABLE bit flag define
Reviewed by: Minsoo Choo <minsoo@minsoo.io>
Differential Revision: https://reviews.freebsd.org/D56919
2026-05-17 17:13:14 -04:00
Konstantin Belousov 56bc43f5d0 locking.9: warn about using sleepable lock address as a sleep channel
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D57012
2026-05-17 22:55:23 +03:00
Konstantin Belousov 7bdf2b5d5f nullfs: do not allow to mount a vnode over itself
This causes recursion in VFS that is not worth handling.

PR:	275570
Reported by:	Alex S <iwtcex@gmail.com>
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57043
2026-05-17 22:44:06 +03:00
Dag-Erling Smørgrav 363ea40c76 limits: Further RLIMIT_VMM cleanup
Teach limits(1), sh(1), and setclassresources(3) about RLIMIT_VMM.

Fixes:		1092ec8b33 ("kern: Introduce RLIMIT_VMM")
Reviewed by:	bnovkov
Differential Revision:	https://reviews.freebsd.org/D57031
2026-05-17 18:23:50 +02:00
Alan Somers 4cee16d471 linuxulator: fix SO_PEERCRED emulation after 1d24638d3e
For Linux binaries, sopt->sopt_td may be null.  And there's also no
need to check it, since struct l_ucred has the same layout on 32-bit
systems as on 64-bit ones.

PR:		295333
Reported by:	Miguel Gomes <miguel.dias.gomes@protonmail.com>
Fixes:		1d24638d3e ("Fix LOCAL_PEERCRED in 32-bit compat mode")
MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D57032
2026-05-17 06:49:23 -06:00
Andrey V. Elsukov 2872268c7f ipfw: treat ipv6 address with zero mask as 'any'
Make the behaviour similar for both IPv4 and IPv6. Also add
the corresponding tests.

PR:             294733
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56618
2026-05-17 13:12:20 +03:00
Konstantin Belousov 43a8585cb2 sys/mount.h: restore KNF_NOKQLOCK in VFS_KNOTE_{,UN}LOCKED() call to KNOTE()
ZFS needs to take internal sleepable lock in its implementation of
VOP_GETATTR().  Due to this, kq must be unlocked around calls to the vfs
filter methods.

Fixes:	1d5e4020e3 ("vnode: add VIRF_KNOTE flag")
Reported and tested by:	des
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-05-17 02:24:10 +03:00
Jose Luis Duran 3d246db083 blocklist: Add back probes
The banner exchange was moved to the sshd-auth process in upstream
commit bb781f02d4efd178e329a62a838962bee16e3e9b.  Add it back.

Add back fatal exit probe.

NetBSD PR:	bin/60270 (GNATS)
Reviewed by:	emaste
Fixes:		2574974648 ("OpenSSH: Update to 10.3p1")
Differential Revision:	https://reviews.freebsd.org/D57027
2026-05-16 22:00:02 +00:00
Konstantin Belousov 72ab129799 x86: remove sys/mount.h from genassym.c
The header is not needed, and causes some issues with build because it
requires vnode_if.h generated due to transient dependency from vnode.h.

While there, remove unneeded explicit sys/cdefs.h and sys/param.h usage.

Reported and tested by:		thierry
Fixes:	1d5e4020e3 ("vnode: add VIRF_KNOTE flag")
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-05-17 00:40:31 +03:00
Ryan Libby 755c1e039a kernel: address executable stack warnings in amd64 gcc build
Mark assembly files as not requiring executable stacks.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D56946
2026-05-16 13:24:45 -07:00
Ruslan Bukin 7eb71fd267 riscv: fix GENERIC-NODEBUG build
Reported by:	bz
2026-05-16 21:17:44 +01:00
Alex S 8dd43304b3 amd64/ptrace-sce-tamper test: get rid of PT_TRACE_ME
PT_TRACE_ME is only useful in combination with exec and there is no
exec in this test.

Signed-off-by:	Alex S <iwtcex@gmail.com>
MFC after:	1 week
2026-05-16 22:41:26 +03:00
Colin Percival 61df4be487 EC2: Don't enable firstboot_pkgs in small flavour
The EC2 "base" flavour installs the devel/py-awscli package at boot
time by default; we don't do this in the "small" flavour, so the
default behaviour was to update the FreeBSD-ports repository and
then do nothing with it.

Turn off firstboot_pkgs by default; if someone is using the "small"
flavour of AMIs and wants to install packages at instance launch
time, they simply need to add 'firstboot_pkgs_enable="YES"' to
/etc/rc.conf (which they must already be editing via user-data, in
order to provide the list of packages they want installed).

Sponsored by:	Amazon
MFC after:	3 days
MFC to:		stable/15
Relnotes:	EC2 "small" images now have firstboot_pkgs_enable="NO".
2026-05-16 12:18:52 -07:00
Dag-Erling Smørgrav 5f60d8a8f2 riscv: Add IOMMU to NOTES
Reported by:	bz, ivy
Fixes:		bcecad2c24 ("riscv: IOMMU support")
2026-05-16 20:33:37 +02:00
Dag-Erling Smørgrav 1dc1b95163 mtree: Remove unused MANSUBDIRs
MFC after:	3 days
Fixes:		809504f331 ("man: Kill off MANSUBDIRs")
Reviewed by:	ziaee
Differential Revision:	https://reviews.freebsd.org/D57029
2026-05-16 18:16:57 +02:00
Enji Cooper 1836330791 thunderbolt: make code -Wunused clean
This change modifies code paths and uses `__diagused` to address `-Wunused`
issues that occur when `THUNDERBOLT_DEBUG` == `0`.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D55575
2026-05-15 18:00:36 -07:00
Bjoern A. Zeeb 96eaa6857f net80211: define a type for rssi values
Due to net80211 keeping values in 0.5dBm relative to the noise floor
an int8_t is not good enough to prevent a double wrap around, which
means the reported rssi values can be wrong (see D50928 or likely
a commit in the future for more information).

In order to address the problem and not break the userspace API,
start by defining a type within the kernel and use that.  In a
next step we will then update the int8_t to int16_t to avoid the
problem up to the ioctl code.  This will then allow us to work
on the the user space API indepedently (see PR 293016 for possible
impact outside the base system).

No functional changes intended.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D57021
2026-05-15 21:59:07 +00:00
Bjoern A. Zeeb d201e4e849 wtap: use typed rssi and noise floor values
Adjust the rssi and nf arguments to typed int8_t and adjust the maths
for rssi to be consistant with what net80211 expects.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	lwhsu, adrian
Differential Revision: https://reviews.freebsd.org/D57020
2026-05-15 21:59:07 +00:00
Pouria Mousavizadeh Tehrani 355989b217 route.8: Describe weight modifier
Describe `-weight` argument in the route manual.

Reviewed by: glebius, ziaee
Differential Revision: https://reviews.freebsd.org/D56246
2026-05-16 00:59:49 +03:30
Bjoern A. Zeeb 0a2f7683bf man: iwlwifi/rtw88/rtw89: update man pages for Linux v7.0 based updates
For all:
- harmonize Copyright/license section according to style.9 and used
  SPDX only.
- mention that the current generation of the driver is based on
  Linux version 7.0.
- make linuxkpi.4 and linuxkpi_wlan.4 .Xr as the man pages do exist
  these days.

iwlwifi: update the card/chipset names supported (while we still can)
iwlwififw: leave a comment only that we can no longer update the
  man page and it will be removed in the future.
rtw88: update supported chipsets and add note to BUGS sections
rtw89: update supported chipsets and add note to BUGS sections

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	ziaee
Differential Revision: https://reviews.freebsd.org/D57019
2026-05-15 18:38:52 +00:00
Mariusz Zaborski 394f8ff461 jail: replace PR_ALLOW_ALL_STATIC hex constant with symbolic OR
No functional change intended.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D57014
2026-05-15 19:38:44 +02:00
Ed Maste 6531070132 openssh: Add reference for another local patch
A bug fix was committed locally and submitted upstream.  Document it in
our upgrade instructions, as these sometimes take a long time before
getting merged.

Sponsored by:	The FreeBSD Foundation
2026-05-15 12:19:49 -04:00
Christos Margiolis 9354e204f5 sound: Force-disable hw.snd.compat_linux_mmap by default
Eventually this hack will be removed, so start by disabling it by
default.

Sponsored by:	The FreeBSD Foundation
MFC after:	12 months
Reviewed by:	emaste
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/29
2026-05-15 17:08:11 +02:00
Christos Margiolis b9c10eeb38 sound: Improve hw.snd.compat_linux_mmap
- Reject PROT_EXEC in all cases when Linux support is not compiled in.
- Define sysctl only when Linux support is compiled in.
- Document better.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	emaste
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/29
2026-05-15 17:08:11 +02:00
ShengYi Hung 776584319f sound: Fix lock order reversal in dsp_poll()
chn_poll() may hold both rdch and wrch channel locks while calling
chn_trigger(rdch).  chn_trigger() switches the lock order from
"channel -> dsp dev" to "dsp dev -> channel" by temporarily dropping
the channel lock before acquiring the dsp lock.

However, only rdch was unlocked during the transition while wrch
remained locked. Since wrch is also a channel lock and witness had
already established the lock order requirement:

    dsp dev -> channel

witness reports a lock order reversal when pcm_lock() is acquired while
wrch is still held.

Avoid holding rdch and wrch simultaneously during chn_trigger()
lock-order switching by only keeping the channel locks when needed.

The issue can be reliably reproduced by starting pipewire,
pipewire-pulse, and pavucontrol.

Reviewed by:    christos
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57009
2026-05-15 22:52:48 +08:00
Alexander Ziaee bcd50fe5c3 style.mdoc: Explain why not to abuse Nm
MFC after:		3 days
Reviewed by:		0mp
Differential Revision:	https://reviews.freebsd.org/D55299
2026-05-15 08:50:42 -04:00
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