aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* libpfctl: fix error handlingKristof Provost3 days1-2/+2
| | | | | | | In two cases we returned E2BIG where it should have been a boolean ('false'). MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
* date.1: Lint with mandocMateusz Piotrowski3 days1-17/+18
| | | | | | | | | | Specifically, remove Tn macors, replace Li with Ql, and escape %N to address date.1's rendering issues on man.freebsd.org. PR: 290801 Reported by: jinwookjeongg@gmail.com MFC after: 1 week Sponsored by: Klara, Inc.
* libcasper: Move everything to the libcasper packageLexi Winter3 days12-18/+6
| | | | | | | | | | | | The libcasper package exists to contain libcasper, but for some reason only the libcap_net service was in the package, with libcasper itself and the rest of the services being in runtime. Move everything to the libcasper package, except tests which stay in the tests package. MFC after: 1 day Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53576
* libkadm5clnt: Fix library symlink installLexi Winter3 days1-1/+2
| | | | | | | | | | | | | libkadm5clnt_mit installs a symlink from libkadm5clnt.so for backward compatibility, but it neglected to include the package tags, so the symlink was missing from pkgbase builds. Add ${DEV_TAG_ARGS} to the install command. Reported by: Mark Millard <marklmi@yahoo.com> MFC after: 1 day Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53574
* packages: Make set-base-dbg depend on set-optional-dbgLexi Winter3 days1-0/+3
| | | | | | | | | | | As set-base depends on set-optional, so should set-base-dbg depend on set-optional-dbg. Otherwise, people who install set-base-dbg will be missing a bunch of debug packages. MFC after: 1 day Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53575
* etc/mtree: Add package tags for /usr/includeLexi Winter3 days2-44/+44
| | | | | | | | | | | Set the default package to clibs-dev, since that's where the vast majority of include files comes from. Add explicit package tags for the directories which are installed in their own package. MFC after: 1 day Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53577
* posix_fallocate(2): move unsupported case to EOPNOTSUPPKyle Evans3 days1-4/+22
| | | | | | | | | | | | ZFS has since been changed to use EOPNOTSUPP instead of EINVAL, and fusefs/nfs are following suit. POSIX Issue 8 had also made this move, so it makes sense for us to standardize on EOPNOTSUPP. Note in the HISTORY section where we're diverging from our previous versions to align with the new standard. Reviewed by: asomers, imp (both previous version), kib Differential Revision: https://reviews.freebsd.org/D53537
* nfs_clvnops: standardize on EOPNOTSUPP for posix_fallocate(2)Kyle Evans3 days1-2/+6
| | | | | | | | | | POSIX Issue 7 had allowed EINVAL for this case, but issue 8 moves it to ENOTSUP instead. ZFS uses the latter and we have some software in ports already that's wanting to use that to detect the filesystem not supporting it, so let's standardize on it. Reviewed by: imp, kib, rmacklem Differential Revision: https://reviews.freebsd.org/D53536
* fusefs: standardize on OPNOTSUPP for posix_fallocate(2)Kyle Evans3 days2-11/+11
| | | | | | | | | | POSIX Issue 7 had allowed EINVAL for this case, but issue 8 moves it to ENOTSUP instead. ZFS uses the latter and we have some software in ports already that's wanting to use that to detect the filesystem not supporting it, so let's standardize on it. Reviewed by: imp (previous version), asomers, kib Differential Revision: https://reviews.freebsd.org/D53535
* makedev(9): drop an additional note about cdevpriv dtorsKyle Evans3 days1-4/+8
| | | | | | | | | | These were previously somewhat safe to call destroy_dev(9), but will now also cause a deadlock in the same fashion that d_close doing so would previously. Amend the note to point it out, in case it's useful for someone. Reviewed by: imp, kib, markj Differential Revision: https://reviews.freebsd.org/D53439
* if_tuntap: defer transient destroy_dev() to a taskqueueKyle Evans3 days1-6/+57
| | | | | | | | | | | | | | | | | | | | | | We're in the dtor, so we can't destroy it now without deadlocking after recent changes to make destroy_dev() provide a barrier. However, we know there isn't any other dtor to run, so we can go ahead and clean up our state and just prevent a use-after-free if someone races to open the device while we're trying to destroy it. tunopen() now uses the net epoch to protect against softc release by a concurrent tun_destroy(). While we're here, allow a destroy operation to proceed if we caught a signal in cv_wait_sig() but tun_busy dropped to 0 while we were waiting to acquire the lock. This was more of an inherent design flaw, rather than a bug in the below-refed commit. PR: 290575 Fixes: 4dbe6628179d ("devfs: make destroy_dev() a release [...]") Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D53438
* exterr: print exterr for struct buf and bio in ddb show commandsKonstantin Belousov3 days3-0/+7
| | | | | Noted by: imp Sponsored by: The FreeBSD Foundation
* exterr: add exterr_db_print(), to be used by several ddb dumpersKonstantin Belousov3 days2-0/+14
| | | | Sponsored by: The FreeBSD Foundation
* Revert "openssh: Don't try to bind to unsupported addresses"Dag-Erling Smørgrav4 days1-6/+0
| | | | | | | | | | | This doesn't actually do anything useful, since getifaddrs() will only return supported addresses. The root cause of the issue described in the PR lies earlier in the connection timeline, around the start of the ssh_create_socket() function. This reverts commit e5ff8e7977434b150a66bb3e472c6d0e0f644cfa. PR: 195231
* kexec: Add basic kexec_load man pageJustin Hibbits4 days3-1/+126
| | | | Also add kexec reboot flag to the reboot man page.
* ipsec_offload: do not leak drv_spi unrKonstantin Belousov4 days1-7/+6
| | | | | | | | | | | in the ipsec_accel_sa_newkey_cb() when the SA offload is only enabled on a specific different interface, not the current one. Also remove no longer relevant XXX comment. Noted and reviewed by: slavash Sponsored by: NVidia networking MFC after: 1 week
* sys/bio.h: print BIO_EXTERR flagKonstantin Belousov4 days1-1/+2
| | | | | Noted by: imp Sponsored by: The FreeBSD Foundation
* arm64/vmm: Move the vgic_max_cpu_count() checkMark Johnston4 days1-4/+6
| | | | | | | | | | | | | | vm_alloc_vcpu() is called quite frequently, and we don't need to apply the vgic limit unless we're actually allocating a vcpu structure for the first time. No functional change intended. Reviewed by: andrew MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53580
* virtio: Fix polling in virtqueue_dequeue()Mark Johnston4 days1-1/+2
| | | | | | | | | | | | | | The access of vq->vq_ring.used->idx needs to be volatile-qualified, otherwise the compiler may optimize virtqueue_poll() into an infinite loop if there is no data available upon the first poll. Prior to commit ad17789a8569 this wasn't a problem since an external function call after each poll inhibited the optimization. PR: 289930 MFC after: 3 days Sponsored by: Klara, Inc. Fixes: ad17789a8569 ("virtio: Remove the unused poll method")
* vmm: Move vm_maxcpu handling into MI codeMark Johnston4 days7-67/+27
| | | | | | | | | | No functional change intended. Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53477
* amd64/vmm: Remove an unused functionMark Johnston4 days2-13/+0
| | | | | | | | Reviewed by: corvink, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53423
* vmm: Consolidate VM name length checkingMark Johnston4 days12-62/+47
| | | | | | | | | | | | | | | | | | | vm_create() is only called from one place. Rather than having similar checks everywhere, move them to vmmdev_create(). We can safely assume that the name is nul-terminated, the vmmctl ioctl handler and the legacy sysctl handler ensure this. So, don't bother with strnlen(). Finally, make sure that the name buffers are the same size on all platforms. VM_MAX_NAMELEN is supposed to be the maximum, not including the nul terminator. Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53422
* vmm: Move the module load handler to vmm_dev.cMark Johnston4 days5-201/+90
| | | | | | | | | | | | | | | | | Move the vmm_initialized check out of vm_create() and into the legacy sysctl handler. If vmm_initialized is false, /dev/vmmctl will not be available and so cannot be used to create VMs. Introduce new MD vmm_modinit() and vmm_modcleanup() routines which handle MD (de)initialization. No functional change intended. Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53421
* amd64/vmm: Remove useless global variablesMark Johnston4 days1-8/+2
| | | | | | | | | | No functional change intended. Reviewed by: corvink, jhb, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53420
* amd64/vmm: Factor vcpu_notify_event() into two functionsMark Johnston4 days4-21/+28
| | | | | | | | | | | | | | | | | | | | vcpu_notify_event() previously took a boolean parameter which determines whether the implementation should try to use a posted interrupt. On arm64 and riscv, the implementation of vcpu_notify_event() is otherwise identical to that of amd64. With the aim of deduplicating vcpu state management code, introduce a separate amd64-only function which tries to use posted interrupts. This requires some duplication with vcpu_notify_event_locked(), but only a little bit. Then, fix up callers. No functional change intended. Reviewed by: corvink, jhb MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53419
* vmm: Simplify the VM_ALLOC_MEMSEG ioctl a bitMark Johnston4 days1-6/+2
| | | | | | | | | | | We can free the mask earlier, simplifying some error paths. No functional change intended. Reviewed by: corvink, jhb, emaste Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53418
* openssh: Don't try to bind to unsupported addressesDag-Erling Smørgrav4 days1-0/+6
| | | | | | | | | | | When selecting an address to bind to, skip IPv4 addresses if the kernel does not support the inet feature, and IPv6 addresses if the kernel does not support the inet6 feature. PR: 195231 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53561
* dtrace_callout_execute.4: Document the DTrace callout_execute providerMateusz Piotrowski4 days4-2/+74
| | | | | | MFC after: 2 weeks Fixes: 91dd9aae1ab8 Add explicit static DTrace tracing to the callout mechanism Differential Revision: https://reviews.freebsd.org/D51397
* buf.9: Sprinkle with mdoc macrosMateusz Piotrowski4 days1-25/+72
| | | | | | | | | I did not bump the date here as the manual page looks more like a draft and I'm not sure if it is actually up-to-date considering that it's current Dd dates back to 1998. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52770
* geom/geom_vfs.c: use EXTERROR_KE() in g_vfs_strategy for ENXIOsKonstantin Belousov4 days1-0/+2
| | | | | | | | As an example of use for the bp_exterr infrastructure. Reviewed by: mckusick Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D53351
* exterror(9): add infra for bufs and biosKonstantin Belousov4 days8-11/+54
| | | | | | | | | | | | | | | | | | | | | | | | | The extended error can be stored in either struct bio or struct buf, indicated by BIO_EXTERR bio_flag. At some strategic places, it is copied into the current thread extended error. This structure is required because io request from the top might pass down through several io threads and the context that can report meaningful extended error does not belong to the thread that initiated the io. Sizes before the change, on amd64 nodebug: sizeof(struct buf) = 456 sizeof(struct bio) = 376 after: sizeof(struct buf) = 496 sizeof(struct bio) = 408 WIP: more geom providers should handle BIO_EXTERR when passing cloned bios down and then handling completions. Reviewed by: mckusick Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D53351
* exterror(9): add two helpersKonstantin Belousov4 days2-0/+21
| | | | | | | | | | | The exterr_set_from() function sets current thread extended error from the pre-filled struct kexterr. The exterr_clear() function clears some struct kexterr. Reviewed by: mckusick Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D53351
* exterror(9): add SETEXTERROR_KE() macroKonstantin Belousov4 days1-0/+20
| | | | | | | | | It fills the extended error data into explicitly passed pointer to the struct kexterr instead of td_kexterr for current thread. Reviewed by: mckusick Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D53351
* sys/: rename bio_error variable to abio_errorKonstantin Belousov4 days3-16/+16
| | | | | | | | to prevent future name collision with some buf/bio macros Reviewed by: mckusick Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D53351
* ifconfig: Fix invalid free() in ifbridgeLexi Winter4 days1-3/+5
| | | | | | | | | | | | | | | | parse_vlans() does 's = strdup(str)', then calls strsep(&s, ...), then attempts to free(s) at the end of the function. For the success case, this is fine (s is NULL, so it's a trivial memory leak), but in the error case, we will attempt to free an invalid pointer. Fix this by storing the original return value from strdup() and freeing that instead. MFC after: 3 seconds Reported by: David Gwynne <dlg@openbsd.org> Reviewed by: zlei, kevans Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53545
* release: Make fetch happen in GCE imagesColin Percival4 days1-2/+3
| | | | | | | | | | We want to fetch distfiles, regardless of whether they contain known vulnerabilities or we're building images for a different version of FreeBSD. Reviewed by: ivy MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53569
* release: Don't try to fetch distfiles for pkgbaseColin Percival4 days1-1/+1
| | | | | | | | | | | In order to comply with the require that GCE images must include their source code, we fetch distfiles for all of the packages installed into GCE images. This fails for obvious reasons for packages with an origin of base/*; filter those out to generate the list to fetch. Reviewed by: ivy MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53568
* release: GCE builds depend on ftpColin Percival4 days1-0/+7
| | | | | | | | | | | | GCE images are required by Google to include their source code; we do this by extracting {src,ports}.txz into the images, from the (legacy) distribution sets. Make sure those distribution sets actually exist. Reviewed by: ivy MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53567
* cut.1: Align option list and tag spdxAlexander Ziaee4 days1-1/+4
| | | | MFC after: 3 days
* Refinements to the --libxo support for geom status and list sub commands.Kirk McKusick4 days1-55/+70
| | | | | | | | | | | | Changes based on comments in D53110: tags should be lowercase; rename a few containers so that the JSON/XML output says "DISK" or "MULTIPATH" (depending on class) instead of a generic "Geom"; adds {t:} to trim extra whitespaces that sometimes appeared in the value fields of JSON/XML output. Submitted-by: Johan Söllvander MFC-after: 1 week Differential Revision: https://reviews.freebsd.org/D53313
* vmimage.subr: pkg autoremove after pkg installColin Percival4 days1-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | A bug in pkg, which somehow only surfaced as a consequence of pkgbase, results in pkg install sometimes pulling in false dependencies. This problem might be limited to cases when the lib32 pkgbase packages are not installed. In the case of EC2 "small" images, installing the ebsnvme-id package results in binutils, gcc12-devel, gmp, indexinfo, liblz4, mpc, mpfr, and zstd packages being installed. These false dependencies are however not recorded as dependencies -- at some level pkg does understand that they're not needed -- so running pkg autoremove immediately after pkg install cleans them up. Note: This does not remove lines from METALOG corresponding to these packages, and makefs emits an error when it attempts to create the filesystem but cannot find the files listed in METALOG -- but makefs does seem to complete normally despite the error messages. This change should be reverted once the pkg issue has been located and fixed. Reviewed by: ivy MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53543
* contrib/bsddialog: import 1.1Alfonso S. Siciliano5 days14-34/+854
|\ | | | | | | | | | | | | | | | | | | | | | | Add: slider dialog. Imported to enable testing and to complete the geomman(8) utility. Developed as part of the "Full Disk Administration Tool for FreeBSD" project, Braulio Rivas (brauliorivas@), Google Summer of Code 2025. Sponsored by: Google LLC (GSoC 2025) Merge commit '5a70558d32b9680c10ab579c7491652e0838cee4'
| * contrib/bsddialog: import 1.1vendor/bsddialog/1.1vendor/bsddialogBraulio Rivas5 days13-34/+853
| | | | | | | | | | | | | | | | | | | | Add: slider dialog. Imported to enable testing and to complete the geomman(8) utility. Developed as part of the "Full Disk Administration Tool for FreeBSD" project, Braulio Rivas (brauliorivas@), Google Summer of Code 2025. Sponsored by: Google LLC (GSoC 2025)
* | fusefs: respect the server's FUSE_SETXATTR_EXT flagAlan Somers5 days4-18/+59
| | | | | | | | | | | | | | | | | | | | | | | | FUSE protocol 7.33 extended the FUSE_SETXATTR request format. But the extension is optional. The server must opt-in by setting the FUSE_SETXATTR_IN flag during FUSE_INIT. We were wrongly using the extended format for any server using protocol 7.33 or later. PR: 290547 Co-authored-by: CismonX <admin@cismon.net> Fixes: d5e3cf41e89 ("fusefs: Upgrade FUSE protocol to version 7.33") MFC after: 3 days
* | pf.conf.5: add nat-to/rdr-to to BNFKristof Provost5 days1-1/+7
| | | | | | | | | | | | PR: 290705 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
* | dtrace_vfs.4: Document the DTrace vfs providerMateusz Piotrowski5 days4-3/+103
| | | | | | | | | | | | Reviewed by: bcr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D51317
* | tb_pci: Don't try to attach to PCI buses that aren't below a PCI-PCI brigeJohn Baldwin5 days1-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver is a subclass of the normal PCI bus driver that is intended to be used for the logical child bus of a Thunderbolt PCI-PCI bridge device. To determine if a given PCI bus's parent is a TB bridge, it examines the PCI device IDs of the parent pcibX device. However, this only works for pcibX devices that are actual PCI-PCI bridges and panics for PCI buses that are children of host bridges such as the pci0 child of pcib0. Probably this should not be reading device IDs (as that doesn't tell you if the device driver for the PCI-PCI bridge is actually a TB driver). Instead, the TB PCI-PCI driver should be exporting a new IVAR (with a globally unique number as we do for ACPI handles) that returns the TB generation and the probe routine for this PCI bus driver should be checking for that IVAR (the way acpi_pci.c checks for the presence of an ACPI handle). This fixes a panic on boot if tb.ko is loaded at boot time (which the driver recommends for certain chipsets). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53202
* | ddb: provide inp_flags2 when printing inpcbsMichael Tuexen5 days2-0/+10
| | | | | | | | | | | | | | Reviewed by: markj, Peter Lei MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D53542
* | tcp: drop SYN ACK segment for listening socketsMichael Tuexen5 days3-21/+2
| | | | | | | | | | | | | | | | | | | | | | | | When a SYN ACK is received for a listening socket, just drop it instead of killing the SYN-cache entry and send a RST. This closes the possibility to kill a TCP connection during its handling in the SYN-cache. Reviewed by: Nick Banks, Peter Lei MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D53540
* | cron: Use reallocarray() to prevent integer overflowXin LI5 days1-3/+2
| | | | | | | | | | | | | | | | Apply OpenBSD env.c,v 1.24 and 1.25, which replaces manual size calculations with reallocarray() to prevent possible integer overflow. MFC after: 3 days