Commit Graph

309712 Commits

Author SHA1 Message Date
Kyle Evans 31a94ec32b pci: pci_host_generic: provide cleanup methods outside of detach
If device_attach() fails, we're expected to actually cleanup after
ourselves because device_detach() will not be called.  Factor out the
cleanup bits that don't rely on attach having actually succeeded so
that we can cleanup properly in bcm2838_pci.

Reviewed by:	andrew, imp
Differential Revision:	https://reviews.freebsd.org/D56896
2026-06-04 00:14:58 -05:00
Kyle Evans b230a7b9a5 kern: ofw: provide ofw_bus_destroy_iinfo to teardown interrupt-map
For symmetry with ofw_bus_setup_iinfo, the next commits will use it to
properly cleanup on failure in bcm2838_pci.

Reviewed by:	andrew
Differential Revision:	https://reviews.freebsd.org/D56895
2026-06-04 00:14:42 -05:00
Rick Macklem 72e57bc264 nfsd: Add support for striped Flexible File layout
Without this patch, the NFSv4.1/4.2 pNFS server configuration
did not support striping.  This was mainly because the Linux
client driver did not support it either.  The Linux client
driver for Flexible File layout does now support striping.
(Linux kernel version 6.18 or newer)

As such, this patch adds striping support.  The configuration
is currently just two new sysctls called
vfs.nfsd.pnfsstripeunit - Size (in bytes) of a stripe
vfs.nfsd.pnfsstripecnt - # of DSs to stripe across
A setting of 0 for the first sysctl and 1 for the second
disables striping.  A patch that allows use of a different
striping configuration for each exported MDS file system
is planned for the future.

The pnfsdscopymr may be broken by this patch, but since
no one reported that they were actually using a pNFS server
configuration, I do not believe that will be a problem at
this time.

Until the FreeBSD NFSv4.1/4.2 client is patched to handle
striped flexible file layouts, mounts to a striped pNFS
configuration must be done without the "pnfs" mount option.
(Linux systems with a kernel version of 6.18 or newer
should be able to handle a striped pNFS configuration.)

Future patches that convert the pNFS server to a
"loosely coupled" configuration (which allows the use
of non-FreeBSD servers as DSs) are anticipated.
2026-06-03 18:28:56 -07:00
Sourojeet A 67df313015 linuxkpi: Make pm_qos.h self-contained
Include <linux/types.h> for `false`.  This is needed by amdgpu somewhere
between Linux 6.12 and 6.15.

Reviewed by:	Minsoo Choo <minsoo@minsoo.io>, bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57415
2026-06-03 19:40:55 -04:00
Jilles Tjoelker 73e0d6b440 tests: Avoid sleep when causing a write error
Cause a write error using a fifo and wait, rather than needing a sleep
to wait for something to terminate. This is faster and avoids a
potential test failure on a heavily loaded system.

Using /dev/full would be simpler, but it is not portable enough (it
tends not to be available in jails, even). Starting programs with stdout
not open or only open for read/execute/search may have unexpected side
effects.

Reviewed by:	ngie, des
Differential Revision:	https://reviews.freebsd.org/D57213
2026-06-04 00:10:08 +02:00
Jilles Tjoelker 8bf4902569 diff: Correct fd 0 case on pipe
After git commit c8d40bf8ec, if fd 0 was
not open, it is left with CLOEXEC set and therefore fails. This is an
unlikely situation, but fixing it reduces the size of the code (by using
posix_spawn_file_actions_adddup2's special case if the two file
descriptor numbers are the same).

At the same time, check the error code from
posix_spawn_file_actions_adddup2.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D56910
2026-06-03 22:50:38 +02:00
Ed Maste 248dd56d2d install.1: Convert link flags to a table
The five link flags get lost in prose.

Reviewed by:	ziaee
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57418
2026-06-03 16:45:13 -04:00
Ed Maste b49021b49a install.1: Document options incompatible with -s
Reported by:	des
Reviewed by:	ziaee
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57409
2026-06-03 16:34:19 -04:00
Rick Macklem 07d733963e nfs_clrpcops.c: Change initial layout type to flex files
Since the File 4.1 layout is only supported by some
large configurations of Netapp Filers, switch the client
pNFS code to attempting to use Flexible File Format first.

