]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 months agosctp: don't provide uninitialized memory to process_chunk_drop()
Michael Tuexen [Wed, 8 May 2024 22:17:13 +0000 (00:17 +0200)]
sctp: don't provide uninitialized memory to process_chunk_drop()

Right now, the code in process_chunk_drop() does not look the
the corresponding fields.
Therefore, no functional change intended.
Reported by: Coverity Scan
CID: 1472476
MFC after: 3 days

4 months agosctp: fix sctp_sendall() when an mbuf chain is provided
Michael Tuexen [Wed, 8 May 2024 21:41:17 +0000 (23:41 +0200)]
sctp: fix sctp_sendall() when an mbuf chain is provided

In this case uio is NULL, which needs to be checked and m must
be copied into the sctp_copy_all structure.
Reported by: Coverity Scan
CID: 1400449
MFC after: 3 days

4 months agoUpdate example from gcc6 to gcc13
Warner Losh [Thu, 9 May 2024 14:16:15 +0000 (08:16 -0600)]
Update example from gcc6 to gcc13

We only "support" gcc12 and gcc13 for cross building, for some value of
"support". Update the example from gcc6 to gcc13.

Sponsored by: Netflix

4 months agosctp: add missing check
Michael Tuexen [Wed, 8 May 2024 21:01:06 +0000 (23:01 +0200)]
sctp: add missing check

If memory allocation fails, m is NULL. Since this is possible,
check for it.
Reported by: Coverity Scan
CID: 1086866
MFC after: 3 days

4 months agolibpfctl: fix file descriptor leak
Kristof Provost [Thu, 9 May 2024 11:52:22 +0000 (13:52 +0200)]
libpfctl: fix file descriptor leak

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")

4 months agoxen/debug: remove usage of sbuf_{clear,finish}() on drained sbuf
Roger Pau Monné [Thu, 2 May 2024 13:12:16 +0000 (15:12 +0200)]
xen/debug: remove usage of sbuf_{clear,finish}() on drained sbuf

Using sbuf_clear() on a drained sbuf is explicitly prohibited, and using
sbuf_finish() after printing a trace leads to a single trace being printed, as
after calling sbuf_finish() further attempts to use the same sbuf will lead to
a panic.

While there also switch to using xen_emergency_print() instead of attempting to
write directly to the hypervisor console.  xen_emergency_print() can be
implemented per-arch to use a different mechanism than the console hypercall
(note the default implementation still uses the console hypercall).

Fixes: df62b8a25f47 ('xen: add a handler for the debug interrupt')
Sponsored by: Cloud Software Group
Reviewed by: markj
Differential review: https://reviews.freebsd.org/D45060

4 months agorelease: make dependencies, not recursive make
Colin Percival [Thu, 9 May 2024 07:52:25 +0000 (00:52 -0700)]
release: make dependencies, not recursive make

For historical reasons, the vm-release and cloudware-release targets
were written as recursive makes of ${VMTARGETS} and ${CLOUDTARGETS};
this worked fine until we started running `make release -jN` and
had both VM and cloud targets depending on ${QEMUTGT}, at which
point things exploded when we tried to build the port twice at the
same time.

Switch vm-release and cloudware-release to have make dependencies on
their individual components; this way a single make process runs and
is aware of the duplicate dependency (and only runs it once).

MFC after: 5 days

4 months agonet80211: add new ciphers and RSN flags
Adrian Chadd [Fri, 19 Apr 2024 14:05:44 +0000 (07:05 -0700)]
net80211: add new ciphers and RSN flags

These are the rest of the ciphers and RSN flags from 802.11-2016.

* add the rest of the ciphers from 802.11-2016
* add the rest of the RSN flags from 802.11-2016

Of special interest here are the extended key ID field for supporting
>1 unicast key (to support seamless rekeying w/out dropping frames)
and the MFP (management frame protection) config bits.

This is a no-op; no code is using these new fields.
(In particular, no code in net80211 uses the RSN capability bits;
but that will change when we start on MFP support.)

Differential Revision: https://reviews.freebsd.org/D44864

4 months agonet80211: add driver / crypto methods to set the hardware / software cipher suites
Adrian Chadd [Thu, 18 Apr 2024 01:47:07 +0000 (18:47 -0700)]
net80211: add driver / crypto methods to set the hardware / software cipher suites

Drivers currently announce hardware crypto cipher support by
setting up ic_cryptocaps.

This adds two public function calls:

* ieee80211_set_software_ciphers() - set the software cipher set;
* ieee80211_set_hardware_ciphers() - set the hardware cipher set.

For now these just call into the newly crypto routines to set the ciphers.

This then adds the two crypto routines, similarly named, to set
the hardware/software cipher suite.

This is a no-op right now - wep/tkip/ccmp are already set by default
so drivers aren't required to call these routines for software
encryption, and drivers already set ic_cryptocaps for hardware
encryption.

Differential Revision: https://reviews.freebsd.org/D44827

4 months agowpa: Remove the now not-needed local logic to hard-code cipher support
Adrian Chadd [Wed, 17 Apr 2024 01:55:28 +0000 (18:55 -0700)]
wpa: Remove the now not-needed local logic to hard-code cipher support

A previous commit now exposes the supported net80211 ciphers for the
given NIC, rather than the hardware cipher list.  This is going to be
especially important moving forward when we add more cipher and key
management support.

Differential Revision: https://reviews.freebsd.org/D44821

4 months agonet80211: add a new field specifically for announcing specific ciphers
Adrian Chadd [Wed, 17 Apr 2024 01:53:52 +0000 (18:53 -0700)]
net80211: add a new field specifically for announcing specific ciphers

This dates way, way back with the original net80211 support w/ atheros chips.

