Commit Graph

304169 Commits

Author SHA1 Message Date
Ed Maste 739750ae7c fdisk: Bump deprecated version in warning message as well
Fixes: f817f6e7f4 ("fdisk: Bump removal to FreeBSD 16.0")
Sponsored by:	The FreeBSD Foundation
2025-10-24 12:37:14 -04:00
Konstantin Belousov 5e85f383da vfs_syscalls.c::flags_to_right(): O_DSYNC should be allowed for CAP_FSYNC
Noted by:	arrowd
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D53315
2025-10-24 19:09:25 +03:00
Konstantin Belousov 4dbe662817 devfs: make destroy_dev() a release barrier for cdevpriv destructors runs
Ensure that all destructors for cdevpriv finished running before
destroy_dev() returns to the caller.  Otherwise, since
devfs_destroy_cdevpriv() removes the cdevpriv data from the list, drops
the cdevpriv_mtx, and then starts the destructor, it is possible for
destroy_dev() to return before destructor finished in other thread.

This should allow drivers to safely remove cdev instance data that might
be referenced by cdevpriv data.

Diagnosed by:	kevans
Reviewed by:	kevans, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D53303
2025-10-24 19:09:25 +03:00
Ed Maste 2387a51af2 getrlimitusage.2: Update HISTORY section
Add 14.2, as this was cherry-picked prior to release.

Reported by:	Harald Eilertsen
Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53320
2025-10-24 12:02:45 -04:00
Ed Maste f817f6e7f4 fdisk: Bump removal to FreeBSD 16.0
Removal did not happen prior to 15.0.

Sponsored by:	The FreeBSD Foundation
2025-10-24 11:10:00 -04:00
Mateusz Piotrowski a08b38dfce gpart.8: Document one of gpart destroy diagnostic message
Reviewed by:	ziaee
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D52992
2025-10-24 16:51:07 +02:00
Mateusz Piotrowski ae17bca63f geom: zero: Let sysctls .byte and .clear to be settable in loader
There is no reason to not allow kern.geom.zero.byte and
kern.geom.zero.clear to be settable as a tunable.

Reviewed by:	imp, markj
Approved by:	markj (mentor)
MFC after:	1 week
Event:		EuroBSDCon 2025
Differential Revision:	https://reviews.freebsd.org/D52763
2025-10-24 16:38:48 +02:00
Robert Clausecker c1135b2b54 lib/libmd: import aarch64 md5 SIMD implementation
Reviewed by:	andrew, imp
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D45670
MFC after:	1 month
2025-10-24 12:17:11 +02:00
Robert Clausecker d92e987421 lib/libmd: import md5 amd64 kernels
Differential Revision:	https://reviews.freebsd.org/D45670
Reviewed by:	imp
Approved by:	markj (mentor)
MFC after:	1 month
2025-10-24 12:17:05 +02:00
Robert Clausecker 90fa789cfa sys/crypto: import md5c.c C rewrite
The reimplementation is a bit cleaner than the original code,
although it is also slightly slower. This shouldn't matter too
much as we will have asm code for the major platforms.

The code is unrolled when built in the kernel or user space, but
not when in libsa, as to reduce the code size.

Differential Revision:	https://reviews.freebsd.org/D45670
Reviewed by:	jrtc27, imp
Approved by:	markj (mentor)
MFC after:	1 month
2025-10-24 12:16:58 +02:00
Robert Clausecker 73a9b273d3 sys: move sys/kern/md[45].c to sys/crypto
Both files are used by kernel and userspace.
Move them to sys/crypto where they belong.

No functional changes intended.

In preparation of D45670.

Reviewed by:	markj
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D52909
2025-10-24 12:16:46 +02:00
Robert Clausecker ec3242ed19 lib/libmd: fuz@freebsd.org -> fuz@FreeBSD.org
Approved by:	markj (mentor)
MFC after:	1 week
2025-10-24 12:16:21 +02:00
Konstantin Belousov cfb28c5ea0 amd64: print 'EFI RT fault' line before fault CPU state
Suggested by:	arrowd
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-10-24 12:46:47 +03:00
Poul-Henning Kamp 2612f1b864 deadfs: Return ENXIO instead of EIO when the device is gone.
One some systems, under some conditions, pulling a USB stick would
read(2) returning EIO and not ENXIO, like it should and used to.

