Commit Graph

309195 Commits

Author SHA1 Message Date
Simon J. Gerraty 1729d2f741 Merge bmake-20260508
Merge commit 'ef402bba84260816d3e8d6e2439b0bc7eddc9446'
2026-05-12 21:26:44 -07:00
Simon J. Gerraty ef402bba84 Import bmake-20260508
Intersting/relevant changes since bmake-20260313

ChangeLog since bmake-20260313

2026-05-08  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20260508
	Merge with NetBSD make, pick up
	o make.1: fix description of '-' handling in jobs-mod
	by intenting it correctly.

2026-04-13  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20260406
	Merge with NetBSD make, pick up
	o cleanup unnecessary parens

	* configure.in: add --with-save-dollars to control default for
	.MAKE.SAVE.DOLLARS - address FreeBSD PR 294436

mk/ChangeLog since bmake-20260313

2026-05-09  Simon J Gerraty  <sjg@beast.crufty.net>

	* gendirdeps.mk: also apply ':S,/$,,' and ':C,/(\.[^.]*)$,\1,'
	when setting DIRDEPS prior to saving.

	* dirdeps.mk: when debugging it is handy to be able to skip
	recursing so if DEBUG_DIRDEPS contains 'norecurse' we will only
	process the immediate DIRDEPS.
	Also if DEBUG_DIRDEPS contains '-V' we process sections normally
	skipped when doing 'make -V'.
	o ensure we do not get duplicate build dirs due to someone
	adding a trailing '/' or '/.${TARGET_SPEC}' to a DIRDEPS entry.
	Add ':S,/$,,' when setting '__depdirs' and
	add ':C,/(\.[^.]*)$,\1,' when setting '__qual_depdirs'.

2026-04-24  Simon J Gerraty  <sjg@beast.crufty.net>

	* install-mk (MK_VERSION): 20260424

	* Use MK_META_AUTODEP to control use of meta.autodep.mk
	so it can be used independently of MK_DIRDEPS_BUILD for
	bootstrapping.

	* sys.vars.mk (M_type): use :sh rather than :sh1 to avoid
	surprises in a .for loop.
2026-05-12 21:20:50 -07:00
Philip Paeps 9cc9b8b372 contrib/expat: import expat 2.8.1
Changes: https://github.com/libexpat/libexpat/blob/R_2_8_1/expat/Changes

Security:	CVE-2026-45186
MFC after:	1 week
2026-05-13 11:26:56 +08:00
Philip Paeps e3c0f2f399 Vendor import of expat 2.8.1 2026-05-13 11:13:20 +08:00
Ed Maste eacf4f50bf u3g: Add Telit LM960A18 LTE modem
The patch in the PR failed to apply, so I manually applied the same
changes.

PR:		295231
Submitted by:	Mike Tancsa <mike@sentex.net>
Reviewed by:	emaste
2026-05-12 20:36:39 -04:00
Ed Maste e6475c8f35 Cirrus-CI: Bump toolchain to LLVM 21
Cirrus-CI is shutting down at the end of the month, but we can still
finish with an up-to-date working build with an LLVM version matching
the in-tree toolchain.

Sponsored by:	The FreeBSD Foundation
2026-05-12 20:29:30 -04:00
Ed Maste b76b05c04c pam_ssh: Fix build - chase OpenSSH function signature change
Reported by: dch
Fixes: 644b4646c7 ("OpenSSH: Update to 10.1p1")
Sponsored by: The FreeBSD Foundation
2026-05-12 18:51:00 -04:00
Ed Maste e68aa5ab80 OpenSSH: Update to 10.2p1
Full release notes are available at
https://www.openssh.com/txt/release-10.2

Selected highlights from the release notes:

Bugfixes
--------

 * ssh(1): fix mishandling of terminal connections when
   ControlPersist was active that rendered the session unusable.
   bz3872

Sponsored by:	The FreeBSD Foundation
2026-05-12 21:12:09 +00:00
Ed Maste 644b4646c7 OpenSSH: Update to 10.1p1
Full release notes are available at
https://www.openssh.com/txt/release-10.1