File 4.1 Layout should still work for any servers that do
no support Flexible File Layout.
2026-06-03 12:04:59 -07:00
Olivier Certner 9a133eee1e thunderbolt: Fix INVARIANTS compilation
The problem is that THUNDERBOLT_DEBUG triggers the use of some
variables, but it is independent of INVARIANTS and the variables it uses
were tagged with '__diagused'.

Fix this by using '__maybe_unused' in those places.

Fixes:          1836330791 ("thunderbolt: make code -Wunused clean")
Fixes:          886164895f ("amd64: complete thunderbolt KERNCONF integration")
Sponsored by:   The FreeBSD Foundation
2026-06-03 17:59:57 +02:00
Ed Maste 521afce6a8 xinstall: Do not allow -l and -s together
Cannot strip the target if creating a link.

Reviewed by:	des
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57398
2026-06-03 11:33:05 -04:00
Ed Maste 4908bea5b7 xinstall: Add test for -d -s not allowed together
Reviewed by:	des
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57403
2026-06-03 11:33:05 -04:00
Olivier Certner ce243df20a i386: Fix build (of 'genassym.o')
i386's genassym.c needs to define some assembly symbols holding the size
of NFS structures to support NFS_ROOT while booting with a nfs_diskless
structure.  For this, it needs to include a few NFS headers, which
require definitions from <sys/mount.h> (fhandle_t, vfs_init_t), which
was removed by commit 72ab129799 ("x86: remove sys/mount.h from
genassym.c").

Since recently, <sys/mount.h> has been including <sys/vnode.h>, so needs
"vnode_if.h" to have been generated for the compilation of 'genassym.o'
not to fail.  Make sure this is the case (for all architectures for
simplicity) by tweaking the rule for 'genassym.o' in
'sys/conf/kern.post.mk', leaving a comment there so that it can be
removed when i386 is dropped (or if the above-mentioned dependency is
broken).

Fixes:          72ab129799 ("x86: remove sys/mount.h from genassym.c")
Sponsored by:   The FreeBSD Foundation
2026-06-03 17:02:39 +02:00
Kristof Provost 3d9cd10b28 pfdenied: fix checking root anchor
pfctl doesn't like empty anchors (-a ''), but we can specify the root
anchor as '/' too, so do that instead.

PR:		295324
Tested by:	Paweł Krawczyk
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-06-03 10:52:06 +02:00
Ishan Agrawal 017690e509 netpfil: add PF netlink command decoding support
Convert PFNL_CMD values in pf_nl.h from an enum to #define constants,
add a pfnl_cmd table definition for mktable, and implement the
corresponding command decoding helpers in libsysdecode.

This allows mktable to generate PF netlink command lookup tables and
enables symbolic decoding of PF netlink commands.

Reviewed by:	kp
Signed-off-by:	Ishan Agrawal <iagrawal9990@gmail.com>
Sponsored by:	Google LLC (GSoC 2026)
2026-06-03 10:52:06 +02:00
Navdeep Parhar 309fc9f765 cxgbe(4): Use correct FID in KTLS tx work requests
MFC after:	1 week
Sponsored by:	Chelsio Communications
2026-06-02 23:38:07 -07:00
Navdeep Parhar 4b6887e386 cxgbe(4): Do not read indirect INT_CAUSE registers directly
Some of the registers added in a172f9e5b3 are not directly accessible
and should be avoided.

Fixes:		a172f9e5b3 cxgbe(4): Improvements to the slow interrupt handler
MFC after:	1 week
Sponsored by:	Chelsio Communications
2026-06-02 23:36:34 -07:00
Navdeep Parhar c029d04671 cxgbe(4): Use backdoor access to read SGE context on T7
This avoids a firmware bug where it crashes when accessing SGE context
on a secondary core.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2026-06-02 23:25:15 -07:00
Enji Cooper 886164895f amd64: complete thunderbolt KERNCONF integration
This completes the work so the driver can be integrated into KERNCONFs
properly on amd64.

MFC after: 1 month

Differential Revision:	https://reviews.freebsd.org/D55573
2026-06-02 23:02:01 -07:00
Abdelkader Boudih a48b900300 asmc: add MMIO backend for T2 Macs
T2 Macs (2018+) expose the SMC via memory-mapped registers instead of
I/O ports. Add asmcmmio.c/asmcmmio.h implementing the MMIO transport:
key read/write, getinfo, getbyindex, and a poll-based wait with
exponential backoff.

The driver probes for MMIO at attach time by checking the LDKN firmware
version key; if MMIO is available it is used, otherwise the standard
I/O port backend is used.

T2 fan speeds use IEEE 754 floats instead of fpe2 fixed-point.
Per-fan manual mode uses F%dMd keys instead of the FS! bitmask.
Battery charge limit is exposed via dev.asmc.N.battery_charge_limit.

Tested on:
  MacBookPro16,2 (A2251, iBridge2,10)
  MacBookPro15,4 (A2159, iBridge2,8)
  MacBookAir8,2  (A1932, iBridge2,5)
  Mac mini 8,1   (A1993, iBridge2,7)
  iMac20,2       (A2115, iBridge2,16)
  iMacPro1,1     (A1862, iBridge1,1)

MFC after:	2 weeks
Reviewed by:	ngie, adrian
Differential Revision:	https://reviews.freebsd.org/D57086
2026-06-02 22:59:55 -07:00
Xin LI e949ce9dc0 MFV: file 5.47.
MFC after:	3 days
2026-06-02 21:54:25 -07:00
Xin LI 79746c47b9 Vendor import of file 5.47. 2026-06-02 21:37:29 -07:00
Andrew Gallatin e98ed8d99f lacp: Simplify lacp_compose_key()
lacp uses interface speed to separate lacp members into different
aggregation groups.  It wants to use the lower 4 bits of the key
to represent the speed.   This change fixes a few bugs around that:

1) Actually use the baud rate reported by the interface as the speed
  (and fall back to use the baudrate associated with the media if
   the interface somehow doesn't support if_baudrate)

2) Compressess the baud rates down to the 4 bits reserved for them.
   Using things like FM_400G_FR8 does not fit in 4 bits (its value
   is 0x1811) . In fact, interfaces faster than 1Gb/s don't fit in
   4 bits using the old scheme