The earliest chip (AR5210) had limitations supporting software encryption.
It only had the four WEP slots, and not any keycache entries.  So when
trying to do CCMP/TKIP encryption would be enabled and the key slots
would have nothing useful in them, resulting in garbage encryption/decryption.

I changed this back in 2012 to disable supporting hardware WEP for AR5210
so if_ath(4) / net80211 crypto is all done in software and yes,
I could do CCMP/TKIP on AR5210 in software.

Fast-forward to newer-ish hardware - the Qualcomm 11ac hardware.
Those also don't support pass-through keycache slots! Well, the hardware
does at that layer, but then there's a whole offload data path encap/decap
layer that's turning the frames from raw wifi into ethernet frames (for
"dumb" AP behaviours) or "wifi direct" frames (ie, "windows".)
This hides a bunch of header frame contents required for doing the software
encryption / decryption path.

But then if you enable the raw transmit/receive frame format it ALSO
bypasses the hardware encryption/decryption engine!

So for those NICs:

* If you want to do encryption, you can only use the firmware supported
  ciphers w/ wifi direct or ethernet;
* If you want to use software encrypt/decrypt, you MUST disable all encryption
  and instead use 100% software encryption.

The wpa_supplicant bsd driver code has a specific comment about this and
flips on supporting WEP/TKIP/CCMP, which is understandable but it doesn't
fix the ACTUAL intention of all of this stuff.

So:

* create a new field, ic_sw_cryptocaps
* populate it with the default supported set of ciphers for net80211
  (right now wep, tkip, ccmp)
* Communicate the combination of both ic_sw_cryptocaps and ic_cryptocaps
  to wpa_supplicant via the relevant devcap ioctl.
* Update manpage.

I'll follow this up with a driver_bsd.c change in wpa_supplicant to
trust this again, and then start adding the other cipher support there.

Differential Revision: https://reviews.freebsd.org/D44820

4 months agonvme: Explicitly align struct nvme_command on an 8 byte boundary
John Baldwin [Wed, 8 May 2024 23:05:39 +0000 (16:05 -0700)]
nvme: Explicitly align struct nvme_command on an 8 byte boundary

This was already true for most architectures due to uint64_t structure
members.  However, i386 is special in that it only requires 4 byte
alignment for uint64_t.  As a result, casts from struct nvme_command
to struct nvmf_fabric_cmd were raising a "cast increases alignment"
warning on i386.  Explicitly aligning struct nvme_command pacifies
this warning on i386.

Reported by: rscheff
Sponsored by: Chelsio Communications

4 months agolinuxkpi: Make arch_io_*_memtype_wc amd64-only
Tijl Coosemans [Wed, 8 May 2024 18:49:56 +0000 (20:49 +0200)]
linuxkpi: Make arch_io_*_memtype_wc amd64-only

Linux only implements these functions on x86.  They return 0 on other
architectures.  The FreeBSD implementation calls PHYS_TO_DMAP but this
panics on i386 because it does not have a direct map so return 0 on i386
as well for now.  These functions are only used by graphics/drm-*-kmod
to mark the VRAM aperture write-combining but this is also accomplished
by a call to vm_phys_fictitious_reg_range so this change is sufficient
to fix drm-*-kmod on i386 for FreeBSD 14.1.

Reviewed by: kib
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45125