Selected highlights from the release notes:

Potentially-incompatible changes

 * ssh(1): add a warning when the connection negotiates a non-post
   quantum key agreement algorithm.

 * ssh(1), sshd(8): major changes to handling of DSCP marking/IPQoS

 * ssh(1), sshd(8): deprecate support for IPv4 type-of-service (ToS)
   keywords in the IPQoS configuration directive.

 * ssh-add(1): when adding certificates to an agent, set the expiry
   to the certificate expiry time plus a short (5 min) grace period.

 * ssh-agent(1), sshd(8): move agent listener sockets from /tmp to
   under ~/.ssh/agent for both ssh-agent(1) and forwarded sockets
   in sshd(8).

Security

 * ssh(1): disallow control characters in usernames passed via the
   commandline or expanded using %-sequences from the configuration
   file, and disallow \0 characters in ssh:// URIs.

New features

 * ssh(1), sshd(8): add SIGINFO handlers to log active channel and
   session information.

Sponsored by:	The FreeBSD Foundation
2026-05-12 20:24:10 +00:00
Mark Johnston beab4a237a igmp: Avoid leaving dangling pointers in the state-change queue
When igmp_v3_merge_state_changes() is iterating over state-change
packets, there is a case where it'll free a queued packet but will fail
to remove it from the queue.  Fix that.

Reported by:	Yuxiang Yang, Yizhou Zhao, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM5.1 from Z.ai
Reviewed by:	pouria, glebius
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56947
2026-05-12 20:05:19 +00:00
Mark Johnston a6c4fe2d1a if_vxlan: Update *m0 after a pullup
vxlan_input()'s caller is supposed to free *m0 if it is non-NULL after
the function returns.  vxlan_input() failed to update *m0 after the
pullup however, so if it hits an error case after the pullup, we'll free
the mbuf twice.  Currently this can happen only if the interface is
brought down or due to a packet loop.

Reported by:	Yuxiang Yang, Yizhou Zhao, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM5.1 from Z.ai
Reviewed by:	pouria, zlei
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56944
2026-05-12 20:05:19 +00:00
Mark Johnston 8b4b995eff cpuset: Move userspace declarations out of _cpuset.h
The _*.h headers are for structure definitions and should avoid
dependencies on other headers.  This convention is violated by using
__BEGIN_DECLS/__END_DECLS.

Move the declarations to cpuset.h, I see no reason they can't be there.

Reviewed by:	olce, brooks, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56856
2026-05-12 20:05:19 +00:00
Mark Johnston 271d25a066 libufs: Avoid using param.h constants in libufs.h
MAXBSIZE is defined in param.h, which defines many other things.  To
avoid forcing all consumers of libufs.h to include param.h, let's
instead redefine it and verify the definition in inode.c.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56859
2026-05-12 20:05:19 +00:00
Mark Johnston 3cd3900b69 fsck_ffs: Avoid relying on param.h pollution from libufs.h
- gjournal.c needs param.h to get a definition of isclr().
- fsck.h needs signal.h for sig_atomic_t.

Sort includes while here.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56858
2026-05-12 20:05:19 +00:00
Mark Johnston 237900f17f libutil: Include param.h in quotafile.c
Required for MAXPATHLEN.

MFC after:	1 week
2026-05-12 20:05:19 +00:00
Mark Johnston 9461071d5c reboot: Include limits.h for PATH_MAX
MFC after:	1 week
2026-05-12 20:05:19 +00:00
Mark Johnston ee2d1a1a5a edquota: Include param.h
Required for MAXPATHLEN and MAXLOGNAME.

MFC after:	1 week
2026-05-12 20:05:19 +00:00
Mark Johnston fae5815a1d hastd: Include param.h instead of relying on pollution in hooks.c
This is needed at least for MAX() and PATH_MAX.

MFC after:	1 week
2026-05-12 20:05:18 +00:00
Mark Johnston 5615db1007 find: Include signal.h to get a definition for sig_atomic_t
MFC after:	1 week
2026-05-12 20:05:18 +00:00
Mark Johnston fab4acbb7d vmem: Include param.h in the userspace port as well
It is required at least for NBBY.

