Commit Graph

21801 Commits

Author SHA1 Message Date
Felipe Matarazzo 713332b4eb fix typo: duplicate 'the' in OP_NOTROOT comment
Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
2026-04-30 09:29:16 -07:00
Boris Lytochkin 6d65c91b9a etcupdate: fix arguments order of diff command
Due to misplacement of the second -L argument of diff command, it is
treated by getopt_long as an error.

Also add -l option for a diff command that alters the way it shows
differences. Instead of printing full diff, it reports changed file
the same way as added/removed files are reported.

Reviewed by:	imp
Obtained from:	Yandex LLC
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56708
2026-04-30 14:31:34 +03:00
Corvin Köhne 75909086a4 bhyve: allow read/write to full CRB buffer
For some reason, we've incorrectly calculated the size of the CRB data buffer
register. There's no need to divide the CRB data buffer size by 4. We should
allow access to the whole buffer instead.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Pull Request:		https://github.com/freebsd/freebsd-src/pull/2169
2026-04-30 11:09:49 +02:00
Chris Longros 91bfba010b cron: log when a crontab path is too long
Log via syslog when snprintf truncates the crontab path, instead of
silently skipping the entry.

Signed-off-by:	Christos Longros <chris.longros@gmail.com>
Reviewed by:	bcr, kevans
Differential Revision:	https://reviews.freebsd.org/D56235
2026-04-28 23:06:29 -05:00
Stéphane Rochoy 76de40889e efibootmgr: Show attributes, category and optional data when verbose
Also rework a bit the way device path are displayed for consistency.

Signed-off-by:	stephane.rochoy@stormshield.eu
Reviewed by:	imp
Sponsored by:	Stormshield
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2167
2026-04-29 00:28:59 +03:30
Stéphane Rochoy 48363f39f1 efivar: Move dump functions into libefivar
To allow their use by efibootmgr.

Signed-off-by:	stephane.rochoy@stormshield.eu
Reviewed by:	imp
Sponsored by:	Stormshield
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2167
2026-04-29 00:28:54 +03:30
Kyle Evans d9c0594191 ctld: kernel-sourced portal groups are not dummies
The current and historical versions of ctld would flag our initial set
of kernel ports as dummies, because their portal groups were empty since
portals come from the configuration on-disk.

As a result, we would never try to remove a kernel port at startup that
didn't exist in the configuration (possibly a feature if you wanted
concurrent ctld(8)), and we would always try to port->kernel_add() on
ports in the configuration (even if they actually did have an existing
kernel port).

Flag these portal groups as kernel groups so that we avoid trying to add
ports that already exist.  It may be the case that the kernel_remove()
loop in conf::apply() needs to do something other than the current
`oldport->is_dummy()` to avoid removing ports that it isn't supposed to
be managing, but that wuld also seem to apply to LUNs that would be
removed today.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D51782
2026-04-28 15:51:50 -05:00
Chuck Tuffli e139a49b5d Revert "Vendor import of smart at 1.0.2"
This reverts commit 68e5b71517.
2026-04-28 12:03:38 -07:00
Chuck Tuffli 68e5b71517 Vendor import of smart at 1.0.2
smart/diskhealth is a command line application to monitor disk health
from a storage device via SMART.

Reviewed by:	fuz, jrm
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D56638
2026-04-28 10:08:27 -07:00
Alexander Ziaee 5ed26c21e4 bsdinstall: Improve auto-partition message
Manually tuning ZFS for systems with <8GB ram hasn't been necessary at
least since the switch to OpenZFS. We have users reporting using 1GB RAM
with no manual tuning/issues. Further, the page this links to is a stale
wiki page, which is causing complaints. Remove this misleading note and
replace it with a similar message for UFS. While here, reword that note
to be a bit clearer.