Recoverdisk(1), which does not give up on EIO, like most programs
would, spins furiously.

Arguably, deadfs was always wrong in returning EIO, because once you
get to deadfs no operation will ever work again, but we used to
take a different path through devfs_vnops.c which got us the ENXIO.

Something changed recently, and while testing this fix, I noticed
that drm-kmod-66/i915kms may be the condition which trigger
the different code-path.

MFC to: stable/15
Fixes: 289785
Thanks to: imp, kib
2025-10-24 07:19:31 +00:00
Bryan Drewery 35f375549c cut: Avoid undefined behavior.
Summary: UBSAN complains about p[signed - unsigned] wrapping around.

Reviewed by:	kevans
Differential Revision: https://reviews.freebsd.org/D53226
2025-10-23 17:01:58 -07:00
Bryan Drewery 30394f3c87 clock_gettime(2): Remove unneeded trailing wording. 2025-10-23 17:01:58 -07:00
Bryan Drewery ab4abce6c2 pwait: Avoid calling getpid(2) for each proc. 2025-10-23 17:01:58 -07:00
David E. O'Brien d1ca01059d padlock(4)/nehemiah: move i386-only entropy source to MD files
Reviewed by: khng
Differential Revision:	https://reviews.freebsd.org/D53309
2025-10-23 16:17:19 -07:00
Cy Schubert 0d589ecbc7 ipfilter: Plug ip_htable kernel information leak
ipf_htable_stats_get() constructs an iphtstat_t on the stack and only
initializes select fields before copying the entire structure to
userland. The trailing padding array iphs_pad[16] is never initialized,
so ~128 bytes of uninitialized kernel stack memory can be leaked to user
space on each call. This is a classic information disclosure
vulnerability that can reveal pointers and other sensitive data.

We fix this by zeroing out the data structure prior to use.

Reported by:		Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed by:		emaste
MFC after:		3 days
Differential revision:	https://reviews.freebsd.org/D53275
2025-10-23 15:56:28 -07:00
Cy Schubert 6535e9308a ipfilter: Plug ip_nat kernel information leak
ipf_nat_getent() allocates a variable-sized nat_save_t buffer with
KMALLOCS() (which does not zero memory) and then copies only a subset
of fields into it before returning the object to userland using
ipf_outobjsz(). Because the structure is not fully initialized on all
paths, uninitialized kernel heap bytes can be copied back to user space,
resulting in an information leak.

We fix this by zeroing out the data structure immediately after
allocation.

Reported by:		Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed by:		emaste
MFC after:		3 days
Differential revision:	https://reviews.freebsd.org/D53274
2025-10-23 15:56:28 -07:00
Mark Johnston bbe65c5e8c release: Use PKG_CMD when installing pkgbase packages in vmimage.subr
This defaults to plain "pkg", but being able to override it is useful
when testing pkg itself.

Reviewed by:	cperciva
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53307
2025-10-23 22:41:51 +00:00
Bjoern A. Zeeb 76aed633b5 LinuxKPI: 802.11: additions for Linux v6.17 based wireless drivers
This includes the conflicting changes from previous driver versions
(v6.11/v6.14), mostly being function pointer or function arguments.

MFC after:	3 days
2025-10-23 21:26:07 +00:00
Bjoern A. Zeeb 14b53301e8 mt76: update Mediatek's mt76 driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
e5f0a698b34ed76002dc5cff3804a61c80233a7a ( tag: v6.17 ).

MFC after:	3 days
2025-10-23 21:26:07 +00:00
Bjoern A. Zeeb 354a030185 rtw89: update Realtek's rtw89 driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
e5f0a698b34ed76002dc5cff3804a61c80233a7a ( tag: v6.17 ).

MFC after:	3 days
2025-10-23 21:26:04 +00:00
Bjoern A. Zeeb eb15fdb1b7 rtw88: update Realtek's rtw88 driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
e5f0a698b34ed76002dc5cff3804a61c80233a7a ( tag: v6.17 ).

MFC after:	3 days
2025-10-23 21:26:02 +00:00
Bjoern A. Zeeb 6b627f8858 iwlwifi: update Intel's mvm/mld drivers
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
e5f0a698b34ed76002dc5cff3804a61c80233a7a ( tag: v6.17 ).

Some of the changes we reported upstream got incorporated in this
(or the v6.16) release.

This also includes a change from iwlwifi-next.git::next for missing symbols