MFC after:	1 week
2026-05-12 20:05:18 +00:00
Mark Johnston 35a36d4a54 mdo: Avoid relying on header pollution
The uses of PAGE_SIZE and roundup2() require param.h.

MFC after:	1 week
2026-05-12 20:05:18 +00:00
Mark Johnston 3b16e96b00 tests/ip_mroute: Remove test timeouts
The configured timeout of 30s is a bit too low for a couple of tests
which create 4+ VNET jails when running tests in parallel and with
kernel sanitizers enabled.  There's no reason to have custom timeouts,
just use the default.

MFC after:	1 week
2026-05-12 20:05:18 +00:00
Mark Johnston 26bffe5695 tests/tcp_hpts_test: Fix more resource leaks
Address leaks that I missed in commit f7bf9fd619
("tests/tcp_hpts_test: Fix resource leaks").

Reviewed by:	Nick Banks <nickbanks@netflix.com>, tuexen
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56943
2026-05-12 20:05:18 +00:00
Nick Banks d1aee9f153 sys/time.h: add bintime2us() helper
Add a microsecond conversion helper to complement the existing
bintime2ns(). The body mirrors bintime2ns().
This will be used by an upcoming eventlog(9) framework as well as
the TCP code in upcoming changes.

Approved by:		gallatin, tuexen
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D56972
2026-05-12 21:26:24 +02:00
Mateusz Piotrowski 03bc95b060 dtrace_dtmalloc.4: Document the DTrace dtmalloc provider
MFC after:	1 week
Discussed with:	christos, markj, ziaee
Differential Revision:	https://reviews.freebsd.org/D51396
2026-05-12 20:03:11 +02:00
Ed Maste e68433e199 sys: Fix heap disclosure in compat7 kern.proc.filedesc sysctl
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56976
2026-05-12 13:59:51 -04:00
Sarah Walker a6add87b5e arm64: Load SOCDEV_PA as a literal rather than an immediate
When EARLY_PRINTK is used in a realm environment, the UART physical
address must be in the unprotected address space. The resulting
physical address will not generally fit in an immediate, so use a
literal instead.

Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D56600
2026-05-12 17:54:41 +01:00
Sarah Walker 56abdbc5f7 arm64: VM/PMAP changes for CCA guest support
When in a realm:

- Mappings with mode VM_MEMATTR_DEVICE and VM_MEMATTR_DEVICE_NP are
  unprotected
- Imported busdma buffers in protected memory are always bounced
- If EARLY_PRINTK is in use, the UART physical address must be in the
  unprotected address space

Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D56599
2026-05-12 17:54:41 +01:00
Sarah Walker 76a2904c35 arm64: Add RSI detection for CCA
Detect the presence of the Realm Services Interface (RSI). This detection is
performed early in bootup; PSCI initialisation has been moved to initarm() to
faciliate this.

Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D56598
2026-05-12 17:54:40 +01:00
Sarah Walker f9ba99eaa2 physmem: Add a way to read all memory
In Arm CCA we need to find all memory to protect it. This needs to find
all memory, ignoring any excluded memory to protect it from the host.

Add physmem_all that reads all physical memory regions.

Co-developed-by: Andrew Turner <andrew@> (writing tests & commit message)
Sponsored by:	Arm Ltd
2026-05-12 17:54:40 +01:00
Sarah Walker cd2512eaab vm: Add flags for unprotected allocations
Unprotected allocations are intended to be accessible outside of the current
VM on systems such as Arm CCA.

Reviewed by:	markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D56518
2026-05-12 17:54:40 +01:00
Aleksandr Rybalko 8db0553ed6 vt: Clear cut-paste selection if the area intersects with the filled region
* cut-paste buffer stays unchanged

PR:		260069
Reported by:	emaste