3) Emits a warning on the console once per boot if it encounters a
   NIC with an unsupported speed to make it slightly more obvious
   why LACP might not behave as expected.

This was prompted by a 400g nic with a broken media detection
reporting "unknown" as its speed, and being unable to be in the
same aggregation group with a different 400g nic that was properly
reporting its speed.

Sponsored by: Netflix
Differential Revision:	https://reviews.freebsd.org/D57026
Reviewed by: slavash
2026-06-02 18:49:25 -04:00
Jitendra Bhati 940142d610 lib/libc/tests/gen: add fts_set() tests
Add ATF test cases for fts_set():

fts_set:
- invalid instruction returns non-zero with EINVAL
- FTS_AGAIN revisits the current node
- FTS_AGAIN consecutive visits node three times
- FTS_FOLLOW on symlink to file yields FTS_F
- FTS_FOLLOW on symlink to directory causes descent
- FTS_FOLLOW on dead symlink yields FTS_SLNONE
- FTS_SKIP prevents descent into directory
- fts_set_clientptr/fts_get_clientptr round-trip
- fts_get_stream returns parent FTS* from FTSENT*

Sponsored by:	Google LLC (GSoC 2026)
Reviewed by:	asomers
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2242
2026-06-02 13:01:44 -06:00
Konstantin Belousov 5d36fcc53d open.2: document O_PATH behavior for bindat/connectat
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57370
2026-06-02 18:39:03 +03:00
Konstantin Belousov 12c590a9ab bindat(2)/connectat(2): allow implicit EMPTYPATH for unix domain sockets
path specification.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57370
2026-06-02 18:38:57 +03:00
Christos Margiolis 4f7092eeb2 virtual_oss_cmd(8): Improve error messages
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-06-02 15:00:45 +02:00
Christos Margiolis eb5aa5c337 bsdinstall: Add virtual_oss service option
Since virtual_oss is now part of base, there is no reason not to provide
an installer option to enable it, and make it more visible to new users,
who might also benefit from the devd rules in /etc/devd/snd.conf, which
use virtual_oss, as well as 8532b4a436 ("rc: virtual_oss: Create a
loopback device in the default configuration").

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	ivy
Pull-Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/31
2026-06-02 14:05:05 +02:00
Pawel Biernacki 5dbbd764c8 linux: Fix missing break in lsiginfo_to_siginfo()
Prevent LINUX_SI_TKILL from inadvertently falling through to
LINUX_SI_QUEUE, which incorrectly overwrote si_code with SI_QUEUE
instead of SI_LWP.
2026-06-02 11:08:29 +00:00
Teddy Engel ea4888e63f nat64lsn: Fix type confusion panic when using wrong NAT64 instance type
When an ipfw rule references a NAT64 instance by name using
'nat64lsn', the kernel looks up the instance in the shared
srvstate[] array without verifying the instance type.
If the named instance is actually a nat64clat or nat64stl
instance (created with 'nat64clat' or 'nat64stl'), the code
incorrectly casts the instance to nat64lsn_instance and
dereferences the ->cfg pointer, which causes a kernel panic.

The root cause is that all NAT64 instance types share the same
srvstate[] array but have different struct layouts.
For nat64lsn_instance, the field after 'no' is a pointer to nat64lsn_cfg.
For nat64clat_cfg, the same offset contains an embedded nat64_config struct.

Fix by adding a type check after NAT64_LOOKUP() to verify that the
instance's etlv matches IPFW_TLV_NAT64LSN_NAME before proceeding.
If the type doesn't match, return IP_FW_DENY to reject the packet
safely rather than crashing.

Signed-off-by:	Teddy Engel <engel.teddy@gmail.com>
PR:		292023
Reported by:	pouria
Reviewed by:	ae
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2249
2026-06-02 12:44:26 +03:30
Dag-Erling Smørgrav 1cef7e9eb0 ObsoleteFiles: Add some ancient locale symlinks
These were dropped in 2021 but were never listed in ObsoleteFiles.inc,
so systems that have been upgraded from source since before that date
(or from 13.x) may still have them.

PR:		295668
MFC after:	1 week
Fixes:          0a36787e4c ("locales: separate unicode from other locales")
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D57331
2026-06-02 10:38:16 +02:00
Ricardo Branco c515e60406 linux: Implement PTRACE_GETREGSET NT_PRFPREG and NT_X86_XSTATE
Implement NT_PRFPREG and NT_X86_XSTATE for PTRACE_GETREGSET on amd64.
Chrome's crashpad handler uses these to collect floating-point and
extended CPU register state for crash dumps.

Other architectures retain the previous EINVAL stub behavior.

Signed-off-by:	Ricardo Branco <rbranco@suse.de>
PR:		289285
Reviewed by:	kib
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2165
2026-06-02 10:55:37 +03:30
Ricardo Branco b84d31ee74 linux: Add linux_pt_fpregset and bsd_to_linux_fpregset() for amd64
Add struct linux_pt_fpregset, the amd64 Linux NT_PRFPREG payload,
corresponding to user_i387_struct in Linux. The struct describes
the 512-byte FXSAVE area as exposed by PTRACE_GETREGSET.

Add bsd_to_linux_fpregset() to translate from FreeBSD's struct fpreg
to struct linux_pt_fpregset. Fields are extracted from the fpr_env[]
array which stores the FXSAVE environment packed as four 64-bit words.
The FP and XMM register banks are bulk-copied as opaque byte arrays.

Signed-off-by:	Ricardo Branco <rbranco@suse.de>
Reviewed by:	kib
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2165
2026-06-02 10:55:34 +03:30
ShengYi Hung 7b26353a59 hwpstate_intel: Disable package control on hybrid CPU
In package control mode, the performance of all cores depends on the
most recent value written to the request field. If the last write comes
from an E-core, all cores are forced to align with the E-core
performance level, resulting in significant performance degradation.
Therefore, package control is disabled on hybrid-core systems.

Reviewed by:    olce
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Framework Computer Inc
Differential Revision: https://reviews.freebsd.org/D57377
2026-06-02 14:41:41 +08:00
Kirk McKusick 553ef188f7 Avoid incorrect UFS1 timestamp corrections when system clock fails at boot.
Git 1111a44301 - main - Defer the January 19, 2038 date limit in
UFS1 file systems to February 7, 2106 - did so by changing the UFS1
32-bit signed timestamps to unsigned. With this change, time stamps
from before January 1, 1970 went from being negative numbers to
large positive numbers implying times in the future. When such a
time stamp is encountered when an inode is read into memory or when
it is encountered by fsck, its timestamp is replaced with the
kernel's current time.

Andre Albsmeier reported that he had a machine reboot after a power
failure and the battery that maintained its real-time clock had
died. The result was that the system booted with the time set to
five years earlier (absent a real-time clock value, the boot ROM
used the time that the boot ROM had last been updated). The net
result was that fsck reset the time stamps of all files newer than
five years old to the five year old time.

Andres's original request was for a flag in the file system superblock
to say that there are no timestamps from before 1970 in the file
system, so there shouldn't be anything to fix because of the signed
to unsigned switch. But this assumes that no one every does an rsync
or extracts a tar file or restores a dump that introduces an incorrect
time stamp on their system. So this approach was not taken.

This change compares the system's version of the current time to
the last modification time in the file system superblock. If the
current time is earlier than that time then use the last modification
time in the superblock as the value for the current time. There
should be no files in the file system with times newer than the
last modification time in the superblock.

The superblock time stamp is updated in the in-memory superblock
every time any change is made to anything in the file system. The
superblock is written to the disk every 30 seconds, so it may be
off by up to 30 seconds plus the time it sits in the disk cache
waiting to be written if the system has an unclean shutdown (such
as a power failure). Thus, the worst case scenario with this change
is that files written in the last 30 seconds plus disk cache delay
time before the crash may have their times adjusted back by up to
30 seconds plus the disk cache delay time.

Requested by: Andre Albsmeier
Approved by:  kib
Reviewed by:  kib, imp, Andre Albsmeier
MFC-after:    1 week
Differential Revision: https://reviews.freebsd.org/D57371
2026-06-01 16:48:21 -07:00
Ed Maste f77d37cffd linuxulator: Return EINVAL for invalid inotify flags
We implement all of the currently-defined Linux inotify mask bits and
flags, with the same values as Linux.  Return EINVAL for unknown bits,
as Linux does.

This also moves the translation inline into linux_inotify_add_watch.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57387
2026-06-01 14:42:38 -04:00
Mark Johnston 68004e56fd net: Fix handling of unmapped user pages in if_getgroup()
We cannot call copyout() while in a net epoch section, unless the user
memory is wired.  Use the global ifnet lock to synchronize the accesses
instead.

Reported by:	emaste
Reviewed by:	zlei
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57154
2026-06-01 18:22:57 +00:00
Mark Johnston 49d90d9ddf lagg: Handle a port count of zero
The sc_count check in lagg_transmit_ethernet() and
lagg_transmit_infiniband() is racy, as the lagg protocol handlers are
only synchronized by net_epoch.  Handle a count of 0 in each protocol
handler where it's needed, namely in the RR and LB handlers.

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:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D56942
2026-06-01 18:22:57 +00:00
Dimitry Andric 86326398b7 Merge commit 63c29df8eceb from llvm git (by Dmitry Polukhin):
[Serialization] Fix assertion on re-deserialized friend template spec… (#200566)

  …ialization in PCH (#198133)

  A friend function-template specialization declared inside a class
  template is serialized into a PCH. When the class template is later
  instantiated while loading the PCH, the friend specialization can be
  deserialized re-entrantly (VisitFriendDecl -> VisitFunctionDecl -> ...
  -> VisitFunctionDecl for the same specialization) at the same time as
  the canonical copy, producing two redeclarations of the same
  specialization in the template's specialization set.

  ASTDeclReader::VisitFunctionDecl asserted that this collision could only
  happen when merging declarations from different modules. Since
  38b3d87bd384, friend functions defined inside dependent class templates
  are loaded eagerly, so the collision can now also occur within a single
  PCH/AST file (non-modules build), tripping the assertion:

    Assertion failed: (Reader.getContext().getLangOpts().Modules &&
    "already deserialized this template specialization"), function
    VisitFunctionDecl

  The merge that follows (mergeRedeclarable) already links the two
  redeclarations correctly regardless of whether modules are enabled, so
  the fix is to drop the modules-only assumption and let the merge run.

  Fixes https://github.com/llvm/llvm-project/issues/198133

This fixes (well, simply removes :) an assertion when building the
cad/OrcaSlicer port with precompiled headers turned on.

PR:		295296
MFC after:	3 days
2026-06-01 19:10:11 +02:00
Konstantin Belousov 16f21c5af3 amd64: there is no reason to copy ucode around in ucode_load_bsp()
PR:	294630
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differrential revision:	https://reviews.freebsd.org/D57368
2026-06-01 19:35:33 +03:00
Konstantin Belousov 606d3cb1be amd64: do not switch back and restore UEFI IDT in wrmsr_early_safe_end()
The memory where the pre-OS IDT was located might be already consumed by
kernel.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57321
2026-06-01 19:35:33 +03:00
Ed Maste 72e34b3e39 get/setpriority: Add capability mode checks
Reviewed by: oshogbo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57345
2026-06-01 12:30:20 -04:00
Olivier Certner 79d0dbc9c6 MAC/do: Fix double-free on parse error after "executable paths" feature
parse_rules() has been calling toast_rules() in case of a parse error in
order to deallocate the 'struct rule' objects it has constructed up to
that point.

toast_rules() would take a pointer to a full 'struct rules' object, and
besides freeing all 'struct rule' referenced by it, would also free the
holding 'struct rules' itself.

With the introduction of the "executable paths" feature, and the
embedding of 'struct rules' into 'struct conf', meaning that the
lifecycle for 'struct rules' was no longer independent, toast_rules()
was changed not to free the passed 'struct rules' (as it was a field of
a 'struct conf' object).  Unfortunately, this change was not completed
with a reinitialization of the rules list head, so the 'struct conf'
object would continue to reference just-freed rules, which then would be
freed a second time on destruction of that container.

So, make toast_rules() re-initialize the rules list in 'struct rules',
which it logically has been having to do since not freeing the enclosing
'struct rules'.  This alone is enough to fix the bug, but let's use the
occasion to change the contract of parse_rules() and bring its herald
comment up-to-date: On error, parse_rules() now simply leaves already
constructed 'struct rule' objects in 'conf'.  The latter is eventually
destroyed and the rule objects reclaimed at that point.

Add a test trying to set an invalid rules configuration with the first
rule being valid and the second being invalid, which triggers the bug
(and an immediate panic() on an INVARIANTS kernel).

Reported by:    impost0r(ret2plt) <impostor@ret2p.lt>
Reviewed by:    markj
Fixes:          9818224174 ("MAC/do: Executable paths feature (GSoC 2025's final state)")
Sponsored by:   The FreeBSD Foundation
2026-06-01 17:23:51 +02:00
Pietro Cerutti 84dd0acd1c dma: support relaying to an LMTP endpoint
Approved by:		bapt
Differential Revision:	https://reviews.freebsd.org/D55627
Upstream:		https://github.com/corecode/dma/pull/152
2026-06-01 12:19:57 +00:00
Dag-Erling Smørgrav dfd2273d27 sh: Fix pipebuf limit
Since the factor is not 1, we need to provide a unit.

MFC after:	1 week
Fixes:		5d92f20c7d ("bin/sh: support RLIMIT_PIPEBUF")
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D57352
2026-06-01 10:51:41 +02:00
ShengYi Hung 4ccbceefeb spi: Remove incorrect pci id
This id is for SPI flash instead of spi bus

Fixes: 39e297bf54 ("ig4iic: Add PantherLake IDs")
MFC after:      2 weeks
Sponsored by:  The FreeBSD Foundation
Sponsored by:  Framework Computer Inc
2026-06-01 16:45:20 +08:00
Olivier Certner 1876f629b9 style.9: Fix a typo (missing word)
Fixes:          af2c7d9f64 ("style.9: Encourage style changes when doing significant modifications")
MFC after:      1 day
Sponsored by:   The FreeBSD Foundation
2026-06-01 09:40:11 +02:00
Stefan Eßer f983cb362d fs/msdosfs: add support for file namws with surrogate pairs
Long file names are using UTF-16 symbols to represent international or
special characters. The implementation in FreeBSD did not support the
"Supplementary Private Use Area-B" (PUA-B), which requires a surrogate
pair to be represented in UTF-16 (Unicode code points beyond U+FFFF).

The PUA-B is used to represent emoji characters, which are supported
in file names on other common operating systems. The motivation for
this change was that removable media written on another system were
only partially readable on FreeBSD, since they contained emojis in
file names.

A test script that verifies correct operations on files names with
emojis has been added to the tools/test/stress2/misc directory under
the name msdos24.sh.

Reported by:	Fabian Keil <fk@fabiankeil.de>
Reviewed by:	ib
Approved by:	mkcusick
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D57313
2026-06-01 08:22:31 +02:00
Daniel Schaefer 39e297bf54 ig4iic: Add PantherLake IDs
MFC after:      2 weeks
Sponsored by:   Framework Computer Inc
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2026-06-01 14:02:52 +08:00
Warner Losh a1d78374b5 stand: Revert the EFI loader back to strict mode
The change to relaxed mode has had too many unintended breakages. Revert
back to strict mode until that works for all the cases that are
currently broken.

Fixes: 784150fd25, d69fc3a9dc
PR:  295289
Sponsored by: Netflix
2026-05-31 21:38:58 -06:00