PR:			287719
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D50971
2026-04-28 12:59:34 -04:00
Artem Bunichev e09104dfb7 groups.7: New manual page of standard group names
Import groups(7) from NetBSD, with tweaks for our system. The group
list is sorted by GID. All the group names from /usr/src/etc/group
are described, except "uucp". The FILES section was added on top of
the original manual page.

PR:			264966
Relnotes:		yes
MFC after:		3 days
Obtained from:		NetBSD
Reviewed by:		des, ziaee
Differential Revision:	https://reviews.freebsd.org/D54114
2026-04-28 09:53:39 -04:00
Christos Margiolis 54922e4ec8 mixer(8) tests: Remove tests for deprecated control values
Fixes:		a28bb575c8 ("mixer(8): Deprecate some unintuitive control values")
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-04-28 01:00:46 +02:00
Tuukka Pasanen 80c73c89dc bsdinstall: Add SPDX-License-Identifier tags
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
2026-04-27 13:51:26 -04:00
Christos Margiolis a28bb575c8 mixer(8): Deprecate some unintuitive control values
This is a follow-up to cc7479d7dc ("mixer(8): Improve mute and recsrc
controls"). These deprecated values will be completely removed on
2026-06-15.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	0mp
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/21
2026-04-27 18:23:36 +02:00
Lars Engels 1566386b90 bsdinstall: fix root password prompt with backslashes
Use "read -r" to set the root password in "bsdinstall rootpass" to
prevent issues with passwords containing one or more backslash
characters.

PR:		294781
Discussed with: tuexen, crest
Approved by:	khorben
MFC after:	3 days
Event:		Wiesbaden Hackathon 202604
2026-04-25 16:41:24 +02:00
Vladimir Kondratyev 87ed6840a0 rtlbtfw(8): Load firmware from filesystem with mmap()
rather than with read() to alleviate concerns about partial reads.
2026-04-24 18:15:22 +03:00
Johan Söllvander eb837cb8b2 ctld: normalize iSCSI TargetName on login
Case-insensitive TargetName matching on logins was accidentally removed,
let's fix that by normalizing TargetName again according to RFC 3722.

PR: 			294522
Fixes: 			4b1aac9314
Sponsored by: 		ConnectWise
MFC after: 		1 week
Reviewed by:		asomers, jhb
Approved by:		asomers (mentor)
Differential Revision:	https://reviews.freebsd.org/D56469
2026-04-24 09:44:43 +02:00
John Baldwin aad4fec5d7 ctld: Move the pidfile handle out to a global variable
This ensures it will be destroyed (removing the associated pidfile)
anytime the process exits, including from exit(3) calls.  This fixes
a few places that would "leak" the pidfile on certain errors.

This also removes the need for some convoluted logic where
configuration objects would hand-off ownership of the pidfile handle
from the old configuration to the new configuration.

Reviewed by:	asomers
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D56527
2026-04-23 15:17:05 -04:00
John Baldwin 3df5cc33d8 ctld: Ports without a portal group are not dummy ports
The default implementation of is_dummy should return false.  Only
portal group ports should possibly return true.

PR:		293076
Reported by:	Ken J. Thomson <thomsonk@yandex.com>
Fixes:		6acc7afa34 ("ctld: Convert struct port to a hierarchy of C++ classes")
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D56524
2026-04-23 15:16:08 -04:00
Ken J. Thomson 614ef71849 ctld: Don't add an iscsi port for targets with only kernel ports
PR:		293076
Reviewed by:	asomers
Fixes:		969876fcee ("ctld: parse config file independently of getting kernel info")
Differential Revision:	https://reviews.freebsd.org/D56523
2026-04-23 15:15:48 -04:00
Kyle Evans 8d680381c8 jail: tests: cosmetic-ish improvements
The new version of incrementing `jid` is a little cleaner and harder to
mess up, and also fix a nwlin omission while we're here.

These comments were dropped on D51502; ngie takes a co-author credit
so that they're not blamed for the commit message, but I can't claim
that I tweaked their suggestions.

Co-authored-by:	ngie
2026-04-22 22:02:38 -05:00
Johan Söllvander 51b65c6af2 ctladm tests: Only use allowed chars in IQN
_ isn't part of the allowed IQN format, but - is.

None functional change.

Reviewed by:            asomers, ngie
Approved by:            asomers (mentor)
MFC after:              1 week
Sponsored by:           ConnectWise
Differential Revision:  https://reviews.freebsd.org/D56557
2026-04-22 16:19:42 +02:00
Mateusz Piotrowski 4029e76543 bsdinstall.8: Document DISTRIBUTIONS defaults correctly
Some targets override the default value of DISTRIBUTIONS.
Document that in the manual page.

Reported by:	Nia Alarie <nia@NetBSD.org>
Reviewed by:	jlduran
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56528
2026-04-21 11:14:14 +02:00
John Baldwin 4b79ee8eb1 ctld: Update nchildren directly in wait_for_children
This results in slightly less duplicated code.

Reviewed by:	asomers
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D56526
2026-04-20 13:19:49 -04:00
John Baldwin 7bb2b38015 ctld: Support multiple physical ports in a target
PR:		293076
Reported by:	Ken J. Thomson <thomsonk@yandex.com>
Reviewed by:	asomers
Fixes:		969876fcee ("ctld: parse config file independently of getting kernel info")
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D55767
2026-04-20 13:19:25 -04:00
Nikolay Denev e56687bb2d ctld: Return from the inner "main" loop on EINTR
This ensures that child processes are reaped in the outer loop in
main().

PR:		294035
Reviewed by:	asomers
Fixes:		66b107e82b ("ctld: Use kevent(2) for socket events rather than select(2)")
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D56525
2026-04-20 13:18:50 -04:00
Hans Rosenfeld 91f03cde66 libvmmapi: Check for allocation failure in vm_vcpu_open()
vm_vcpu_open() really should check the value returned from malloc() and
return NULL on failure. Also, all users of vm_vcpu_open() need to check
the returned value for NULL, too.

Reviewed by:	corvink, markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56346
2026-04-20 15:14:49 +00:00
Christos Margiolis 554f5aa526 service(8): Replace indentation in usage()
The -d option was indented with spaces instead of tabs, and this broke
formatting.

Before:

-d                Enable debugging of rc.d scripts
-j              Perform actions within the named jail

After:

-d              Enable debugging of rc.d scripts
-j              Perform actions within the named jail

MFC after:	1 week
2026-04-19 12:40:31 +02:00
Christos Margiolis 788d71e73f virtual_oss.8: Remove CPU performance example
See also:	https://github.com/freebsd/virtual_oss/issues/2
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-04-17 22:48:38 +02:00
Pouria Mousavizadeh Tehrani 4dc6522d57 rtadvd(8): Set route info lifetime to 0 during shutdown
RFC 4191 section 3.1: if the received route's lifetime
is zero, the route is removed from the Routing Table if present.
Also, do not tell route information option is unknown.

PR:		263982
Reviewed by:	markj
Differential Revision: https://reviews.freebsd.org/D55448
2026-04-16 22:33:08 +03:30
Andre Silva ee12645ec7 pmcstat: print raw TSC in decoded log output
Extend pmcstat -R output to include the raw TSC for each decoded record
and print tsc_freq from the initialize record so TSC deltas can be
converted to elapsed time.

Update the pmcstat documentation to describe the decoded output and the
architecture-specific TSC behavior.

Sponsored by: AMD
Signed-off-by: Andre Silva <andasilv@amd.com>
Reviewed by: imp, mhorne, Ali Mashtizadeh
Pull Request: https://github.com/freebsd/freebsd-src/pull/2085
2026-04-16 00:05:21 -06:00
Po Han Chen 92378e0405 periodic/daily: show verbose zpool status when errors are detected
When zpool status -x reports errors, the output only shows basic error
counts without identifying which files are affected. Replace the
unconditional echo of the brief status with verbose output (zpool
status -v) in the error path so administrators can see exactly which
files have been damaged.

The healthy/no-pools path still shows the brief status.

PR: 223243
Signed-off-by: Po Han Chen <hypery11@gmail.com>
Reviewed by: imp, jlduran, asomers
Pull Request: https://github.com/freebsd/freebsd-src/pull/2089
2026-04-16 00:05:21 -06:00
Kit Dallege e0b22342f5 newsyslog.conf(5): use "rotated" instead of "trimmed"
The man page used "trimmed" to describe log rotation, which is
misleading as it suggests the file is truncated to a specific
size rather than being rotated (renamed and a new file created).
Replace all instances of "trimmed" with "rotated" to match the
actual behavior and the terminology used elsewhere in the page.

PR: 278671
Signed-off-by: Kit Dallege <xaum.io@gmail.com>
Reviewed by: imp,ziaee
Pull Request: https://github.com/freebsd/freebsd-src/pull/2099
2026-04-16 00:05:20 -06:00
Alexander Ziaee dc140a9fc1 Bourne shell -> POSIX shell
The FreeBSD shell is a POSIX compatible shell. It evolved over several
decades from the Almquist shell, which was preceeded a decade before
that by the Bourne shell. Most readers today have never seen a Bourne
shell. If someone wants to learn to use our shell, they need to look for
tutorials on the POSIX shell. Align descriptions through out the tree
with this reality, consistent with it's manual and common parlance.

We made a similar change to the doc tree in b4d6eb01540fe.

MFC after:		3 days
Reviewed by:		carlavilla
Differential Revision:	https://reviews.freebsd.org/D56382
2026-04-14 09:02:58 -04:00
Alexander Ziaee afe57c12e9 diskinfo: Align and alphabetize options
MFC after:	3 days
2026-04-13 15:52:24 -04:00
Vladimir Kondratyev 84488787f4 iwmbtfw(8): Identify device type based on HCI quieries result
rather than on VID/PID. Later is not reliable for some types.
VID/PID identification can be restored by specifying of -p option.

Tested by:	arrowd, wulf
PR:		290639
MFC after:	1 week
2026-04-12 21:09:22 +03:00
Andre Albsmeier e9a69948a8 daemon(8): Add "--output-file -o" to list of options enabling supervision mode
This is the small internal doc fix from https://reviews.freebsd.org/D46313

Reviewed by:	michaelo
Approved by:	(blanket; comment fix)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D55325
2026-04-12 18:28:24 +02:00
Rick Macklem 6698596cd2 nfsv4.4: Document setup of a NFSv4 root fs
Commit 8b9775912c added support for an NFSv4 mounted
root file system.  This patch documents how to set this
up.  It also includes some minor updates and fixes
some formatting.

This is a content change.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56317
Fixes:	8b9775912c ("nfs_diskless: Add support for an NFSv4 root fs")
2026-04-11 12:36:56 -07:00
Michael Osipov 850eb149e7 mfiutil(4)/mrsasutil(4): "show drives" truncates information
Improve mfi_pd_inq_string() by
* Reusing buffer sizes from cam/cam.h according to SCSI specification + NULL byte
* Don't truncate vendor-specific information by escaping into a too small buffer
* Use cam_strvis() from libcam instead of old, outdated local copy
* Recaculate size of inq_string based on the reused buffer sizes and
  format statements

PR:		294354
Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D56328
2026-04-11 20:28:03 +02:00
Michael Osipov 4f684e929d loader.efi.8/efibootmgr.8: Don't use contradicting term 'EFI BIOS'
Both (U)EFI and BIOS are completely different things, be precise and don't use
them together.

Reviewed by:	imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D56329
2026-04-11 20:24:43 +02:00
Pouria Mousavizadeh Tehrani 87bea33a67 nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options
The draft-ietf-6man-ipv6only-flag has been obsoleted by RFC 8925.
Remove the EXPERIMENTAL compile option from the kernel and remove
DRAFT_IETF_6MAN_IPV6ONLY_FLAG from userland.
This compile option was not enabled by default.
Also regenerate src.conf.5.

Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D56228
2026-04-10 23:42:09 +03:30
F. Duncanh 2c6feab253 hccontrol: Support generic Bluetooth LE AdvData
hccontrol LE_Set_Advertising_Data does not currently allow construction
of manufacturer-specific type 0xFF AdvData.  Fixed by a new data-entry
option -b "b1,b2,b3,...,bn" where b's are 8-bit byte strings (octets).

Signed-off-by: F. Duncanh <fduncanh@gmail.com>
Reviewed by: takawata, pouria
Pull Request: https://github.com/freebsd/freebsd-src/pull/2082
2026-04-10 21:36:34 +03:30
Li-Wen Hsu 45079cdf8b installer: Add download.freebsd.org to mirror list
download.freebsd.org is backed by project mirrors and a CDN, which
should benefit most users.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	delphij (releng)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D54849
2026-04-09 12:06:19 +08:00
Alexander Ziaee 2bcdab5745 mfiutil.8: Fix typo - missing macro for dev node
MFC after: 3 days
2026-04-08 08:53:18 -04:00
Rick Macklem e6db4dd9d7 nfsid.h: Put the nfsd_idargs structure in a new .h
This patch moves the definition of the nfsd_idargs
structure out of nfs.h and into a new file called
nfsid.h.

This is being done so that it can be included in
nfs_diskless.c in a future commit.

There should be no semantics change from this
commit.

MFC after:	1 week
Fixes:	8b9775912c ("nfs_diskless: Add support for an NFSv4 root fs")
2026-04-06 07:09:01 -07:00
Gordon Bergling b427b661be bsdconfig(8): Fix a typo in a source code comment
- s/THis/This/

MFC after:	3 days
2026-04-04 09:11:11 +02:00
Hans Rosenfeld 970e0db1c3 bhyve/virtio: Fix comparison of integer expressions of different signedness
It's a bit silly to have iov_to_buf() and buf_to_iov() return a ssize_t
to begin with, just to be able to return -1 for error. Change this to
size_t and use 0 as an error indicator, which won't require any changes
to the code using these functions.

While here, switch iov_to_buf() to use reallocf() instead of realloc().

Reviewed by: jhb
Fixes: 2a514d377b ("bhyve/virtio-scsi: Preallocate all I/O requests")
Differential Revision: https://reviews.freebsd.org/D55800
2026-04-01 15:05:26 -04:00
Mark Johnston 607f6be6ec rtadvd: Fix validation of the MTU parameter when parsing config
MFC after:	1 week
2026-04-01 08:19:35 -04:00
Christos Longros f3fc362c0f bluetooth: remove redundant 0x0bda entries from ng_ubt_rtl, rtlbtfw
Generic Realtek vendor rules already match all 0x0bda Bluetooth devices.
Remove the redundant per-product entries from ng_ubt_rtl.c,
rtlbtfw main.c, and rtlbtfw.conf.

Reviewed by:	wulf
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D56137
2026-03-29 22:00:59 +03:00
Christos Longros d82bcf5681 bluetooth: add device IDs for Intel AX411 and BE200 adapters
Add USB product IDs for Intel AX411 (0x0035) and BE200 (0x0036)
Bluetooth adapters to ng_ubt_intel, ng_ubt, iwmbtfw, and iwmbtfw.conf.

Both chips use the same TLV-based firmware protocol as the existing
9260/9560 entries.  Newer Blazar-generation chips (BE201, BE202,
Whale Peak 2) are omitted as they require IML support not yet
implemented in iwmbtfw.

Signed-off-by: Christos Longros <chris.longros@gmail.com>

Reviewed by:	wulf
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56122
2026-03-29 16:16:57 +03:00