Reviewed by:	imp
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D56922
2026-05-12 18:56:20 +03:00
Chuck Tuffli 346be36e88 smart: Merge smart 1.0.3
Merge commit 'd2d20bb5099dc1c443a4b783d43b8a45338c85d2'
2026-05-12 07:33:03 -07:00
Alan Somers dc14ae4217 bsdinstall: do pkgbase installations with the "script" command
"bsdinstall script" will now do a pkgbase installation by default.  The
system components to install can be specified in the COMPONENTS
variable, and have the same names as those used in the interactive
installer.  bsdinstall will still do a legacy distset installation if
DISTRIBUTIONS is defined in the installerconfig file.

MFC:		1 week
PR:		290375
Sponsored by:	ConnectWise
Reviewed by:	ziaee, ivy, jduran
Differential Revision: https://reviews.freebsd.org/D56717
2026-05-12 08:13:16 -06:00
Brian Scott dab8138e13 g_part,mkimg: Add additional GPT partition types
Add the hifive-fsbl, hifive-bbl, and xbootldr aliases to mkimg(1).
Add the xbootldr alias to geom(4), and thus gpart(8).

The "hifive" partition types are defined and used by various RISC-V SBCs
for locating firmware.

"xbootldr", or the Extended Boot Loader Partition is defined here:
https://uapi-group.org/specifications/specs/boot_loader_specification/

Reviewed by:	emaste, markj, mhorne
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56784
2026-05-12 11:00:10 -03:00
Brian Scott 351fad05e0 if_eqos_starfive: Read MAC address from device tree
u-boot/opensbi determines the ethernet MAC address from ROM and passes
it to the OS in the device tree. This change sets the correct MAC
address from this source. This prevents the eqos class driver from
generating random MAC addresses at each boot.

Tested on Starfive VisionFive 2, riscv64 SBC.

Reviewed by:	mhorne
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56782
2026-05-12 11:00:10 -03:00
Chuck Tuffli d2d20bb509 Import smart revision 1.0.3
Fixes armv7 and gcc14 build issues.
2026-05-12 06:35:31 -07:00
Andrew Gallatin 23b263dfbf Revert "mlx5e: Ensure rx timestamps are monotonically increasing"
This reverts commit ce33f96fcf.

It turns out that doing it this way did indeed prevent backwards
movement of timestamps, however it also lead to an ever increasing
error, eventually yielding timestamps hundreds or thousands of
seconds in the future.

Back this out until we can come up with a solution that prevents
backards timestamps and also avoids accumulating error.

Sponsored by: Netflix
2026-05-12 08:55:54 -04:00
Andrew Gallatin 9f69446d45 lacp: fix link state with multiple aggregators
When we have multiple aggregators, the link state should reflect the
state of the active aggregator.

This change was prompted by a script pruning 10GbE interfaces from an
lacp bundle with 100GbE interfaces. Mixing speeds like this creates multiple
aggregators.  When the last 10GbE interface was removed, lagg0 would loose
link because the current aggregator's port count would drop to 0, even
though the 100GbE aggregator had active ports. This left the system in a
hard to diagnose state where lagg0 reported "active", but all outgoing
IP traffic was dropped, due to the RT_LINK_IS_UP() check noticing lagg0's
if_link_state was marked as down.

Reviewed by: zlei
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D56579
2026-05-12 08:52:24 -04:00
Ruslan Bukin bcecad2c24 riscv: IOMMU support
Support for RISC-V IOMMU spec v1.0.1 (ratified)
  https://github.com/riscv-non-isa/riscv-iommu

Supports translation for PCI devices only.
Supports 1 or 2-level device-directory-table (DDT).
Supports SV39 and SV48 virtual memory system (on per-device basis).
Supports both "standard" and "extended" device-context (DC) structure.
Supports "bypass" mode to disable translation for a particular device.
Supports WSI (Wire-Signalled Interrupts) only.

This includes both PCI-bus and FDT attachment drivers.

Note in case of PCI-bus attachment, interrupts are not available. In this
case no error report is provided in case of translation fault. Otherwise
interrupts are not needed.

