Some ZAPs are used to represent sets, in which keys and values are the
same. Add a helper function for this case. No functional change
intended.
MFC after: 1 week
Use sizeofs of structures corresponding to the parsed device entry.
This does not change the calculation, but fixes logical inconsistency.
Sponsored by: The FreeBSD Foundation
Sponsored by: Advanced Micro Devices (AMD)
MFC after: 1 week
+ descriptions no longer wrap on a standard console, no keywords removed
+ more consistent language with other firmware tooling manuals
MFC after: 3 days
Reviewed by: imp (bumped date for Nd changes)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1266
When removing a user's home directory, if the directory is a ZFS
dataset, it cannot be removed. If the directory has been emptied,
use "zfs destroy" to destroy it. This complements the automatic
dataset creation in adduser. Note that datasets within the directory
and snapshots are not handled, as the complete path is not constructed.
While here, add waitpid() calls to rmat() and pw_user_del().
Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D45348
In a normal code path while setting up GPU passthrough, the size
parameter to munmap() is wrong and its operation not checked for errors,
therefore leaking resources.
Reported by: Coverity Scan
CID: 1519830
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1262
Add a handle variant of pfctl_get_rule(). This converts us from using
the nvlist variant to the netlink variant, and also moves us closer to a
world where all libpfctl functions take the handle.
While here have pfctl use the new function.
Sponsored by: Rubicon Communications, LLC ("Netgate")
fts has different types for its compare rotuine. Other systems, not
4.4BSD based, have a non-const version. Before we tested against
__GLIBC__, but now we test against __linux__ because that's Linux's API
and musl doesn't define __GLIBC__.
In addition, link against libftl on this platform since musl doesn't
include ftl routines in libc, but rather in libftl.
Co-authored-by: Val Packett <val@packett.cool>
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by: val_packett.cool
Differential Revision: https://reviews.freebsd.org/D45349
Update and add (new) PCI IDs for Realtek rtw88/89, Mediatek 7996/7925,
QCA ath1xk, and add Intel iwlwifi IDs.
Rather than using a package per driver add fine(r) grained flavors
even though it is a lot more likely to break in certain cases.
For Intel we need a great level of detail to match PCI IDs so also pass
the full pciconf -l line to into the pci_* files as "$2" to have access
to these.
This lines up with ports commit 80f50c9eb66d.
Sponsored by: The FreeBSD Foundation
Reviewed by: manu (earlier version)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D44918
PREF64 allows a router to advertise the network's NAT64 prefix, allowing
clients to auto-configure CLAT. This makes it possible to deploy
IPv6-only or IPv6-mostly client access networks without the need for
DNS64.
Reviewed by: imp, glebius (prior suggetions done)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1206
arp(8) usually disallows adding a static ARP entry for an IP address
which is not configured on a local interface.
Change this to allow such ARP entries to be added if '-i' is provided to
specify the interface the ARP entry relates to.
Due to limitations in the kernel lltable, this still requires that a
host route exists for the target address, but allows static ARP entries
to be configured to proxy ARP for, e.g., local jails which use an IPv4
address with a /32 route.
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/1220
On systems without pkg(8) installed, `command -v pkg` will return
success and falsely report that pkg(8) is present. Fix that by checking
via the `pkg -N` form.
This is missing from the final revision of D39695.
Reported by: delphij
Reviewed by: fernape, delphij
Fixes: bc0c6c9cf3 freebsd-update: Add check for kernel modules
Differential Revision: https://reviews.freebsd.org/D45292
The most likely reason mixer_open() will fail is because either the
device doesn't exist, or because it is disabled, so there is not reason
to kill the application. Instead, continue and print the rest of the
enabled mixers.
PR: 277615
Sponsored by: The FreeBSD Foundation
MFC after: 1 day
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D45151
Add a new option (-C, --restart-count) to specify the maximum
number of times that the controlled process is restarted if
restart (-r) is restarted.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D44944
Use correct variable while creating dialog used to select among
available wireless networks
Approved by: asiciliano
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D45271
Currently, if the prefix of the new home directory is a subdirectory
of a ZFS dataset, adduser will create a new dataset up one or more
levels from the intended destination. "pw useradd" will then create
a normal directory in the desired location, leaving an unused dataset.
Check for this situation when determining whether to create a dataset,
and let pw create the directory.
Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D45229
MFC after: 3 days
and apply the consistent format for device ids used in other IVRS
elements. The field seems to be the PCI Device ID of the IOMMU itself,
instead of an abstract unit ID.
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
An assert() was setting the error variable instead of checking it.
Reported by: Coverity Scan
CID: 1521431
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-src/pull/1244
In e820_finalize(), the e820_fwcfg_item variable, containing the
etc/e820 file (for the e820 table from the BIOS) is not free()'d when it
could not be added to the QEMU firmware configuration device (fw_cfg).
Reported by: Coverity Scan
CID: 1522761
Reviewed by: corvink, jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45223
The str variable in cctl_nvlist_end_element() does not get free()'d when
converted to an integer value. (name is "trtype")
Reported by: Coverity Scan
Coverity ID: 1545039
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1237
In bhyve_parse_config_option(), a string is allocated and passed to
nvlist_add_string() but not free'd afterwards.
Reported by: Coverity
CID: 1544049
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1234
One function used `_input` without making it local, causing its value to
leak into other functions. This broke the `-f` case. Fix that instance
and initialize all local variables that weren't already initialized.
Fixes: 170d088290
MFC after: 3 days
Reviewed by: karels
Differential Revision: https://reviews.freebsd.org/D45204
ALL_DISTRIBUTIONS and VERIFY_MANIFEST_SIG
They are neither used in the script nor exported.
Not referenced anywhere in bsdinstall/*
Approved by: imp@
Differential Revision: https://reviews.freebsd.org/D42369
Add details on the format of system cron files, which are mentioned in
cron(8) which refers here but barely explained here.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1106
The arp.8 manpage documents 'arp -d <addr> pub', but the 'pub' flag is
not accepted by the arp command. Remove this incorrect documentation.
Reviewed by: imp, gleb, mp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1215
pfctl_get_rules_info() opened a netlink socket, but failed to close it again.
Fix this by factoring out the netlink-based function into a _h variant that
takes struct pfctl_handle, and implement pfctl_get_rules_info() based on that,
remembering to close the fd.
While here migrate all in-tree consumers to the _h variant.
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")
This had been added for debugging and shouldn't have been committed.
Fixes: f81cdf24ba ("bhyve: Add support for XML register definitions")
MFC after: 3 days
- zfs depends on the crypto module, not cryptodev, and most arm64 kernel
configs include std.dev, which includes "device crypto" anyway.
- This config works around a problem with kldxref lacking cross-target
support, but that has since been fixed.
- Loading cryptodev creates /dev/crypto, which gives unprivileged users
access to the kernel's opencrypto framework. Very few applications
need it, so we're needlessly increasing the kernel's surface area.
Thus, stop auto-loading cryptodev.
Reviewed by: kevans, allanjude, des
Differential Revision: https://reviews.freebsd.org/D45127
This caused adduser to produce an invalid `pw(8)` command line. Due to
bugs in `pw(8)`, the command line was silently accepted and led to the
user being created, but locked out and with no home directory.
Also fix the default value for the “Another user?” prompt.
Fixes: 170d088290
MFC after: 3 days
Reviewed by: karels, allanjude
Differential Revision: https://reviews.freebsd.org/D45098
Rename `M_PRINT` and `M_UPDATE` to `M_SHOW` and `M_MODIFY` to match the
names of the commands they represent. No functional change intended.
MFC after: 3 days
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D45096
This function is documented to be gone in after 11. Time to remove this
compat shim.
PR: 275296
Reviewed by: jrm (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D44796
This daemon can operate as a purely userspace controller exporting one
or more simulated RAM disks or local block devices as NVMe namespaces
to a remote host. In this case the daemon provides a discovery
controller with a single entry for an I/O controller.
nvmfd can also offload I/O controller queue pairs to the nvmft.ko
in-kernel Fabrics controller when -K is passed. In this mode, nvmfd
still accepts connections and performs initial transport-specific
negotitation in userland. The daemon still provides a userspace-only
discovery controller with a single entry for an I/O controller.
However, queue pairs for the I/O controller are handed off to the CTL
NVMF frontend.
Eventually ctld(8) should be refactored to to provide an abstraction
for the frontend protocol and the discovery and the kernel mode of
this daemon should be merged into ctld(8). At that point this daemon
can be moved to tools/tools/nvmf as a debugging tool (mostly as sample
code for a userspace controller using libnvmf).
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D44731