iwl_mvm_v3_rate_from_fw() and iwl_mvm_v3_rate_to_fw() were originally
comitted to mvm/rs.[ch] which we do not have.  That left us with
unresolved symbols.  For the never comitted v6.16 driver update I had
started to piece these together but they have been migrated out to
utils.c so take them from there until the next release hopefully ships
this change.

Obtained from:	git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git
	branch next, 1b49af228594452206d5c50a33b6a341428edb63

MFC after:	3 days
2025-10-23 21:26:00 +00:00
John Baldwin b307799b51 closefrom_test: Fix the first test
The first test is supposed to close the new fd, but was instead not
closing anything.

Reviewed by:	ngie, markj
Fixes:		3cedbec3ee ("Integrate tools/regression/fifo into ...")
Differential Revision:	https://reviews.freebsd.org/D52799
2025-10-23 15:59:32 -04:00
Cy Schubert 8b29c373e6 unbound: Vendor import 1.24.1
Release notes at
	https://nlnetlabs.nl/news/2025/Oct/22/unbound-1.24.1-released/

Security:	CVE-2025-11411
MFC after:	3 days

Merge commit '73dd92916f532cb3fe353220103babe576d30a15'
2025-10-23 12:03:29 -07:00
Cy Schubert 73dd92916f unbound: Vendor import 1.24.0
Release notes at
	https://nlnetlabs.nl/news/2025/Oct/22/unbound-1.24.1-released/

Security:	CVE-2025-11411
2025-10-23 11:47:50 -07:00
David E. O'Brien 93b02f69a6 random: fenestrasX: Add missing entropy sources
Reviewed by: cem
Fixes: 1492c8c0d qcom_rnd: add initial qualcomm prng driver.
Fixes: 9eecef052 Add an Armv8 rndr random number provider
Fixes: b2f8b2dc8 sys: Add an SMCCC Random Number Generator driver
Differential Revision:	https://reviews.freebsd.org/D53292
2025-10-23 09:54:03 -07:00
David E. O'Brien 38e9d282cd random: fenestrasX: add RDSEED support
Reviewed by: cem
Fixes: 3a1298 random: add RDSEED as a provably unique entropy source
Differential Revision:	https://reviews.freebsd.org/D53291
2025-10-23 09:52:55 -07:00
Alan Somers 6d408ac490 fusefs: add a regression test for a cluster_read bug
VOP_BMAP is purely advisory.  If VOP_BMAP returns an error during
readahead, cluster_read should still succeed, because the actual data
was still read just fine.

Add a regression test for PR 264196, wherein cluster_read would fail if
VOP_BMAP did.

PR:		264196
MFC with:	62aef3f73f
Reported by:	danfe
Reviewed by:	arrowd
Differential Revision: https://reviews.freebsd.org/D51316
2025-10-23 07:40:56 -06:00
Sarah Walker f4f638eb23 arm64: Add additional fields for PMBSR and PMSIDR
Reviewed by:	andrew
Sponsored by:   Arm Ltd
2025-10-23 11:47:18 +01:00
Andrew Turner b157c28ce9 modules/dtb: Add the ARM dtb module
fvp-base-revc.dtb works with the kernel now interrupt-maps are
supported in more cases.

Reviewed by:	mhorne
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D51258
2025-10-23 11:47:05 +01:00
Andrew Turner 82778970ee share/mk: Add opencsd to the list of private libs
Reported by:	Sarah Walker <Sarah.Walker2@arm.com>
Reviewed by:	emaste
Fixes:	1c52229528 ("lib: Move libopencsd to /usr/lib and make private")
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D53217
2025-10-23 11:47:05 +01:00
Dag-Erling Smørgrav 4d5789532a w: Trim whitespace and commas from time and uptime
When producing formatted output, trim leading whitespace and trailing
commas from the human-readable time and uptime before emitting them.
The text output remains unchanged.

PR:		290089
Fixes:          6e6febb54d ("w: Fix idle time in json output, add login/idle times to json output")
Reviewed by:	marius.h_lden.org
Differential Revision:	https://reviews.freebsd.org/D53167
2025-10-23 12:29:01 +02:00
Michael Tuexen bfda98a420 tcp over udp: don't copy more bytes than avaiable
When copying the data in the first mbuf to get rid of the UDP
header, use the correct length. It was copying too much (8 bytes,
the length of the UDP header).
This only applies to handling TCP over UDP packets. The support for
TCP over UDP is disabled by default.