4 months agoMerge commit 73bb8d9d92f6 from llvm-project (by Jonathan Peyton):
Dimitry Andric [Wed, 8 May 2024 18:44:28 +0000 (20:44 +0200)]
Merge commit 73bb8d9d92f6 from llvm-project (by Jonathan Peyton):

  [OpenMP] Fix child processes to use affinity_none (#91391)

  When a child process is forked with OpenMP already initialized, the
  child process resets its affinity mask and sets proc-bind-var to false
  so that the entire original affinity mask is used. This patch corrects
  an issue with the affinity initialization code setting affinity to
  compact instead of none for this special case of forked children.

  The test trying to catch this only testing explicit setting of
  KMP_AFFINITY=none. Add test run for no KMP_AFFINITY setting.

Fixes: #91098
This should fix OpenMP processes sometimes getting stuck on a single CPU
core.

PR: 278845
Reported by: Cassidy B. Larson <cbl@cbl.us>
MFC after: 3 days

4 months agoMerge commit 5300a6731e98 from llvm-project (by Jonathan Peyton):
Dimitry Andric [Wed, 8 May 2024 16:55:08 +0000 (18:55 +0200)]
Merge commit 5300a6731e98 from llvm-project (by Jonathan Peyton):

  [OpenMP] Fix re-locking hang found in issue 86684 (#88539)

  This was initially reported here (including stacktraces):
  https://stackoverflow.com/questions/78183545/does-compiling-imagick-with-openmp-enabled-in-freebsd-13-2-cause-sched-yield

  If `__kmp_register_library_startup()` detects that another instance of
  the library is present, `__kmp_is_address_mapped()` is eventually
  called. which uses `kmpc_alloc()` to allocate memory. This function
  calls `__kmp_entry_thread()` to access the thread-local memory pool,
  which is a bad idea during initialization. This macro internally calls
  `__kmp_get_global_thread_id_reg()` which sets the bootstrap lock at the
  beginning (before calling `__kmp_register_library_startup()`).

  The fix is to use `KMP_INTERNAL_MALLOC()`/`KMP_INTERNAL_FREE()` instead
  of `kmpc_malloc()`/`kmpc_free()`. `KMP_INTERNAL_MALLOC` and
  `KMP_INTERNAL_FREE` do not use any bootstrap locks. They just translate
  to `malloc()`/`free()` and are meant to be used during library
  initialization before other library-specific allocators have been
  initialized.

Fixes: #86684
This should fix OpenMP processes sometimes getting locked with 100% CPU
usage, endlessly calling sched_yield(2).

PR: 278845
Reported by: Cassidy B. Larson <cbl@cbl.us>
MFC after: 3 days

4 months agosmsc(4): update to mention Microchip
Ed Maste [Tue, 7 May 2024 15:33:45 +0000 (11:33 -0400)]
smsc(4): update to mention Microchip

Microchip Technology acquired SMSC in 2012, and all current products
and datasheets refer to the devices supported by this driver as
Microchip parts.  Mention SMSC in a parenthetical comment to explain
the driver's name.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45115

4 months agobhyve: Do not define GDB_LOG
Mark Johnston [Wed, 8 May 2024 16:06:22 +0000 (12:06 -0400)]
bhyve: Do not define GDB_LOG

This had been added for debugging and shouldn't have been committed.

Fixes: f81cdf24ba54 ("bhyve: Add support for XML register definitions")
MFC after: 3 days

4 months agovmm: Start reconciling amd64 and arm64 copies of vmm_dev.c
Mark Johnston [Wed, 8 May 2024 16:02:38 +0000 (12:02 -0400)]
vmm: Start reconciling amd64 and arm64 copies of vmm_dev.c

Most of the code in vmm_dev.c and vmm.c can and should be shared between
amd64 and arm64 (and eventually riscv) rather than being duplicated.  To
the end of adding a shared implementation in sys/dev/vmm, this patch
eliminates most of the differences between the two copies of vmm_dev.c.

- Remove an unneeded cdefs.h include.
- Simplify the amd64 implementation of vcpu_unlock_one().
- Simplify the arm64 implementation of vcpu_lock_one().
- Pass buffer sizes to alloc_memseg() and get_memseg() on arm64.  On
  amd64 this is needed for compat ioctls, but these functions should be
  merged.
- Make devmem_mmap_single() stricter on arm64.

Reviewed by: corvink, jhb
Differential Revision: https://reviews.freebsd.org/D44995

4 months agobsdinstall: Stop loading cryptodev for ZFS installations
Mark Johnston [Wed, 8 May 2024 16:01:52 +0000 (12:01 -0400)]
bsdinstall: Stop loading cryptodev for ZFS installations

- 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

4 months agoofed: don't expose symbols twice
Brooks Davis [Wed, 8 May 2024 14:52:00 +0000 (15:52 +0100)]
ofed: don't expose symbols twice

ibv_init_wq and ibv_cleanup_wq are made visible with the
default_symver which puts them in the IBVERBS_1.1 ABI.  Don't
try to expose them as IBVERBS_PRIVATE_14 symbols as GNU ld
complains with --no-undefined-symbol.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D45090

4 months agosoxstack: slience 32-bit gcc warning
Brooks Davis [Wed, 8 May 2024 14:51:17 +0000 (15:51 +0100)]
soxstack: slience 32-bit gcc warning

Modern GCC complains when casting pointers to integers of a different
size (even a larger one).  Switch from uint64_t to uintptr_t which will
always be the right size for a stack address instead of maybe being too
big.

Reviewed by: dchagin, emaste
Differential Revision: https://reviews.freebsd.org/D45087

4 months agolibthr: avoid varargs in fcntl and openat interposers
Brooks Davis [Wed, 8 May 2024 14:49:13 +0000 (15:49 +0100)]
libthr: avoid varargs in fcntl and openat interposers

Align these signatures with the ones in syscalls.master (and thus
libsys.h).  There's no reason to do va_args twice and in some ABIs
(e.g,, CheriABI) you can't access fixed arguments as varargs if you
weren't called with varargs signature.

Reviewed by: imp, kib, jhibbits
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D45126

4 months agotcp: add counter to track when SACK loss recovery uses TSO
Richard Scheffenegger [Wed, 8 May 2024 12:36:53 +0000 (14:36 +0200)]
tcp: add counter to track when SACK loss recovery uses TSO

Add a counter to track how frequently SACK has transmitted
more than one MSS using TSO. Instances when this will be
beneficial is the use of PRR, or when ACK thinning due to
GRO/LRO or ACK discards by the network are present.

Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D45070

4 months agotcp: add sysctl to allow/disallow TSO during SACK loss recovery
Richard Scheffenegger [Wed, 8 May 2024 12:33:12 +0000 (14:33 +0200)]
tcp: add sysctl to allow/disallow TSO during SACK loss recovery

Introduce net.inet.tcp.sack.tso for future use when TSO is ready
to be used during loss recovery.

Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D45068

4 months agotcp: filter small SACK blocks
Richard Scheffenegger [Sat, 4 May 2024 19:47:29 +0000 (21:47 +0200)]
tcp: filter small SACK blocks

While the SACK Scoreboard in the base stack limits
the number of holes by default to only 128 per connection
in order to prevent CPU load attacks by splitting SACKs,
filtering out SACK blocks of unusually small size can
further improve the actual processing of SACK loss recovery.

Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D45075

4 months agopf: always mark states as unlinked before detaching them
Kristof Provost [Mon, 6 May 2024 07:43:49 +0000 (09:43 +0200)]
pf: always mark states as unlinked before detaching them

Users have reported crashes in pf_test_state_udp() where at least one state key
is NULL.

That suggests that pf_detach_state() ran concurrently with pf_test_state_udp().
pf_test_state_udp() holds the state lock (aka the id lock), but
pf_detach_state() does not.
The intent is that detached states are not returned by STATE_LOOKUP/
pf_find_state(), as the state's timeout is set to PFTM_UNLINKED and thus
pf_find_state() does not find the state.

There are other paths to pf_detach_state() (outside of pf_unlink_state())
though, where we did not set the timeout to PFTM_UNLINKED. Fix those, and assert
that the timeout is set correctly when we enter pf_detach_state().

MFC after: 1 week
See also: https://redmine.pfsense.org/issues/15413
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D45101

4 months agocarp: document the new VRRPv3 support
Kristof Provost [Fri, 12 Apr 2024 14:09:04 +0000 (16:09 +0200)]
carp: document the new VRRPv3 support

Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D44776

4 months agonetinet tests: basic VRRP tests
Kristof Provost [Thu, 11 Apr 2024 16:40:19 +0000 (18:40 +0200)]
netinet tests: basic VRRP tests

Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D44775

4 months agocarp: isolate VRRP from CARP
Gleb Smirnoff [Tue, 30 Apr 2024 02:58:25 +0000 (19:58 -0700)]
carp: isolate VRRP from CARP

There is only one functional change here - we don't allow SIOCSVH (or
netlink request) to change sc->sc_version.  I'm convinced that allowing
such a change doesn't brings any practical value, but creates enless
minefields in front of both developers and end users (sysadmins).  If
you want to switch from VRRP to CARP or vice versa, you'd need to recreate
the VHID.

Oh, one tiny funtional change: carp_ioctl_set() won't modify any fields
if it returns EINVAL.  Previously you could provide valid advbase with
invalid advskew - that used to modify advbase and return EINVAL.

All other changes is a sweep around not ever using CARP fields when
we are in VRRP mode and vice versa.  Also adding assertions on sc_version
where necessary.

Do not send VRRP vars in CARP mode via NetLink and vice versa.  However
in compat ioctl SIOCGVH for VRRP mode the CARP fields would be zeroes.

This allows to declare softc as union and thus prevent any future logic
deterioration wrt to mixing VRRP and CARP.

Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D45039

4 months agocarp: refactor packet tagging for ether_output()
Gleb Smirnoff [Tue, 30 Apr 2024 02:36:42 +0000 (19:36 -0700)]
carp: refactor packet tagging for ether_output()

- Separate HMAC preparation (CARP specific) from tagging.
- In unicast mode (CARP specific) don't put tag at all.
- Don't put pointer to software context into the tag.  Putting just vhid,
  an integer value, is a safer design.

Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D45038

4 months agocarp: assert that we are calling correct input function. We are.
Gleb Smirnoff [Mon, 29 Apr 2024 22:54:57 +0000 (15:54 -0700)]
carp: assert that we are calling correct input function. We are.

Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D45037

4 months agocarp: don't chain call vrrp_send_ad via carp_send_ad
Gleb Smirnoff [Mon, 29 Apr 2024 22:33:51 +0000 (15:33 -0700)]
carp: don't chain call vrrp_send_ad via carp_send_ad

Provide inline send_ad_locked() that switches between protocol
specific sending function.

Rename carp_send_ad() to carp_callout() to avoid getting lost in
all these multiple foo_send_ad.

No functional change intended.

Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D45036

4 months agocarp: support VRRPv3
Kristof Provost [Tue, 2 Apr 2024 16:13:54 +0000 (18:13 +0200)]
carp: support VRRPv3

Allow carp(4) to use the VRRPv3 protocol (RFC 5798). We can distinguish carp and
VRRP based on the protocol version number (carp is 2, VRRPv3 is 3), and support
both from the carp(4) code.

Reviewed by: glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D44774

4 months agomii: Add support for Realtek RTL8211F-VD PHY
Peter Jeremy [Wed, 8 May 2024 08:17:00 +0000 (18:17 +1000)]
mii: Add support for Realtek RTL8211F-VD PHY

The RTL8211F-VD is a replacement/upgrade for the RTL8211F. Based on
https://github.com/torvalds/linux/commit/bb726b753f75a4eeda291438f89dfd9b94783569,
the only difference is the lack of the PCR2 register, which FreeBSD
doesn't use.

This fixes autonegotiation problems using the RTL8211F with ukphy(4).
Reviewed by: manu, bz
MFC after: 1 month
Differential Revision:  <https://reviews.freebsd.org/D45109

4 months agodtb: rockchip: Add Radxa ROCK 4C Plus to the build.
Peter Jeremy [Wed, 8 May 2024 08:06:42 +0000 (18:06 +1000)]
dtb: rockchip: Add Radxa ROCK 4C Plus to the build.

The ROCK 4C Plus is a cost-reduced variant of the ROCK Pi 4 based on
the RockChip RK3399-T.

Reviewed by: manu
MFC after: 1 week
Differential Revision: <https://reviews.freebsd.org/D45110

4 months agoObsoleteFiles.inc: Remove /var/db/portsnap
Olivier Certner [Sat, 4 May 2024 11:35:46 +0000 (20:35 +0900)]
ObsoleteFiles.inc: Remove /var/db/portsnap

This is a followup to commit "Remove remnants of portsnap(8)"
(9b30b96c1fa4).  I wasn't aware of OLD_DIRS.

Approved by:            markj (mentor)
MFC after:              1 day
MFC with:               9b30b96c1fa4
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D45023

4 months agoarm64 pmap: Add ATTR_CONTIGUOUS support [Part 3]
Alan Cox [Wed, 17 Apr 2024 16:39:46 +0000 (11:39 -0500)]
arm64 pmap: Add ATTR_CONTIGUOUS support [Part 3]

Introduce L3C promotion of base page mappings.  When the base page size
is 4KB, use ATTR_CONTIGUOUS to promote 16 aligned, contiguous base page
mappings to a 64KB mapping.  Alternatively, when the base page size is
16KB, use ATTR_CONTIGUOUS to promote 128 aligned, contiguous base page
mappings to a 2MB mapping.

Given the frequency of L3C counter updates, switch to per-CPU counters
to avoid cache line ping ponging.

Revise the L3C counter descriptions to reflect the fact that the size
of an L3C mapping varies depending on the base page size.

Co-authored-by: Eliot Solomon <ehs3@rice.edu>
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44983

4 months agoin6_rmx: remove unnecessary socketvar.h
Gleb Smirnoff [Tue, 7 May 2024 21:15:56 +0000 (14:15 -0700)]
in6_rmx: remove unnecessary socketvar.h

4 months agotcp_hostcache: remove unnecessary socketvar.h
Gleb Smirnoff [Tue, 7 May 2024 21:15:49 +0000 (14:15 -0700)]
tcp_hostcache: remove unnecessary socketvar.h

4 months agosockets: garbage collect PRCOREQUESTS and stale comment
Gleb Smirnoff [Tue, 7 May 2024 21:15:49 +0000 (14:15 -0700)]
sockets: garbage collect PRCOREQUESTS and stale comment

The code deleted predates FreeBSD history.  The comment deleted is 99%
outdated.  Why KAME decided to use these constants instead of normal ones
also lost in centuries.

4 months agonvme: Bump the alignment of struct nvme_health_information_page to 8
John Baldwin [Tue, 7 May 2024 20:48:06 +0000 (13:48 -0700)]
nvme: Bump the alignment of struct nvme_health_information_page to 8

This ensures that embedded uint64_t values used for statistics
counters are aligned when allocating a structure on the stack or as
part of a containing structure.  In particular this quiets
-Waddress-of-packed-member warnings from GCC when compiling the code
in nvmfd to update the stats.

Reported by: GCC

4 months agonvmecontrol: Fix a sign compare mismatch
John Baldwin [Tue, 7 May 2024 20:45:51 +0000 (13:45 -0700)]
nvmecontrol: Fix a sign compare mismatch

Even though mqes (uint16_t) and queue_size (u_int) are both unsigned,
the expression 'mqes + 1' gets promoted to int which is signed.  Keep
the value unsigned by explicitly promoting mqes to u_int before
incrementing the value.

Reported by: GCC

4 months agolibzpool: Disable -Wpointer-to-int-cast warnings for GCC
John Baldwin [Tue, 7 May 2024 19:32:58 +0000 (12:32 -0700)]
libzpool: Disable -Wpointer-to-int-cast warnings for GCC

This warning is already disabled for zfs.ko.

4 months agotcp: clean up macro useage in tcp_fixed_maxseg()
Richard Scheffenegger [Sat, 4 May 2024 08:42:42 +0000 (10:42 +0200)]
tcp: clean up macro useage in tcp_fixed_maxseg()

Replace local PAD macro with PADTCPOLEN macro
No functional change.

Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D45076

4 months agolibcbor: Ignore errors for unknown #pragmas
John Baldwin [Tue, 7 May 2024 18:44:52 +0000 (11:44 -0700)]
libcbor: Ignore errors for unknown #pragmas

libcbor embeds clang-specific #pragmas that GCC then warns about.

Reviewed by: emaste

4 months agojh7110: Add StarFive JH7110 clock/reset generator drivers
Jari Sihvola [Tue, 7 May 2024 16:06:20 +0000 (13:06 -0300)]
jh7110: Add StarFive JH7110 clock/reset generator drivers

Implement a core clknode driver for the JH7110 (StarFive VisionFive v2)
platform.

Add clock/reset generator drivers for the PLL, SYS, and AON clock
groupings.

Co-authored-by: mhorne
Reviewed by:    mhorne
Sponsored by:   The FreeBSD Foundation (mhorne's contributions)
Differential Revision:  https://reviews.freebsd.org/D43037

4 months agoRevert "jh7110: Add StarFive JH7110 clock/reset generator drivers"
Mitchell Horne [Tue, 7 May 2024 16:05:31 +0000 (13:05 -0300)]
Revert "jh7110: Add StarFive JH7110 clock/reset generator drivers"

I did not set the author field properly; revert to fix this.

This reverts commit 5d6d6278979b9eab598a23c804d23e930d2f7268.

4 months agojh7110: enable MMC driver
Mitchell Horne [Mon, 4 Mar 2024 18:38:43 +0000 (14:38 -0400)]
jh7110: enable MMC driver

Add a variant of the existing dwmmc driver, and enable it in the GENERIC
kernel.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44026

4 months agojh7110: Add StarFive JH7110 clock/reset generator drivers
Mitchell Horne [Mon, 6 May 2024 17:10:01 +0000 (14:10 -0300)]
jh7110: Add StarFive JH7110 clock/reset generator drivers

Implement a core clknode driver for the JH7110 (StarFive VisionFive v2)
platform.

Add clock/reset generator drivers for the PLL, SYS, and AON clock
groupings.

Co-authored-by: mhorne
Reviewed by: mhorne
Sponsored by: The FreeBSD Foundation (mhorne's contributions)
Differential Revision: https://reviews.freebsd.org/D43037

4 months agostarfive: add a syscon driver
Mitchell Horne [Tue, 5 Mar 2024 23:57:30 +0000 (19:57 -0400)]
starfive: add a syscon driver

It serves the purpose of attaching syscon devices as early as possible;
this is required for early attachment of the PLL clock driver.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44270

4 months agobusdma: better handling of small segment bouncing
Mitchell Horne [Wed, 14 Feb 2024 16:56:13 +0000 (12:56 -0400)]
busdma: better handling of small segment bouncing

Typically, when a DMA transaction requires bouncing, we will break up
the request into segments that are, at maximum, page-sized.

However, in the atypical case of a driver whose maximum segment size is
smaller than PAGE_SIZE, we end up inefficiently assigning each segment
its own bounce page. For example, the dwmmc driver has a maximum segment
size of 2048 (PAGE_SIZE / 2); a 4-page transfer ends up requiring 8
bounce pages in the current scheme.

We should attempt to batch segments into bounce pages more efficiently.
This is achieved by pushing all considerations of the maximum segment
size into the new _bus_dmamap_addsegs() function, which wraps
_bus_dmamap_addseg(). Thus we allocate the minimal number of bounce
pages required to complete the entire transfer, while still performing
the transfer with smaller-sized transactions.

For most drivers with a segment size >= PAGE_SIZE, this will have no
impact. For drivers like dwmmc mentioned above, this improves the memory
and performance efficiency when bouncing a large transfer.

Co-authored-by: jhb
Reviewed by: jhb
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45048

4 months agobusdma: deduplicate _bus_dmamap_addseg() function
Mitchell Horne [Wed, 14 Feb 2024 17:01:15 +0000 (13:01 -0400)]
busdma: deduplicate _bus_dmamap_addseg() function

It is functionally identical in all implementations, so move the
function to subr_busdma_bounce.c. The KASSERT present in the x86 version
is now enabled for all architectures. It should be universally
applicable.

Reviewed by: jhb
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45047

4 months agofib_dxr: set fib_data field in struct dxr_aux early enough
Marko Zec [Tue, 7 May 2024 15:44:09 +0000 (17:44 +0200)]
fib_dxr: set fib_data field in struct dxr_aux early enough

Previously it was possible for dxr_build() to return with da->fd
unset in case of range_tbl or x_tbl malloc() failures.  This
may have led to NULL ptr dereferencing in dxr_change_rib_batch().

MFC after: 1 week

PR: 278422

4 months agofib_dxr: s/KASSERT/MPASS/
Marko Zec [Tue, 7 May 2024 15:33:23 +0000 (17:33 +0200)]
fib_dxr: s/KASSERT/MPASS/

MFC after: 1 week

4 months agofib_dxr: KASSERTs for chasing NULL ptr and runaway refcount suspects
Marko Zec [Tue, 7 May 2024 15:22:00 +0000 (17:22 +0200)]
fib_dxr: KASSERTs for chasing NULL ptr and runaway refcount suspects

MFC after: 1 week

4 months agofib_dxr: move the bulko of malloc() failure logging into dxr_build()
Marko Zec [Tue, 7 May 2024 15:11:30 +0000 (17:11 +0200)]
fib_dxr: move the bulko of malloc() failure logging into dxr_build()

4 months agoboot1.efi: Don't redundantly include devpath.c
Warner Losh [Tue, 7 May 2024 02:06:54 +0000 (20:06 -0600)]
boot1.efi: Don't redundantly include devpath.c

devpath.c is on both the comand line and in libefi. This is redundant
and was a mistake in 4cf36aa1017f9. It never should have been here. In
practice, this just means that the devpath.o from libefi.a goes unused.
This will cause problems with some upcoming changes (D44872) to enable
LTO to reduce the size of the binaries, so go ahead and make the change
now to reduce the changeset for that. No functional change indended.

Fixes: 4cf36aa1017f9
Co-authored-by: sobomax
Sponsored by: Netflix

4 months agodlopen(3): mention fdlopen for capsicum(4)
Ed Maste [Tue, 7 May 2024 01:45:50 +0000 (21:45 -0400)]
dlopen(3): mention fdlopen for capsicum(4)

Capsicum-sandboxed applications generally cannot use dlopen, as absolute
and cwd-relative paths cannot be accessed.  Mention that fdlopen is
useful for sandboxed applications.

PR: 277169
Reviewed by: markj, oshogbo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45108

4 months agoRemove lingering geom_bde references.
Poul-Henning Kamp [Tue, 7 May 2024 09:25:23 +0000 (09:25 +0000)]
Remove lingering geom_bde references.

4 months agoRemove final cross-reference to GBDE
Poul-Henning Kamp [Tue, 7 May 2024 07:40:20 +0000 (07:40 +0000)]
Remove final cross-reference to GBDE

4 months agoRemove cross-references to GBDE
Poul-Henning Kamp [Tue, 7 May 2024 07:35:33 +0000 (07:35 +0000)]
Remove cross-references to GBDE

4 months agoRemove gbde from the "userland" pseudo-target
Poul-Henning Kamp [Tue, 7 May 2024 07:35:14 +0000 (07:35 +0000)]
Remove gbde from the "userland" pseudo-target

4 months agoAdd gbde rc.d script to ObsoleteFiles.inc
Poul-Henning Kamp [Tue, 7 May 2024 07:31:19 +0000 (07:31 +0000)]
Add gbde rc.d script to ObsoleteFiles.inc

4 months agoRemove GBDE source files
Poul-Henning Kamp [Tue, 7 May 2024 07:31:09 +0000 (07:31 +0000)]
Remove GBDE source files

4 months agoRemove GBDE stress test
Poul-Henning Kamp [Tue, 7 May 2024 07:26:39 +0000 (07:26 +0000)]
Remove GBDE stress test

4 months agoRemove documentation of GBDE rc support
Poul-Henning Kamp [Tue, 7 May 2024 07:25:51 +0000 (07:25 +0000)]
Remove documentation of GBDE rc support

4 months agoRemove gbde from rescue
Poul-Henning Kamp [Tue, 7 May 2024 07:23:38 +0000 (07:23 +0000)]
Remove gbde from rescue

4 months agoRemove GBDE rc support
Poul-Henning Kamp [Tue, 7 May 2024 07:23:03 +0000 (07:23 +0000)]
Remove GBDE rc support

4 months agoRemove gbde support from swapon(8)
Poul-Henning Kamp [Tue, 7 May 2024 07:21:46 +0000 (07:21 +0000)]
Remove gbde support from swapon(8)

4 months agoRemove gbde.4 man page
Poul-Henning Kamp [Tue, 7 May 2024 07:21:28 +0000 (07:21 +0000)]
Remove gbde.4 man page

4 months agoAdd GBDE to ObsoleteFiles.inc
Poul-Henning Kamp [Tue, 7 May 2024 06:50:52 +0000 (06:50 +0000)]
Add GBDE to ObsoleteFiles.inc

4 months agoDisconnect GBDE from the build. (Per earlier announcements of retirement.)
Poul-Henning Kamp [Tue, 7 May 2024 05:19:03 +0000 (05:19 +0000)]
Disconnect GBDE from the build. (Per earlier announcements of retirement.)

4 months agosg: Add sg(4) man page
Warner Losh [Mon, 6 May 2024 22:28:09 +0000 (16:28 -0600)]
sg: Add sg(4) man page

Add minimal sg(4) manual page. This implements a subset of the Linux
IOCTL interface for either native FreeBSD programs, or for Linux
binaries in the linuxulator.

Noticed by: Lexi Winter
Sponsored by: Netflix

4 months agolagg: enable tests that stress the configuration changes
Gleb Smirnoff [Mon, 6 May 2024 22:25:53 +0000 (15:25 -0700)]
lagg: enable tests that stress the configuration changes

I wasn't able to reproduce a crash in several runs.  Might be that
48698ead6ff0 or earlier changes have closed the races.  In case crashes
with just enabled tests are registered, I will either work on them or
disable tests again.

4 months agolagg: remove use of net epoch in the ioctl paths
Gleb Smirnoff [Mon, 6 May 2024 22:25:53 +0000 (15:25 -0700)]
lagg: remove use of net epoch in the ioctl paths

Rely on LAGG_SLOCK() instead.  The use of network epoch(9) here was added
in 6573d7580b851 (later tidied by 87bf9b9cbeebc) as a large sweep that
blindly substituted blocking kernel primitives with epoch(9).  In these
particular code paths use of epoch(9) is incorrect and doesn't provide any
protection against a stale pointer.  Recent fix 48698ead6ff0, which should
actually have removed the epoch use, created a potential sleeping in epoch
problem.

4 months agolagg: propagate up/down to the children
Gleb Smirnoff [Mon, 6 May 2024 22:25:53 +0000 (15:25 -0700)]
lagg: propagate up/down to the children

Based on the old submission from asomers@.  With modern state of locking
in lagg(4), the patch got much simplier.  Enable the test that was
waiting for this change.

PR: 226144
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D44605

4 months agonvmf: Add explicit alignment for struct nvmf_fabric_cmd
John Baldwin [Mon, 6 May 2024 22:17:43 +0000 (15:17 -0700)]
nvmf: Add explicit alignment for struct nvmf_fabric_cmd

This avoids -Wcast-align warnings from clang when upcasting from
struct nvmf_fabric_cmd to struct nvmf_fabric_prop_set_cmd.

Reported by: bapt
Sponsored by: Chelsio Communications

4 months agoclock_gettime.2: fix markup
Ed Maste [Mon, 6 May 2024 19:59:42 +0000 (15:59 -0400)]
clock_gettime.2: fix markup

The CLOCK_* constants are "defined variable or preprocessor constants"
and so use .Dv.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45106

4 months agonvmf_tcp: Correct tests for PDU direction
John Baldwin [Mon, 6 May 2024 20:33:54 +0000 (13:33 -0700)]
nvmf_tcp: Correct tests for PDU direction

Add parentheses to ensure the correct order of operations.

Reported by: GCC

4 months agonvmf: Remove packing pragmas from nvmf_proto.h
John Baldwin [Mon, 6 May 2024 20:30:23 +0000 (13:30 -0700)]
nvmf: Remove packing pragmas from nvmf_proto.h

The protocol structures do not need explicit packing and static
assertions verify the size of all the structures as well as the
offsets of several key fields.  The pragma triggers warnings when
building with GCC.

Sponsored by: Chelsio Communications

4 months agorelease: Rework vm_extra_pre_umount
Colin Percival [Mon, 6 May 2024 20:26:52 +0000 (13:26 -0700)]
release: Rework vm_extra_pre_umount

The vm_extra_pre_umount function in vmimage.subr served two purposes:
It removed /etc/resolv.conf and /qemu (if cross-building), and it
provided a function for cloudware to override in order to make cloud
specific changes to the filesystem before constructing a disk image.

This resulted in a number of bugs:
1. When cross-building, the emulator binary was left as /qemu in the
Azure, GCE, Openstack and Vagrant images.
2. The build host's resolv.conf was left as /etc/resolv.conf in the
basic-ci and basic-cloudinit images.
3. When building GCE images, a Google-specific resolv.conf file was
constructed, and then deleted before the disk image was created.

Move the bits needed for running code inside a VM staging directory
from vm_install_base into a new vm_emulation_setup routine, and move
the corresponding cleanup bits from vm_extra_pre_umount to a new
vm_emulation_cleanup routine.

Remove the /qemu and /etc/resolv.conf cleanups from the cloudware
configuration files (where they exist) since we will now be running
vm_emulation_cleanup to remove those even when vm_extra_pre_umount
has been overridden.

Override vm_emulation_cleanup in gce.conf since in that one case (and
*only* that one case) we don't want to clean up resolv.conf (since it
was constructed for the VM image rather than copied from the host).

releng/14.1 candidate.

MFC after: 1 week
Sponsored by: https://www.patreon.com/cperciva

4 months agosockets: hide socket hhook(9)s under SOCKET_HHOOK
Gleb Smirnoff [Mon, 6 May 2024 19:49:29 +0000 (12:49 -0700)]
sockets: hide socket hhook(9)s under SOCKET_HHOOK

There are no in-tree consumers of these hooks.

Reviewed by: stevek
Differential Revision: https://reviews.freebsd.org/D44928

4 months agoarm: Remove stray references to dev/sound/chip.h
Christos Margiolis [Mon, 6 May 2024 19:35:30 +0000 (21:35 +0200)]
arm: Remove stray references to dev/sound/chip.h

Fixes: 923e0040a59a ("sound: Move chip.h contents to pcm/sound.h")
Reported by: Jenkins CI
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

4 months agotests/fusefs: fix all tests that depend on kern.maxphys
Gleb Smirnoff [Mon, 6 May 2024 19:03:20 +0000 (12:03 -0700)]
tests/fusefs: fix all tests that depend on kern.maxphys

The tests try to read kern.maxphys sysctl into int value, while
unsigned long is required.  Not sure when this was broken, seems like
since cd8537910406e.

Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D45053

4 months agosound: Update pcm/vchan.c LICENSE header
Christos Margiolis [Mon, 6 May 2024 18:47:33 +0000 (20:47 +0200)]
sound: Update pcm/vchan.c LICENSE header

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

4 months agofib_dxr: update comment.
Marko Zec [Mon, 6 May 2024 18:42:31 +0000 (20:42 +0200)]
fib_dxr: update comment.

MFC after: 1 week

4 months agofib_dxr: free() does nothing if arg is NULL, so remove a redundant check.
Marko Zec [Mon, 6 May 2024 18:34:11 +0000 (20:34 +0200)]
fib_dxr: free() does nothing if arg is NULL, so remove a redundant check.

MFC after: 1 week

4 months agosound: Remove unused "num" argument from chn_init() and related callers
Christos Margiolis [Mon, 6 May 2024 18:33:11 +0000 (20:33 +0200)]
sound: Remove unused "num" argument from chn_init() and related callers

It is always -1 (i.e unused).

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D45095

4 months agosound: Rename pcm_getparentchannel() to vchan_getparentchannel()
Christos Margiolis [Mon, 6 May 2024 18:32:57 +0000 (20:32 +0200)]
sound: Rename pcm_getparentchannel() to vchan_getparentchannel()

Follow the rest of the vchan.c naming convention.

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D45016

4 months agosound: Move vchan-related code to pcm/vchan.*
Christos Margiolis [Mon, 6 May 2024 18:32:46 +0000 (20:32 +0200)]
sound: Move vchan-related code to pcm/vchan.*

pcm/sound.* contains code that should be part of pcm/vchan.*.

Changes:
- pcm_setvchans() -> vchan_setnew()
- pcm_setmaxautovchans() -> vchan_setmaxauto()
- hw.snd.maxautovchans moved to pcm/vchan.c
- snd_maxautovchans declaration moved to pcm/vchan.h and definition to
  pcm/vchan.c

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D45015

4 months agosound: Use nitems() where possible
Christos Margiolis [Mon, 6 May 2024 18:32:35 +0000 (20:32 +0200)]
sound: Use nitems() where possible

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D45014

4 months agosound: Remove unused dsp_cdevs[] fields and devices
Christos Margiolis [Mon, 6 May 2024 18:32:25 +0000 (20:32 +0200)]
sound: Remove unused dsp_cdevs[] fields and devices

These fields and devices are unused as of e8c0d15a64fa ("sound: Get rid
of snd_clone and use DEVFS_CDEVPRIV(9)").

While here, remove unused SND_DEV_* defines from pcm/sound.h and convert
the list to an enum.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D45013

4 months agosound: Move chip.h contents to pcm/sound.h
Christos Margiolis [Mon, 6 May 2024 18:32:12 +0000 (20:32 +0200)]
sound: Move chip.h contents to pcm/sound.h

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44997

4 months agoRELNOTES: Mention hw.snd.version being removed
Christos Margiolis [Mon, 6 May 2024 18:35:35 +0000 (20:35 +0200)]
RELNOTES: Mention hw.snd.version being removed

Sponsored by: The FreeBSD Foundation

4 months agosound: Remove hw.snd.version and SND_DRV_VERSION
Christos Margiolis [Mon, 6 May 2024 18:30:58 +0000 (20:30 +0200)]
sound: Remove hw.snd.version and SND_DRV_VERSION

hw.snd.version and SND_DRV_VERSION define the sound driver version and
are meant to be used in bug reports, but because these values are
constant, there is not much useful information we can extract from them.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch, emaste
Differential Revision: https://reviews.freebsd.org/D44996

4 months agosound: Convert pcm_chn_add() to void
Christos Margiolis [Mon, 6 May 2024 18:27:18 +0000 (20:27 +0200)]
sound: Convert pcm_chn_add() to void

It always returns 0.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D44998

4 months agosound: Add __assert_unreachable() to default cases in pcm_chn_add() and pcm_chn_remove()
Christos Margiolis [Mon, 6 May 2024 18:26:56 +0000 (20:26 +0200)]
sound: Add __assert_unreachable() to default cases in pcm_chn_add() and pcm_chn_remove()

We should normally never enter these cases.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D44994

4 months agosound: Merge pcm_chn_create() and chn_init()
Christos Margiolis [Mon, 6 May 2024 18:26:37 +0000 (20:26 +0200)]
sound: Merge pcm_chn_create() and chn_init()

Follow-up of b3ea087c05d8c75978a302cbb3fa92ce1afa3e49 ("sound: Merge
pcm_chn_destroy() and chn_kill()")

While here, add device_printf()'s to all failure points. Also fix an
existing bug where we'd unlock an already unlocked channel, in case we
went to "out" (now "out2") before locking the channel.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D44993

4 months agofib_dxr: log malloc() failures.
Marko Zec [Mon, 6 May 2024 18:21:55 +0000 (20:21 +0200)]
fib_dxr: log malloc() failures.

MFC after: 1 week

4 months agogit-arc: Add list mode support for the update command
John Baldwin [Mon, 6 May 2024 17:49:04 +0000 (10:49 -0700)]
git-arc: Add list mode support for the update command

This can be particularly useful to do bulk-updates of multiple commits
using the same message, e.g.

  git arc update -lm "Move function xyz to libfoo" main..myfeature

Similar to the list mode for the create command, git arc will list all
the candidate revisions with a single prompt.  Once that is confirmed,
all the revisions are updated without showing the diffs or pausing
further prompts.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D45050