Commit Graph

305708 Commits

Author SHA1 Message Date
Gleb Smirnoff 8b780f75f7 libpcap: disable more code related to USB pseudo-interfaces
Fixes:	6e297e1cdf
2025-12-16 10:25:12 -08:00
Gleb Smirnoff 6e297e1cdf libpcap: don't try to create usbusX interfaces 2025-12-16 10:15:24 -08:00
Artem Bunichev 2c75ac14d7 libpathconv: Document library in the man pages
Reviewed by:		ziaee, imp
Differential Revision:	https://reviews.freebsd.org/D54213
2025-12-16 12:43:17 -05:00
Turbo Fredriksson 0ba3403323 Change shellcheck and checkbashism triggers.
Newer versions of `shellcheck` and `checkbashism` finds more than
previous, so fix those.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2025-12-16 09:15:51 -08:00
Turbo Fredriksson 6c6a469bea Replace bashisms in ZFS shell function stub.
The `type` command is an optional feature in POSIX, so shouldn't be
used.

Instead, use `command -v`, which commit
  e865e7809e
did, but it missed this file.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2025-12-16 09:15:51 -08:00
Turbo Fredriksson 1842d6b3cb Make lines stay within 80 char limit.
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2025-12-16 09:15:51 -08:00
Turbo Fredriksson ead77e952e Add some comments to clarify the mounting of filesystems.
There's no real documenation (which should probably be written!),
so instead document the code the best we can on what's going and
with the mounting of file systems to make future updates easier.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2025-12-16 09:15:51 -08:00
Turbo Fredriksson 01cb64510d Standardise if/then/else and for/do/done lines.
More code standard changes, where if/then is on different lines.
To have it on the same, or on different lines, can be argued, but
we need to pick one, and try not to mix how to do things.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2025-12-16 09:15:51 -08:00
Turbo Fredriksson 29819a0177 Add missing initrd config variables.
The `ZFS_INITRD_ADDITIONAL_DATASETS` variable is used in the initrd
script to boot additional OS file systems besides the root file system.
But it wasn't included as an example in the config files.

The `ZFS_POOL_EXCEPTIONS` *was* included in the example defaults file,
but it was not exported, so not available in the initrd.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2025-12-16 09:15:51 -08:00
Turbo Fredriksson 4af8e28a59 Remove unnecessary sourcing of variables.
The file `/etc/default/zfs` is already sourced by the `/etc/zfs/zfs-functions`,
so no need to source it again.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2025-12-16 09:15:51 -08:00
Turbo Fredriksson 94975ff79b Fix issue with finding degraded pool(s).
When a pool is degraded, or needs special action, the `zpool import`
(without pool to import) line will report:
```
  pool: rpool
    id: 01234567890123456789
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
   [..]
```
If the import with the pool name fails, it is supposed to try importing
using the pool ID.

However, the script is also getting the `action` line (and probably `scrub:`
if/when that's available):
  pool; The pool can be imported using its name or numeric identifier.;config:;
which causes issues on consequent import attempts.

Cleanup the information by rewriting the `sed` command line.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2025-12-16 09:15:51 -08:00
Turbo Fredriksson 33dd57e1b4 Prefix all variables that are local with underscore.
This just to make them easier to see.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2025-12-16 09:15:51 -08:00
Turbo Fredriksson d3b447de4e Shell script good practices changes.
It's considered good practice to:
1) Wrap the variable name in `{}`.
   As in `${variable}` instead of `$variable`.
2) Put variables in `"`.

Also some minor error message tuning.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2025-12-16 09:15:51 -08:00
Turbo Fredriksson 61ab032ae0 Fix potential global variable overwrite.
In a previous commit (e865e7809e), the
`local` keyword was removed in functions because of bashism.

Removing bashisms is correct, however this could cause variable overwrites,
since several functions use the same variable name.

So this commit make function variables unique in the (now) global name
space.

