aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* rtsold: Validate entries in domain search listsMark Johnston2025-12-161-6/+40
| | | | | | | Reported by: Kevin Day <kevin@your.org> Approved by: so Security: FreeBSD-SA-25:12.rtsold Security: CVE-2025-14558
* freebsd-update: Library orderingColin Percival2025-09-301-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Upgrading from 14.x to 15.x with freebsd-update broke because libc depends on the new libsys library; freebsd-update installed the new libc before creating libsys, and every step after that failed because all the tools (including gunzip and install) are dynamically linked and need a working libc. Enforce ordering when installing shared objects: First libsys, then libc, then libthr, and then all the rest of the shared object files. This is a candidate for an Errata Notice since the issue this fixes breaks upgrades. PR: 289769 Reported by: Graham Perrin Reviewed by: kib MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52688 Approved by: so Security: FreeBSD-EN-25:18.freebsd-update (cherry picked from commit 7ece602e00e85195fc426a2401c49921cd39735e) (cherry picked from commit e26928669f39c8683aea74040b9e2472e944c43a)
* certctl: Split certificate bundles before processing.Dag-Erling Smørgrav2025-05-301-37/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows 'certctl rehash' to do the right thing when ca_root_nss is installed, instead of linking the entire bundle to the hash of the first certificate it contains. MFC after: 3 days Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D42087 (cherry picked from commit a401c8cb26b22688087ad7c5ee527718459df15a) certctl: Fix recent regressions. - If an untrusted certificate is also found in the list of trusted certificate, issue a warning and skip it, but don't fail. - Split on -+BEGIN CERTIFICATE-+ instead of "Certificate:" since that's what we're really looking for. Also fix a long-standing bug: .crl files are not certificates, so we should not include them when searching for certificates. Reported by: madpilot, netchild, tijl Reviewed by: netchild, allanjude Differential Revision: https://reviews.freebsd.org/D42276 (cherry picked from commit 87945a082980260b52507ad5bfb3a0ce773a80da) certctl: Convert line endings before inspecting files. This ensures that certificate files or bundles with DOS or Mac line endings are recognized as such and handled identically to those with Unix line endings. PR: 274952 Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D42490 (cherry picked from commit f7d16a627efa8ba610eb9b8a12dd67b6cdbb2542) certctl: Revert to symlinks. Unfortunately tar will not be able to extract base.txz to a system where /etc and /usr are not on the same filesystem if the certificates are hard links. PR: 277828 Reviewed by: mp Differential Revision: https://reviews.freebsd.org/D44496 (cherry picked from commit 3fed4f0db53a66a0135bea5c491431eb3348cf51) (cherry picked from commit 9c34a6876a60dc10fda6ad6a0cbe8f99a372aadc) Approved by: re (cperciva)
* pkg.conf: Use kmod repositoriesColin Percival2025-05-292-0/+14
| | | | | | | | | | | | | | The kmod repositories were added shortly after 14.2-RELEASE. Point at them here so that users don't need to manually add the configuration in order to get e.g. working graphics. Approved by: re (cperciva) MFC after: 1 minute Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D50583 (cherry picked from commit 29f076ae0cb536d1e891d3375edf28f1bc82df79) (cherry picked from commit 8a2ce9f9dd6745e77bdfe78f03e96ddc8ad1b9d7)
* bsdinstall: Use a login shell for final configuration.Dag-Erling Smørgrav2025-05-141-1/+1
| | | | | | | | | | | | | | | If the user accepts our offer of a shell to perform final configuration tasks before rebooting, start a login shell. This ensures it will have the correct PATH and be able to install packages without issues. Approved by: re (cperciva) PR: 286722 MFC after: 3 days Reviewed by: jrtc27, allanjude, emaste Differential Revision: https://reviews.freebsd.org/D50297 (cherry picked from commit 5870d6a1ef4ec5d6fc91d0f1635bca59e09a040d) (cherry picked from commit 242b52ba3c38108f2c2af4194a031ed495b95dbc)
* mountd: Fix updating the network/host(s) for an exports lineRick Macklem2025-05-041-1/+43
| | | | | | | | | | | | | | | | | | | | Mountd reloads the exports(5) file(s) when it receives a SIGHUP and then compares the old and new exports, updating any ones that have changed in the kernel. Without this patch, mountd failed to recognize that a network/host(s) had changed, if there was no other change to the exports line. As such, the change of network/hosts(s) did not take effect until the mountd daemon was (re)started. This patch fixes the code so that it checks for changes in the network/host(s) list for an exports line. PR: 286260 Approved by: re (cperciva) (cherry picked from commit 68daa781c1f12e1cfef768030eaff970c3d35543) (cherry picked from commit 37abcf06f2100eeca41dbd67f8ca8228903ce5e8)
* ctld: correctly parse LUN size on 32-bit archesAlan Somers2025-04-172-2/+2
| | | | | | | | | | Disk offset values must always be 64-bit, not size_t. PR: 214874 Submitted by: pprocacci@gmail.com Event: January 2025 Bug-busting session (cherry picked from commit f26fe2c6669d56621ac85f5279aa85503cbf59bc)
* pkg.7: Add example for fetching package for different FreeBSD versionsChristos Margiolis2025-04-081-1/+6
| | | | | | | | MFC after: 1 week Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D49580 (cherry picked from commit 8900283fa37f6555055d8af5ffa1a5a2fbe2940e)
* mixer tests: SerializeMark Johnston2025-04-061-0/+3
| | | | | | | These tests modify attributes of a global mixer device, and aren't prepared to run in parallel. (cherry picked from commit c6b41ba65021eff2b1db9157f813666a3e0543a1)
* snmp_pf: fix pfInterfacesIfRefsStateKristof Provost2025-04-032-9/+7
| | | | | | | | | | | | | | | | | | | | pfInterfacesIfRefsState was described as 'Null', which upset bsnmpwalk's attempt to resolve OIDs to symbolic names: > bsnmpwalk: Error adding leaf pfInterfacesIfRefsState to list This was done back in d6d3f01e0a339, because we don't return this value any more. Return it to 'Unsigned32', which fixes things, even if we still don't actually return this value. While here update the ORGANIZATION to reflect current ownership. Reviewed by: philip MFC after: 2 weeks Event: Tokyo Hackathon 202503 Differential Revision: https://reviews.freebsd.org/D49413 (cherry picked from commit 712309a64512c7e4ebf0e10de8a5c59d5a185ae8)
* pkg: Fix Coverity warningsMark Johnston2025-03-262-8/+11
| | | | | | | | | | | - Fix allocation size in config_get_repositories(). - Fix a memory leak in read_conf_file(). - Avoid a null pointer dereference in an error path in verify_pubsignature(). Fixes: e3b4a51580fc ("pkg(7): expand VERSION_MAJOR, VERSION_MINOR, RELEASE and OSNAME") Fixes: dc4581589a32 ("pkg: clean support for repositories") (cherry picked from commit c1557708f1fae1bb9c8e23e3bbb2aa2b055e1211)
* Copy the new ia32 loaderAhmad Khalifa2025-03-261-14/+22
| | | | | | | | | | | | | | | | | | This handles copying in install-boot.sh and bsdinstall's bootconfig. install-boot.sh: make_esp_file now optionally takes extra arguments so it can copy multiple files. This is used by the amd64 release scripts. make_esp_device also takes an extra optional argument for efibootname. This is currently unused, but it can be used in the future to do something like: make_esp_device loader.efi bootx64 make_esp_device loader_ia32.efi bootia32 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098 (cherry picked from commit 599273f942b8dc6f957487bb28f36694dab9dad2)
* nfsd.8: Note that the -n option is deprecatedRick Macklem2025-03-251-10/+20
| | | | | | | | | | | | | | | | | | | | | | | PR#284616 reported that --maxthreads did not obey the 256 thread limit defined as MAXNFSDCNT in nfsd.c. This is actually a feature and not a bug, since many NFS servers will now want to run more than 256 threads and --maxthreads can be used to set the upper bound on the number of threads. (MAXNFSDCNT was used long ago to define how many daemons would be forked, before daemons were replaced by kernel threads.) However, the nfsd.8 man page was misleading, since it indicated that "-n" was the equivalent to setting both --minthreads and --maxthreads to the same value. This patch fixes the man page. This is a content change. PR: 284616 (cherry picked from commit f27afbd850021b9cb7cf4e66f0621c793ad37de0)
* MFC jail: add jexec -d, to specify a working directoryJamie Gritton2025-03-092-9/+22
| | | | | | | PR: 283170 Submitted by: DtxdF at disroot.org (cherry picked from commit d56f3b051f6135b4a675fd75ccfcef0310368781)
* bhyve: Avoid holding /dev/pci open unnecessarilyMark Johnston2025-03-071-36/+83
| | | | | | | | | | | | | | | | | | | | Some device models, LPC in particular, will call pci_host_read_config() when probing for devices. Currently this results in pcifd_init() opening /dev/pci, and thus bhyve holds the fd open even when it's not needed. Modify pci_host_{read,write}_config() to open /dev/pci independent of the global pcifd. This means that these routines can only be used during VM initialization, as capsicum will prevent further opens afterward. Introduce internal wrappers which use the global pcifd, intended for the passthru code. Reviewed by: jhb MFC after: 3 weeks Fixes: 563fd2240e13 ("bhyve: export funcs for read/write pci config") Differential Revision: https://reviews.freebsd.org/D48908 (cherry picked from commit 649a910e34b0314647d16a94f8af6de0f4cfd4b5)
* pkg(7): expand VERSION_MAJOR, VERSION_MINOR, RELEASE and OSNAMEBaptiste Daroussin2025-03-061-0/+17
| | | | | | | | Catchup with pkg(8) by expanding more variable when parsing repositories The only missing variable now is ARCH, this will have to wait for pkg 2.0 to be the lowest supported version. (cherry picked from commit e3b4a51580fcd4a1ddf0d61feb5f325ff1de5420)
* pkg(7): support configuration overwrite like pkg(8)Baptiste Daroussin2025-03-061-12/+41
| | | | | | | | | | | | | | | | | with pkg(8) it is possible to overwrite a configuration like adding FreeBSD { enabled: false } in /usr/local/etc/pkg/repo/overwrite.conf which allows to change any value which can have been reviously configured in anything in /etc/pkg/*.conf now the bootstrap supports the same MFC After: 3 weeks (cherry picked from commit 5c341fe5123d4aa6961066542de63dd4431d004d)
* pkg: make sure the repositories have at least an urlBaptiste Daroussin2025-03-061-10/+18
| | | | | | While here, factorize code to free the repository structure (cherry picked from commit eccf736c3ce6e9566fa9923080b4c24ee7f9ae2a)
* pkg: clean support for repositoriesBaptiste Daroussin2025-03-063-115/+216
| | | | | | | | | | | | | | Rework the way the bootstrap fetches pkg, by implementing a full support for the repositories, the boostrap will now loop over all available repo and try to fetch the full package from there. It will at the first valid package found. Fallback to packagesite (which has been deprecated for a while) if needed, by transforming it into a repo, if no repo is found. MFC After: 3 weeks (cherry picked from commit dc4581589a3256667fafd46a30c67abdfd86618f)
* acpidump: do not use pointer arithmetic to check for overflowKonstantin Belousov2025-03-051-4/+5
| | | | | | PR: 204945 (cherry picked from commit 8c108dccd7f878ad44aaef1f5bfb5622666bd09a)
* makefs: Make cd9660 Rock Ridge inodes reproducibleEd Maste2025-03-043-10/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rock Ridge extensions include an inode field: "POSIX File Serial Number" shall have the same meaning as and may be used for the st_ino field of POSIX:5.6.1. This field shall be recorded according to ISO 9660:7.3.3. Directory Records which share the value of this field are defined as links (see POSIX:2.2.2.17) and, by definition, point to the same file or directory. Previously we'd store the source file's st_ino (except that in metalog mode we'd record 0 for files with nlink = 1). This had two issues: the generated ISO image was nonreproducible due to the arbitrary inode numbers, and files without hard links would falsely be detected (by certain tools) as hard links to each other. Note that the kernel's cd9660(5) file system ignores the Rock Ridge PX File Serial Number, so this issue isn't observed by mounting such a file system. Instead of using the source inode directly, assign target inode numbers sequentially. Use a map so that files with the same source inode (hard links) still receive the same target inode number. PR: 284795 PR: 285027 Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49141 (cherry picked from commit 518cdd344ec51584478f39b9a9cac77fc0766ce1) (cherry picked from commit 337f5e7a44c4d5ac29e0b0c0fe957bb3b9bae222) (cherry picked from commit a18be39aafc1b55fd67603ee6a6d820d0fcd877f)
* iwmbtfw(8): fix getopt flags, unify usage()/manual page contentsEygene Ryabinkin2025-03-012-6/+7
| | | | | | | | | | | | | | | | | | | | | | | Seems like there was an intention to use command line switches -m, -p and -v (each with argument), but there is no handling for them. Also, some enhancements to the usage()/manpage: - use FreeBSD manpage style -- square brackets -- for denoting optional arguments in usage(); - show default directory path in usage(); - update manual: -f is the optional flag; - show descriptions for -I/-D together: they are logically related. Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org> Reviewed by: wulf MFC after: 1 month (cherry picked from commit 0feaf865ce8e333f834177a5656e57b5e32ad5cf)
* iwmbtfw(8): don't program hardware without existing firmware imageEygene Ryabinkin2025-03-011-27/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | One should not start firmware update sequence just to understand that there is no firmware image to program: update sequence for 7260 requires leaving manufacturing mode and in the case of missing firmware file it will trigger complete re-initialization of BT adapter. Which, in turn, will make the USB device to go away and reappear. Since devd(8) has hooks for USB device attachment, in the case of missing firmware it used to - trigger the (failing) firmware download, - which triggers device reset, - which creates USB notification and devd(8) kicks back in. Nice infinite cycle with many notifications via syslog: {{{ Jan 3 09:00:01 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0 Jan 3 09:00:01 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0 (disconnected) Jan 3 09:00:02 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0 Jan 3 09:00:02 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0 (disconnected) }}} Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org> Reviewed by: wulf MFC after: 1 month (cherry picked from commit ff4116313eb4a5e6c24a688edf5df1e19eb82042)
* Refactor iwmbtfw: modularize and de-constifyEygene Ryabinkin2025-03-015-266/+298
| | | | | | | | | | | | | | | | - Move logic for firmware download into different adapter types to the own functions to allow main() to be simpler - Use enums/typedefs for exit modes, image types, etc - Purge most obvious comments: functions are named properly, so most of their invocations self-document the code. Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org> Reviewed by: wulf MFC after: 1 month (cherry picked from commit 06969db312022277729dd144e3655a90007306ef)
* Refactor iwmbtfw: set default firmware_dir after argument parsingEygene Ryabinkin2025-03-011-12/+4
| | | | | | | | | | Don't repeat firmware_dir stanza at all "if" branches: be more DRY. Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org> Reviewed by: wulf MFC after: 1 month (cherry picked from commit f466ba4ca479ec500b927deadaba104469662994)
* pmcannotate: Add a '-m' mode option to control per-line annotations.John Baldwin2025-02-272-9/+60
| | | | | | | | | | | | | | | - "block" (the default mode) displays per-block percentages in front of each annotated line. - "global" displays a global percentage in front of each line. - "raw" displays the raw count of sample hits in front of each line. Reviewed by: Pau Amma <pauamma@gundo.com>, mav Sponsored by: University of Cambridge, Google, Inc. Differential Revision: https://reviews.freebsd.org/D35401 (cherry picked from commit de11299323e0a647ae2164f74ca966862e7c4dd8)
* cxgbetool.8: Consistently use .Cm for loader tunablesJohn Baldwin2025-02-271-1/+3
| | | | | | Sponsored by: Chelsio Communications (cherry picked from commit 34fbc9e421e7fbb382a644d8d289311455681734)
* cxgbe: Tidy TOE tunables under hw.cxgbeJohn Baldwin2025-02-271-2/+2
| | | | | | | | | | | | | | | | - Only two of these tunables are used for RATELIMIT without TCP_OFFLOAD. - Mark t4_tmr_idx_ofld and t4_pktc_idx_ofld static. - Move hw.cxgbe.cop_managed_offloading under hw.cxgbe.toe since it is specific to TOE. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D47765 (cherry picked from commit 90652188232458891a2922fb5a542971aa58055d)
* ports/filesystems: Fix falloutAlexander Ziaee2025-02-271-2/+2
| | | | | | | | | | | | | | | A new filesystems category was created in the ports tree, with 142 filesystem related ports moved to there, some of them renamed. Update all references in the src tree to the new locations. PR: 283881 Fixes: ports:6e2da9672f79f44 (filesystems: add new category) MFC after: 1 month Reviewed by: fuz, mhorne, bapt Accepted by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D48406 (cherry picked from commit 066ef2aec187ae93a9df01d25fa8e47d67ff972b)
* gstat: Sync usage/synopsis + tag SPDXAlexander Ziaee2025-02-272-11/+14
| | | | | | | | | | Sort options using the slightly unusual convention used here as well. MFC after: 3 days Approved by: carlavilla (mentor), imp (src) Differential Revision: https://reviews.freebsd.org/D48800 (cherry picked from commit 8b35839346d0bd8d4244018489bfdef8fd48de53)
* usbconfig: add -l option to dump_device_desc for single line outputBjoern A. Zeeb2025-02-264-27/+147
| | | | | | | | | | | | | | | | | | Like pciconf -l add a -l to dump_device_desc for usbconfig which will fold most fields into a single line. We do filter out some we think will not be interesting in this case. While mangling with string output in ways not always anticipated when the program was initially written this should help to parse the available devices for programs like fwget(8). While I had this in mind for other bits for a while I got prompted by D48678 to finally do it. Sponsored by: The FreebSD Foundation Reviewed by: bapt (LGTM), ziaee (man) Differential Revision: https://reviews.freebsd.org/D48974 (cherry picked from commit c66308d7bcc3931b60a096bfe6ba0f50105e77de)
* lpd: Tighten permissions on /var/run/printerStanislav Shalunov2025-02-241-1/+1
| | | | | | | | | | | | Exclude group read/write permissions as well. Otherwise, group wheel can submit things w/o the normal accounting. While group wheel is generally trusted on the machine, submitting jobs w/o checks is not one of the functions we document for that group. PR: 17289 Differential Revision: https://reviews.freebsd.org/D47040 (cherry picked from commit 6cde8f3ef7cd060be39d78055eaf982b06b19a3b)
* certctl: Set METALOG ownership to root:wheelEd Maste2025-02-201-2/+2
| | | | | | | | | | | | | | | | | This sets the correct ownership values when building base.txz install(1) does not validate the arguments passed to -o or -g (see PR283355) so there's no need to have the passwd db available for now. Future work includes plumbing the appropriate passwd db path through certctl, and validating uid and gid in install(1). PR: 283340 Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D48506 (cherry picked from commit 10fa3f2518d4582c98d74527f79af9f30b1eceab) (cherry picked from commit 98bebc20cef7527ccb15f8defc9d52e803a0d506) (cherry picked from commit 4d15b58365ea706129bedfdb37e0c5e8661a640f)
* certctl: Clean up.Dag-Erling Smørgrav2025-02-201-74/+99
| | | | | | | | MFC after: 3 days Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D42086 (cherry picked from commit 1525625c7c945856d4814987fd65784fd62cba74)
* Deprecate publickey(5) stuffEmmanuel Vadot2025-02-202-0/+6
| | | | | | | | | | This uses DES and it's likely that nobody uses that in 2025. If somebody uses this we help them by deprecating and removing this. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D30682 (cherry picked from commit 723425f837270dd3b22098168ae9464a1ebe38c6)
* iwmbtfw: Check firmware exists before trying to upload itGavin Atkinson2025-02-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case of an Intel 7260 device, the device needs to be put into something called "manufacturer mode" before the firmware is uploaded. The firmware is then upladed, and the card is taken out of this mode, at which point it disconnects and reconnects to the USB bus, and is at that point usable. However, iwmbtfw(8) puts the device into manufacturer mode before verifying that there exists a copy of the firmware to upload. As a result, in the case where there is no firmware available on disk, the device is put into manufacturer mode, the firmware can't be found so isn't uploaded, and the card is brought out of manufacturer mode, so it disconnects and reconnects to the USB bus. Enter devd(8). There are rules in /etc/devd/iwmbtfw.conf to call iwmbtfw(8) when the device appears. When there's no firmware on disk, devd will call iwmbtfw, iwmbtfw will try to do its thing and fail, the device will dis/reconnect, and devd will notice the device reappear and start the whole loop again. Fix is to verify that the firmware exists before putting the device into its special mode. The fix only changes things for the 7260 and not the other chips supported, I don't believe the issue exists with other chips as those do not need to be switched into manufacturer mode before uploading. PR: 283896 Reviewed by: emaste (cherry picked from commit b8cdbe1852ef5df4ba3c7a021d9632bde2e61327)
* MFC jls: fix the -q option to put quotes around all whitespaceJamie Gritton2025-02-171-6/+15
| | | | | | PR: 283414 (cherry picked from commit 3d11af1e595b5a3646be370e33c4aa850dc62bb0)
* MFC jls: admit that jail parameters with newlines print multiple linesJamie Gritton2025-02-171-5/+5
| | | | | | | PR: 283414 Reported by: dch (cherry picked from commit b144e883cac8c60175c89508f14fc6804869181a)
* pac: Consistently use item count as the first argument to callocJohn Baldwin2025-02-131-2/+2
| | | | | | Reported by: GCC 14 -Wcalloc-transposed-args (cherry picked from commit 22956bc9dc907296196a37525a6726f6ba2c06ed)
* pac: Use strdup and asprintf in place of dubious string buildingJohn Baldwin2025-02-131-6/+3
| | | | | | | GCC 14 warned about transposed arguments to calloc, but these cases are better served by more abstract string functions. (cherry picked from commit f94513a3a36b50823c3918c93ee5c6bf5f525e91)
* periodic: set _localbase for periodic scripts from within periodic.confJuraj Lutter2025-02-112-8/+13
| | | | | | | | | | | | | | Set _localbase variable from within /etc/defaults/periodic.conf for use by periodic scripts. This fixes e5d7100c09, no other functional changes intended. Reported by: gahr, otis Reviewed by: markj, gahr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47486 (cherry picked from commit c8b89c11a1181e900acb638cfde7a55e92553175)
* iwlwifi: update Intel's iwlwifi/mvm driver.Bjoern A. Zeeb2025-02-101-1/+32
| | | | | | | | | | This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit a4128aad8503277614f2d214011ef60a19447b83)
* jls.8: Reference correct manpage for libxo optionsEd Maste2025-02-071-3/+3
| | | | | | | PR: 284135 Sponsored by: The FreeBSD Foundation (cherry picked from commit 90670e0e275c6e36fc7e14368fc4e3e7f1d3671d)
* bhyve: Implement the libslirp notify callbackMark Johnston2025-02-071-22/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | libslirp can invoke a callback when received data is removed from a socket buffer, generally because the guest ACKed some data. Previously it didn't do anything, but it needs to wake up the poll thread to get reasonable throughput. Suppose one is using scp to copy data into a guest filesystem via the slirp backend. Data is received on libslirp's socket, which we poll for data in slirp_pollfd_td_loop(). That data gets buffered in priv->pipe, and eventually is placed in the device model's RX rings by the backend's mevent handler. When implementing TCP, libslirp holds on to a copy of data until it's ACKed by the guest via slirp_send(), at which point it drops that data and invokes the notify callback. The initial implementation of this backend didn't take into account the fact that slirp_pollfds_fill() will not add libslirp's socket to the pollfd set if more than a threshold amount of data is already buffered. Then poll() needs to time out before the backend sends more data to the guest. With a default timeout of 500ms, this kills throughput. Use a pipe to implement a simple in-band signal to the poll thread so that it reacts quickly when more buffer space becomes available. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D48192 (cherry picked from commit 20a51e6073f488440e108c7c628231cd6ae6757e)
* bhyve: Use a non-blocking read in slirp_recv()Mark Johnston2025-02-071-2/+13
| | | | | | | | | | | | | | | | | When using the slirp backend with the e1000 frontend, I otherwise get hangs in readv(), caused by the e1000 emulation not checking whether bytes are available before trying to read them. In particular, that device model expects the recv callback to return 0 if no bytes are available, and with slirp it would end up blocking forever. The virtio device model uses the peek_recvlen to check first, so I didn't notice the problem when implementing the slirp backend. Make the slirp backend more flexible to accommodate e1000. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D48164 (cherry picked from commit d3bdfa583044dbfb76ef777939b86bb68baebee7)
* Defer the January 19, 2038 date limit in UFS1 filesystems to February 7, 2106Kirk McKusick2025-02-063-58/+49
| | | | | | | | | | | | Standardize the definition of a UFS dinode Differential Revision: https://reviews.freebsd.org/D48472 (cherry picked from commit 1111a44301da39d7b7459c784230e1405e8980f8) (cherry picked from commit aa90fbed151de512ab6e59f75df009533a15751f) (cherry picked from commit 256389eaf158acaf67f0530764be8af68edee78c) (cherry picked from commit 6cd973d903c8f214d84daf91eb75047631bf1618) (cherry picked from commit e1ebda4458bbaf7d85fb803e20f3afc5441f24d9)
* ip6addrctl(8): Teach ip6addrctl to attach and run itself in a jailZhenlei Huang2025-02-063-18/+85
| | | | | | | | | | | | | This will make it easier to manage address selection policies of vnet jails, especially for those light weighted OCI containers or slim jails. Requested by: dfr Reviewed by: dfr, markj MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D48679 (cherry picked from commit 6dcdd79a251b5e62ff9ce562ad451e92dec39408)
* ip6addrctl(8): Strictly check the number of argumentsZhenlei Huang2025-02-061-4/+6
| | | | | | | | | | The additional arguments are useless but may tempt user a wrong usage. Reviewed by: dfr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48701 (cherry picked from commit 13ce55b66fad2b2b4054a89a1a906f58dc33683b)
* bsdinstall/zfsboot: Remove unused global variableAlexander Ziaee2025-02-041-1/+0
| | | | | | | | | | | | | | | | | In an AMA session on the FreeBSD Discord, it was revealed that no logic remains calling GPART_BOOTCODE_PARTONLY. It was removed in aa2a0e0fc311 for FreeBSD 12. git grep shows no other references. No functional change intended. MFC after: 2 weeks Fixes: aa2a0e0fc311 (Enable new UEFI+GELI support) Reported by: Antranig Vartanian <antranigv@freebsd.am> Reviewed by: emaste, mhorne Approved by: emaste, mhorne (src) Approved by: mhorne, carlavilla (mentors) Differential Revision: https://reviews.freebsd.org/D48086 (cherry picked from commit 347eb42dbcb352f3266e716a2101898fe054bdba)
* ip6addrctl(8): Use static initializerZhenlei Huang2025-02-031-3/+1
| | | | | | MFC after: 1 week (cherry picked from commit 7bb9ba61d35703c8a819c3745b8a2b1feb56923d)