Differential Revision:	https://reviews.freebsd.org/D55922
2026-05-12 11:11:32 +01:00
Aymeric Wibo 6f451c6091 power: Rename power transition enum
Just so it isn't so long.  Changing now before the API freezes, after
discussion with olce@.

While here, improve the wording in the comments for power transitions
and sleep types a bit.

Reviewed by:	olce
Approved by:	olce
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D56953
2026-05-12 10:46:24 +01:00
Baptiste Daroussin 8b70a203be nuageinit: fix command injection and related issues
- Add shell_escape() helper to safely escape shell arguments
- Apply shell_escape to all user-controlled values in shell commands:
  adduser (usershow, useradd, lock, primary_group, groups)
  addgroup (groupshow, groupadd, members)
  exec_change_password (usermod)
  settimezone (tzsetup root and timezone)
  install_package (pkg package names)
- Escape double quotes in hostname when writing rc.conf.d/hostname
- Add missing 'local' declaration for resolvconf_command in nameservers()
- Escape interface name in resolvconf -a command
- Change open_resolvconf_conf() from 'w' to 'a' mode to prevent
  data loss when nameservers() is called multiple times
- Clean up stale resolvconf.conf at the start of each boot
  (skip on postnet to preserve config written by first call)

MFC After: 1 day
2026-05-12 09:52:32 +02:00
Boris Lytochkin 3d39eadcde ipfw: fix IPv6 flow label matching
* do not require just only ip6 proto for flow-id opcode in ipfw(8).
  ipv6-icmp, tcp, udp should be fine too.
* fix off-by-one bug leading to out-of-bounds read.
* apply IPV6_FLOWLABEL_MASK before comparison in flow6id_match(),
  so flow-id opcode will match a specified flow label. No need to
  take protocol version and traffic class into account.
* add the test to verify that opcode is working correctly.

Reviewed by:	pouria
Obtained from:	Yandex LLC
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56869
2026-05-12 10:44:10 +03:00
Raphael 'kena' Poss e26b5e0749 spkr.4: Reflect latest changes and add history
- speaker(4) was recently modernized to lock the driver per-playback
  instead of per-open. Update the man page to explain this change.

- added a reference to MML and SMX in the historical context to make
  it easier for users to find additional documentation online.

Signed-off-by:	Raphael Poss <knz@thaumogen.net>
Reviewed by:	ziaee
Closes:		https://github.com/freebsd/freebsd-src/pull/2183
2026-05-11 23:14:16 -04:00
Ed Maste a3036edd02 if_media: Claim 10BASE-T1S and 10BASE-T1L constants
These are two single-pair Ethernet (SPE) variants that run at 10 Mbps.
10BASE-T1S has automotive origins and supports multiple nodes on up to
25m of cable.  10BASE-T1L is intended for building and industrial
automation and supports long-distance point to point links of over 1km.

Reviewed by:	kbowling
Differential Revision: https://reviews.freebsd.org/D56952
2026-05-11 20:01:04 -04:00
Jung-uk Kim 7697e6c4df acpica: Merge ACPICA 20260408
Merge commit '69ae37302ee98839857791a261546e19d078cdb8'
2026-05-11 19:29:58 -04:00
Chuck Tuffli 25942dddc8 smart: Connect contrib/smart to build
Reviewed by:	fuz, jrm
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D56638
2026-05-11 15:18:52 -07:00
Chuck Tuffli 7419d6e463 Add 'contrib/smart/' from commit 'eb3b1302382b1d0cbe37eeebabfcdd546aa2fc4e'
git-subtree-dir: contrib/smart
git-subtree-mainline: 95b4436e98
git-subtree-split: eb3b130238
2026-05-11 14:50:04 -07:00
Jung-uk Kim 69ae37302e Import ACPICA 20260408 2026-05-11 17:41:03 -04:00
Aymeric Wibo 95b4436e98 power: Rename sleep types
Make sleep type names clearer and more consistent, and allow space for
something like "os_hibernate" once that gets added to FreeBSD.

Reviewed by:	jaeyoon, olce, markj
Approved by:	jaeyoon, olce, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D56920
2026-05-11 18:11:39 +01:00