Reported by:		jtl
Reviewed by:		Peter Lei
MFC after:		3 days
Sponsored by:		Netflix, Inc.
2025-10-23 09:24:09 +02:00
Michael Tuexen c2b08c13c2 netstat: add support for UDP-Lite endpoints
With this patch UDP-Lite endpoints are also shown per default.

Reviewed by:		Nick Banks
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D53252
2025-10-23 09:15:22 +02:00
Michael Tuexen f48c6390dd sockstat: add support for UDP-Lite endpoints
With this patch UDP-Lite endpoints are also show per default.

Reviewed by:		Peter Lei, Nick Banks
MFC after:		3 days
Relnotes:		yes
Differential Revision:	https://reviews.freebsd.org/D53230
2025-10-23 09:12:32 +02:00
Michael Tuexen be93b27483 UDP-Lite: export pcblist via sysctl interface
Export the list of pcbs for UDP-Lite to be consumed by sockstat and
netstat.

Reviewed by:		Peter Lei, Nick Banks
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D53229
2025-10-23 09:10:03 +02:00
Jaeyoon Choi 131dc2b7ad MAINTAINERS: Add myself to ufshci
Sponsored by:           Samsung Electronics
Reviewed By: 		imp (mentor)
Differential Revision: 	https://reviews.freebsd.org/D53253
2025-10-23 03:14:22 +00:00
Mark Johnston fa240b7ff0 packages: Update the METALOG when (un)installing the caroot package
There may be other issues here but this change certainly seems to
be necessary.

PR:	290394
Reviewed by:	cperciva
Differential Revision:	https://reviews.freebsd.org/D53263
2025-10-22 16:14:47 -07:00
Jose Luis Duran f7ccf05101 mtree: Remove stray an (Aironet) directory
Reviewed by:	imp
Fixes:	663b174b5b ("an: Remove driver")
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D53265
2025-10-22 22:41:53 +00:00
Jose Luis Duran f942a74654 mtree: Remove stray wi directory
Reviewed by:	imp, emaste
Fixes:	a21def4d56 ("pccard: Remove wi(4) driver")
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D53264
2025-10-22 22:41:03 +00:00
Rick Macklem 3b6d4c6cdf nfs: Add support for the NFSv4 archive attribute
The archive attribute (UF_ARCHIVE) is listed as deprecated
in RFC8881.  However, the Windows NFSv4.1 client folk disagree
with this and say they need support for it.

This patch adds support for it, in a manner similar to what
is done for UF_SYSTEM and UF_HIDDEN.

MFC after:	2 weeks
2025-10-22 14:16:48 -07:00
Jessica Clarke 34e7a57673 krb5: Include <features.h> on Linux so __GLIBC__ can be checked
__GLIBC__ is not pre-defined by the toolchain, it comes from features.h,
so we need to make sure that's included by this point.

Fixes:	4dd2b869cd ("krb5: Fix -Wint-conversion when bootstrapping on GNU/Linux")
2025-10-22 21:06:02 +01:00
Ed Maste 69415879e9 src.opts.mk: Enable LLDB for 32-bit arm
It was previously disabled when we built for older 32-bit arm targets
which lack 64-bit atomics.  As we now support armv7 at a minimum there
is no need to disable LLDB.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52668
2025-10-22 16:03:40 -04:00
Jessica Clarke 4dd2b869cd krb5: Fix -Wint-conversion when bootstrapping on GNU/Linux
This shows up in GitHub Actions as a warning, and some compilers can
default to it being an error.
2025-10-22 20:50:50 +01:00
David E. O'Brien 283699338c random: garbage collect the RANDOM_PURE_OCTEON entropy source
It was used for Octeon MIPS and all producers have been removed
from the source tree.

Reviewed by: emaste
Differential Revision:	https://reviews.freebsd.org/D53146
2025-10-22 11:37:23 -07:00
Jose Luis Duran 74921426d5 bsdinstall: jail: Fix DISTMENU items
The menu was incorrectly using the fourth column (distname) instead of
the first (dist) of the MANIFEST.

The actual file name is on the first column of the MANIFEST file.
Remove the .txz part of the name to build the menu options.

Reviewed by:	jamie
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D53177
2025-10-22 18:22:44 +00:00