The problem from the original bug report (see #17963) could not be duplicated,
but it is still sane to make sure that variables stay unique.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2025-12-16 09:15:51 -08:00
Tony Hutter 32faecb0c2 CI: Use Ubuntu mirrors instead of azure (#18057)
Use the official Ubuntu apt mirrors instead of
azure.archive.ubuntu.com, since that mirror can be slow:

    https://github.com/actions/runner-images/issues/7048

This can help speed up the 'Setup QEMU' stage.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #18057
2025-12-16 09:15:18 -08:00
Siva Mahadevan 2cd31bd8fa makefs/tests: Use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1870
2025-12-17 01:13:47 +08:00
Siva Mahadevan 681e9d3e39 Unskip test sys.netinet6.frag6.frag6_07.frag6_07
This is now consistently passing with 100+ consecutive runs.

Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
PR:		244170
MFC after:	3 days
Sponsored by: The FreeBSD Foundation
2025-12-17 00:39:14 +08:00
Cy Schubert a6ea80bc91 ipfilter: Add missing kenv fetch
When a module the environment must be explicitly fetched.

Fixes:			d9788eabff
PR:			291548
Noted by:		markj
Reviewed by:		markj
Differential Revision:	https://reviews.freebsd.org/D54242
MFC after:		3 days
2025-12-16 08:27:33 -08:00
Dag-Erling Smørgrav a34c50fbd2 ipfilter: Prevent stack buffer overflow
When copying ipfs data from user space, don't just check that the payload
length is nonzero, but also that it does not exceed the size of the stack
buffer we're copying it into.

While we're at it, use a union to create a buffer of the exact size we
need instead of guessing that 2048 will be enough (and not too much).

Finally, check the size of the payload once it gets to where it's used.

MFC after:	3 days
Reported by:	Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed by:	cy
Differential Revision:	https://reviews.freebsd.org/D54194
2025-12-16 17:12:36 +01:00
Ed Maste 2619d439fa makeman.lua: Update for src.conf in the src tree
Copy the text change from the shell makeman to makeman.lua.

Fixes: dd8c666d8b ("src.sys.mk: Support src.conf in SRCTOP")
Sponsored by:	The FreeBSD Foundation
2025-12-16 11:08:52 -05:00
Olivier Cochard cce603cfca if_rge: Add PNP info for module
Add PNP info so the module can be matched by devmatch(8) and automatically
loaded.

Reviewed by:	adrian
Approved by:	adrian
Differential Revision:	https://reviews.freebsd.org/D54254
2025-12-16 16:50:30 +01:00
Siva Mahadevan 7a83fedc11 tests/if_lagg_test: unskip 'witness' testcase
This testcase passes consistently (in 100+ runs) now.

Signed-off-by:	Siva Mahadevan <me@svmhdvn.name>
PR:		244163, 251726
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2025-12-16 18:20:44 +08:00
Siva Mahadevan e93e57d3da tests/fibs_test: unskip udp_dontroute6 testcase
This test now consistently passes (300+ consecutive runs).

Signed-off-by:	Siva Mahadevan <me@svmhdvn.name>
PR:		244172
Sponsored by:	The FreeBSD Foundation
2025-12-16 18:15:30 +08:00
Ruslan Bukin 012f1e4ae3 axidma(4): switch interrupt type.
Switch interrupt type to NET so that it enters net epoch during
interrupt service routine.

Sponsored by:	CHERI Research Centre
2025-12-16 09:25:58 +00:00
Emmanuel Vadot 00352ef6d2 etc/mtree/BSD.include.dist: Remove atf tags
When building with WITHOUT_TESTS this result in a FreeBSD-atf-dev
package with only this directory and a dependency on FreeBSD-atf which
doesn't exists.

Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D54236
Fixes:          436618a427 ("etc/mtree: Add package tags for /usr/include")
Sponsored by:   Beckhoff Automation GMbH & Co. KG
2025-12-16 10:00:58 +01:00
Emmanuel Vadot 1fbdb149aa etc/mtree/BSD.include.dist: Remove bsnmp tags
When building with WITHOUT_BSNMP this result in a FreeBSD-bsnmp-dev
package with only this directory and a dependency on FreeBSD-bsnmp which
doesn't exists.

Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D54235
Fixes:          436618a427 ("etc/mtree: Add package tags for /usr/include")
Sponsored by:   Beckhoff Automation GMbH & Co. KG
2025-12-16 09:59:58 +01:00
Jose Luis Duran 9c844b6110 blocklist: blacklist: Chase recent upstream changes
Upstream fixed a couple of bugs:

1. Only attempt to restore the blocking rules if the database file
   exists.  Otherwise, when the service starts for the first time, it
   fails (PR 258411).

2. Revert a commit that removed a call to close(bi->bi_fd), preventing
   the descriptor from being deleted.

PR:		258411
PR:		291680
MFC after:	1 week
2025-12-16 08:13:39 +00:00
Maxim Konovalov 27554189e5 khelp: make the module compile again
PR:		291165
MFC after:	1 week
2025-12-16 05:48:58 +00:00
Konstantin Belousov 9b943425fd proc_dtor(): style improvements
Drop not needed cast.
Group sigchld state check as single KASSERT condition.
Remove useless comment.

Reviewed by:	des, olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54234
2025-12-16 06:43:06 +02:00
Zhenlei Huang 094626d3a5 lio: Avoid out-of-bounds read or write MAC address
While here, replace loop copying the MAC address with memcpy() for
better readability.

Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54177
2025-12-16 12:41:02 +08:00
Jose Luis Duran 52395203f9 MFV: Import blocklist 2025-12-15 (8a4b011)
Merge commit 'bfef098f924950a085927b1e7dd6c6db4e651c5c'

Changes:

https://github.com/zoulasc/blocklist/compare/ff13526...8a4b011

PR:		258411
PR:		291680
MFC after:	1 week
2025-12-16 01:03:30 +00:00
Jose Luis Duran bfef098f92 Vendor import of blocklist 2025-12-15 (8a4b011)
Upstream hash 8a4b011dec375ee695b1a72f1ea57394670f359d.

Obtained from:	https://github.com/zoulasc/blocklist
2025-12-16 01:01:50 +00:00
Jose Luis Duran 715cc25713 blocklist: Add vendor import instructions
Add vendor import instructions for blocklist.

It includes a "freebsd-changes.sh" script that takes care of adapting
paths and functions into FreeBSD.

Reviewed by:	emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D49510
2025-12-16 00:55:24 +00:00
Maxim Konovalov 03603db013 acpidump.8: formatting fix
Reported by:	Marcin Cieslak
2025-12-16 00:34:57 +00:00
Aymeric Wibo 5bd839792b thunderbolt: Remove PNP info
So it isn't matched by devmatch(8) and automatically loaded. The PNP
info will be readded once the USB4 driver is more complete.

PR:		290827
Reported by:	fuz, Marco Siedentopf <siedentm@me.com>
Fixes:	2ed9833791 (thunderbolt: Import USB4 code)
Sponsored by:	The FreeBSD Foundation
2025-12-16 00:23:35 +01:00
Alan Somers a69a90b49e Remove the obsolete FreeBSD 14.2-RELEASE from CI
Sponsored by:	ConnectWise
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by:	Alan Somers <asomers@gmail.com>
Closes #18013
2025-12-15 15:13:04 -08:00
Tony Hutter 842fb1c135 CI: Change timeout values
The 'Setup QEMU' CI step updates and installs all packages necessary to
startup QEMU.  Typically the step takes a little over a minute, but
we've seen cases where it can take legitimately take more than 45min
minutes.  Change the timeout to 60 minutes.

In addition, change the 'Install dependencies' timeout to 60min since
we've also seen timeouts there.

Lastly, remove all timeouts from the zfs-qemu-packages workflow.
We do this so that we can always build packages from a branch, even if
the time it takes to do a CI step changes over time.  It's ok to
eliminate the timeouts from the zfs-qemu-packages completely since that
workflow is only run manually.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #18056
2025-12-15 14:58:01 -08:00
Alexander Motin 22e89aca88 DDT: Fix compressed entry buffer size
The first byte of the entry after compression is used for algorithm
and byte order flag.  We should decrement when calling compression/
decompression algorithm.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #18055
2025-12-15 14:52:44 -08:00
Alexander Motin 3b1ff816bd DDT: Add/use zap_lookup_length_uint64_by_dnode()
Unlike other ZAP consumers due to compression DDT does not know
how big entry it is reading from ZAP.  Due to this it called
zap_length_uint64_by_dnode() and zap_lookup_uint64_by_dnode(),
each of which does full ZAP entry lookup.

Introduction of the combined ZAP method dramatically reduces the
CPU overhead and locks contention at DBUF layer.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #18048
2025-12-15 14:38:34 -08:00
Gleb Smirnoff efc8353481 usbdump: remove some FreeBSD 9.x code 2025-12-15 13:17:23 -08:00
Gleb Smirnoff 1615eff94c usb: don't create ifnet(9) for usbus devices
Differential Revision:	https://reviews.freebsd.org/D54063
2025-12-15 13:17:23 -08:00
Gleb Smirnoff 3daae1ac1d ipfw: create a bpf tap point for every log rule
Dynamically allocate bpf tap points for every rule that has "log".
The name is "ipfw%u", where %u is substituted to the rule number.
The default catch all "ipfw0" tap still exists for compatibility
and it will catch packets in case if there are no bpf listeners
on a per-rule tap.

Reviewed by:		ae
Differential Revision:	https://reviews.freebsd.org/D53877
2025-12-15 13:17:23 -08:00
Gleb Smirnoff 1c5021f525 ifconfig: print warning and return success on ipfw0, ipfwlog0 cloning
This should provide people a chance to remove ipfw0 and ipfwlog0 from
cloned_interfaces in their rc.conf during FreeBSD 16.x lifetime.

Differential Revision:	https://reviews.freebsd.org/D53876
2025-12-15 13:17:23 -08:00
Gleb Smirnoff ddf4f9eda9 ipfw: create "ipfw0" and "ipfwlog0" bpf tapping points without ifnet(9)
As a free bonus the tapping points are now able to match packet direction.

Reviewed by:		ae
Differential Revision:	https://reviews.freebsd.org/D53875
2025-12-15 13:17:23 -08:00
Gleb Smirnoff 94b76ea9d1 libpcap: obtain list of bpf tap points with BIOCGETIFLIST
Differential Revision:	https://reviews.freebsd.org/D53874
2025-12-15 12:51:34 -08:00
Gleb Smirnoff c10447a925 bpf: add BIOCGETIFLIST ioctl that returns all available tap points
Differential Revision:	https://reviews.freebsd.org/D53873
2025-12-15 12:51:26 -08:00
Gleb Smirnoff 8774a990ee bpf: modularize ifnet(9) part of bpf
Imagine that bpf(9) tapping can happen at any point in the network stack,
not necessarily at interface transmit or receive.  To achieve that we need
a thin layer of abstraction defined by struct bif_methods, that defines
how generic bpf layer works with a tap point of this kind.

Implement ifnet(9) specific methods in a separate file bpf_ifnet.c.  At
this point there is 100% compatibility for all existing interfaces, there
is no KPI change, yet.  The legacy attaching KPI is layered over new ifnet
agnostic KPI.  The new KPI may change though, as we can implement multiple
DLTs per single tap point in a prettier fashion.

The new abstraction layer allows us to move all the 802.11 radio injection
hacks out of bpf.c into ieee80211_radiotap.c, so do that immediately as a
good proof of concept.

Reviewed by:		bz
Differential Revision:	https://reviews.freebsd.org/D53872
2025-12-15 12:50:35 -08:00
Alexander Motin ff5414406f DDT: Switch to using ZAP _by_dnode() interfaces
As was previously done for BRT, avoid holding/releasing DDT ZAP
dnodes for every access.  Instead hold the dnodes during all their
life time, never releasing.

While at this, add _by_dnode() interfaces for zap_length_uint64()
and zap_count(), actively used by DDT code.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #18047
2025-12-15 09:49:14 -08:00
Oskar Holmlund 9d56f84df5 remove sys/dts/arm/socfpga_*_sdmmc.dts
These two files are broken due to Linux 6.5 DTS import.
Both of these boards have support in Linux DTS tree,
please use these DTS instead.

Removed and not fixed because of commit 949efdaa1d

Approved by: br, manu (mentor)
Differential revision: https://reviews.freebsd.org/D54216
2025-12-15 18:47:17 +01:00
John Hall 2059040493 committers-src: add myself (jrhall@)
Add jrhall@ (myself) as new src committer with imp@ as
mentor.

Reviewed By:    imp (mentor)
Approved by:    imp (mentor)
Differential Revision: https://reviews.freebsd.org/D53934
2025-12-15 10:21:10 -07:00