FreeBSD/src ac562a7lib/libpfctl libpfctl.c

libpfctl: fix error handling

In two cases we returned E2BIG where it should have been a boolean ('false').

MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 9bb1c46b4c38c44565fc24f13acdc19b0cb5a1c4)
DeltaFile
+2-2lib/libpfctl/libpfctl.c
+2-21 files

FreeBSD/src 2d608a4sys/net if_media.h ieee8023ad_lacp.c

if_media.h: Add 400GBase-SR8 and 400GBase-CR8

Reviewed by:    bz (network)
MFC after:      1 week
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D53387
DeltaFile
+6-0sys/net/if_media.h
+2-0sys/net/ieee8023ad_lacp.c
+8-02 files

FreeBSD/src a34a57dsys/fs/tarfs tarfs_vfsops.c tarfs_io.c, tests/sys/fs/tarfs tarfs_test.sh

tarfs: Fix support for large files

* When fast-forwarding through a zstd frame, we incorrectly used the
  min() inline function instead of the MIN() macro.  The function
  truncates the result to unsigned int, resulting in a decompression
  error when trying to seek more than 4 GB into the frame.

* POSIX states that a size extended header record overrides the size
  field in the header if present, and that one must be included if the
  size of the file exceeds 8 GB (the size field maxes out at 64 GB).

* Reduce repetition in the exthdr parser by deduplicating the syntax
  error handler.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Fixes:          69d94f4c7608 ("Add tarfs, a filesystem backed by tarballs.")
Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D53718
DeltaFile
+23-25sys/fs/tarfs/tarfs_vfsops.c
+27-0tests/sys/fs/tarfs/tarfs_test.sh
+1-1sys/fs/tarfs/tarfs_io.c
+51-263 files

FreeBSD/src 4c05ff1sys/dev/sound/midi mpu401.c midi.c, sys/dev/sound/pcm sound.h

sound: Remove KOBJMETHOD_END re-definitions

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj, emaste
Differential Revision:  https://reviews.freebsd.org/D53696
DeltaFile
+0-4sys/dev/sound/pcm/sound.h
+0-4sys/dev/sound/midi/mpu401.c
+0-4sys/dev/sound/midi/midi.c
+0-123 files

FreeBSD/src 6a56966share/examples/sound oss.h simple.c, share/examples/sound/oss audio.c

sound examples: Extend and clean up

- Simplify directory and file structure.
- Clean up and improve code. Add more comments.
- Add polling examples.

MFC after:      1 week
Reviewed by:    christos
Differential Revision:  https://reviews.freebsd.org/D53353
DeltaFile
+0-310share/examples/sound/oss/audio.c
+222-0share/examples/sound/oss.h
+147-0share/examples/sound/simple.c
+79-0share/examples/sound/kqueue.c
+70-0share/examples/sound/select.c
+70-0share/examples/sound/poll.c
+588-3102 files not shown
+595-3838 files

FreeBSD/src e353cb8sys/dev/cxgbe/nvmf nvmf_che.c

nvmf_che: Fix amd64 LINT-NOVIMAGE build

Fixes:  ec0cd287f55f nvmf_che: NVMe-TCP offload support for Chelsio T7 adapters
Sponsored by:   Chelsio Communications
DeltaFile
+1-0sys/dev/cxgbe/nvmf/nvmf_che.c
+1-01 files

FreeBSD/src a6ae609sys/dev/cxgbe/crypto t7_kern_tls.c

cxgbe KTLS tx: Distribute FW6_PLD replies across rx queues

If the connection flowid is available then the replies are requested on
the rx queue that is receiving wire traffic for the connection.  This
reduces contention for the txq lock.

Reviewed by:    jhb
MFC after:      3 days
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D53385
DeltaFile
+12-6sys/dev/cxgbe/crypto/t7_kern_tls.c
+12-61 files

FreeBSD/src bee506brelease Makefile.azure

Azure: Fix image names

We need to specify the correct image names -- *.vhdf, not *.vhd -- in
order for them to upload.

15.0 candidate

Approved by:    re (cperciva)
Reviewed by:    lwhsu
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D53684

(cherry picked from commit df84867e8af49437bdc76a0df41d78f5a362cd24)
(cherry picked from commit eee338692b02bdb763a8256fe720efb5ffa07fe5)
DeltaFile
+1-1release/Makefile.azure
+1-11 files

FreeBSD/src f490eaesys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: clear CONF_IDLE earlier

When starting to scan and ending a scan we clear/set the hardware to
idle.  Similarly we set the hw to idle when we remove the channel
context but when starting we only set it to non-idle when we went from
assoc to run.  This apparently was not a problem most of the time
as the switch from a failed hardware scan to a software scan was
racing against net80211.  ad4ddc83ebf8 fixed that specifically for
rtw88 and while we were more consistently scanning, this broke
authentication as the setting of idle at the end of the scan was
now happening reliably.  Move the unsetting of idle from assoc_to_run
to scan_to_auth for when we  create the chanctx to keep it
symmetrical.  This makes authentication work again for rtw88 (though
not for everyone due to other possible problems with net80211).

This likely also fixes the problems in the listed PRs.

iwlwifi(4) mvm and mld driver parts do not use this information at
all and were never affected.

    [8 lines not shown]
DeltaFile
+4-2sys/compat/linuxkpi/common/src/linux_80211.c
+4-21 files

FreeBSD/src c5977a9usr.sbin/bsdinstall/scripts zfsboot

bsdinstall: Use fat32 EFI system partition for ZFS

This is consistent with other operating systems and with bsdinstall's
UFS config and with bsdinstall's ZFS config prior to commit
0b7472b3d8d2.

Approved by:    re (cperciva)
PR:             290857
Fixes: 0b7472b3d8d2 ("Mount the EFI system partition (ESP) on newly-installed systems.")
Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53642

(cherry picked from commit 4109cdf0f817162cf3032aa589dd180dfa910025)
(cherry picked from commit 65e347d315449e8c28dbcb0c5bb64f79d822d024)
DeltaFile
+1-1usr.sbin/bsdinstall/scripts/zfsboot
+1-11 files

FreeBSD/src c50312bsys/dev/virtio/network if_vtnet.c

vtnet: fix enabling/disabling tso

Transmit segment offloading depends on transmit checksum offloading.
Enforce that constraint. This also fixes a bug, since if_hwassist bits
are from the CSUM_ space, not from the IFCAP_ space.

Approved by:    re (cperciva)
PR:                     290773
Reviewed by:            Timo Völker
Tested by:              lg at efficientip.com
Differential Revision:  https://reviews.freebsd.org/D53629

(cherry picked from commit 4c50ac68166caf7e08c5a9984d63fa91490fa50d)
(cherry picked from commit 0fb0ba51d8bc1e6673e073c1c5a02922f997f6b8)
DeltaFile
+24-4sys/dev/virtio/network/if_vtnet.c
+24-41 files

FreeBSD/src b91bf9fsys/dev/virtio/network if_vtnet.c

vtnet: don't provide VIRTIO_NET_HDR_F_DATA_VALID

According to section 5.1.6.2.1 of version 1.3 of the virtio
specification, the driver MUST NOT set VIRTIO_NET_HDR_F_DATA_VALID in
the flags. So don't do that.

Approved by:    re (cperciva)
Reviewed by:            Timo Völker
Differential Revision:  https://reviews.freebsd.org/D53650

(cherry picked from commit 836b3cd9d7910aff5225e9e58189067ca03fae30)
(cherry picked from commit 0ef06b5bccf43ca807e237122746dec122600157)
DeltaFile
+1-6sys/dev/virtio/network/if_vtnet.c
+1-61 files

FreeBSD/src bd4cf77sys/netinet tcp_syncache.c tcp_input.c

tcp: drop SYN ACK segment for listening sockets

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.

Approved by:    re (cperciva)
Reviewed by:            Nick Banks, Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D53540

(cherry picked from commit 239464e99321ede07664782426ec4e54cd8a618d)
(cherry picked from commit e082156ae14b6717f08dccfff62d1fcbb3b26487)
DeltaFile
+0-17sys/netinet/tcp_syncache.c
+2-3sys/netinet/tcp_input.c
+0-1sys/netinet/tcp_syncache.h
+2-213 files

FreeBSD/src eee3386release Makefile.azure

Azure: Fix image names

We need to specify the correct image names -- *.vhdf, not *.vhd -- in
order for them to upload.

15.0 candidate

Reviewed by:    lwhsu
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D53684

(cherry picked from commit df84867e8af49437bdc76a0df41d78f5a362cd24)
DeltaFile
+1-1release/Makefile.azure
+1-11 files

FreeBSD/src 6aaf184. ObsoleteFiles.inc

pcic.4: Really remove

MFC after:      2 days
Fixes:          1d9f2db7c (pcic.4: Remove stale manual)
Fixes:          31b35400c (pccard: Remove more of the PC Card)
Reported by:    emaste
DeltaFile
+2-1ObsoleteFiles.inc
+2-11 files

FreeBSD/src 6015edblib/libuutil libuutil.abi, lib/libzfs libzfs.abi

lib: update ABI meta following libspl changes

In theory they should not have resulted in a change. In practice, the
way visibility is set up currently means that many of our convenience
libraries will "leak through" into the available symbols in our public
libraries.

In this commit, we're seeing all the new symbols in libspl through
libuutil, libzfs and libzfs_core. Importantly, none have been removed,
so consumers of these libraries will not notice.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn at despairlabs.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #17861
DeltaFile
+1,049-48lib/libuutil/libuutil.abi
+1,043-26lib/libzfs_core/libzfs_core.abi
+842-8lib/libzfs/libzfs.abi
+2,934-823 files

FreeBSD/src 8a8c58f. ObsoleteFiles.inc

pccard.4: Really remove

Fixes:          5b9fba1cb (Retire pccard(4))
Fixes:          31b35400c (Remove more of the PC Card infrastructure)
Discussed with: emaste, jhb
DeltaFile
+1-1ObsoleteFiles.inc
+1-11 files

FreeBSD/src 3cf85a6. ObsoleteFiles.inc, share/man/man4 crypto.4

hifn.4: Really remove

Fixes:  a38a42ed9a975 (random: remove hifn(4))
Fixes:  685a78570b359 (random: remove hifn(4))
DeltaFile
+1-1ObsoleteFiles.inc
+0-1share/man/man4/crypto.4
+1-22 files

FreeBSD/src 1d9f2dbshare/man/man4 pcic.4 exca.4

pcic.4: Remove stale manual

MFC after:      2 days
Reviewed by:    ziaee
Fixes:          31b35400c (pccard: Remove more of the PC Card)
Discussed with: bsdimp, emaste, jhb
Extracted from: https://reviews.freebsd.org/D53434
DeltaFile
+0-100share/man/man4/pcic.4
+1-2share/man/man4/exca.4
+0-1share/man/man4/Makefile
+0-1share/man/man4/ath.4
+1-1044 files

FreeBSD/src 23d17f3cmd ztest.c, lib/libspl random.c

libspl/random: add switch to force pseudo-random numbers for all calls

ztest wants to force all kernel random calls to use the pseudo-random
generator (/dev/urandom), to avoid depleting the system entropy pool
just for testing.

Up until the previous commit, it did this by switching the path that the
libzpool (now libspl) random API would use to get random data from; that
is, it took advantage of an implementation detail.

Now that that hole is closed to it, we need another method. This commit
introduces that; a simple API call to enable/disable "force pseudo"
mode.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
DeltaFile
+10-0lib/libspl/random.c
+6-0cmd/ztest.c
+2-0lib/libspl/include/sys/random.h
+18-03 files

FreeBSD/src 4d451bacmd ztest.c, lib/libspl taskq.c random.c

libspl: hide global data objects

Currently libspl is a static archive that is linked into multiple shared
objects, which then re-export its symbols. We intend to fix this soon.

For the moment though, most programs shipped with OpenZFS depend on two
or more of these shared objects, and see the same symbols twice. For
functions this is not a problem, as they do not have any mutable state
and so the linker can simply select the first one and use that for all.

For global data objects however, each shared object will have direct
(non-relocatable) references to its own instance of the symbol, such
that changes on one will not necessarily be seen by the other. While
this shouldn't be a problem in practice as these reexported interfaces
are not supposed to be used, they are technically undefined behaviour in
C (C17 6.9.2) and are reported by ASAN as a violation of C++'s "One
Definition Rule".

To fix this, we hide these globals inside their compilation units, and

    [7 lines not shown]
DeltaFile
+20-17lib/libspl/taskq.c
+4-15cmd/ztest.c
+11-4lib/libspl/random.c
+10-3lib/libspl/libspl.c
+5-2lib/libspl/include/sys/taskq.h
+2-4lib/libspl/include/sys/thread.h
+52-454 files not shown
+58-5210 files

FreeBSD/src e282e98lib/libicp Makefile.am, lib/libzpool Makefile.am

libzpool: add zfs_impl.c, remove from libicp

This isn't used by libicp directly, but is by some clients, and relies
on headers specific to the zfs module, which makes using it difficult
otherwise.

Also switch the checksum tests over to use libzpool, so they can get
access to it. That's not exactly what we want in the long term, but the
icp and zfs modules have a complicated relationship so this will do for
now.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
DeltaFile
+1-3tests/zfs-tests/cmd/Makefile.am
+1-2lib/libicp/Makefile.am
+1-0lib/libzpool/Makefile.am
+3-53 files

FreeBSD/src 677d6edinclude/sys zfs_context.h, scripts spdxcheck.pl

zfs_context: remove duplicate includes

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
DeltaFile
+1-1scripts/spdxcheck.pl
+0-2include/sys/zfs_context.h
+1-32 files

FreeBSD/src a49158cconfig Rules.am, include/sys/crypto common.h

icp: remove global icp includes

Only include the required icp headers.  There's no need to
include sys/zfs_context.h and pull in all of the zfs headers.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
DeltaFile
+3-0lib/libicp/Makefile.am
+2-0include/sys/crypto/common.h
+0-1config/Rules.am
+0-1module/icp/spi/kcf_spi.c
+5-24 files

FreeBSD/src 913bdbflib/libspl taskq.c, lib/libzfs libzfs_crypto.c

libzpool: remove global libzpool includes

Only include the zfs headers where they're currently required to
compile.  Unfortunately, including zfs_ioctl.h in user space pulls
in a bunch of internal zfs headers as a side effect.  We'll need
to move these structures in to a new shared header to avoid this.
We should not need to add the LIBZPOOL_CPPFLAGS when building the
zed, zinject, zpool, libzfs, ior libzfs_core.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
DeltaFile
+6-1lib/libspl/taskq.c
+2-1tests/zfs-tests/cmd/ereports.c
+0-1tests/zfs-tests/cmd/Makefile.am
+0-1lib/libzfs/libzfs_crypto.c
+0-1lib/libzpool/Makefile.am
+8-55 files

FreeBSD/src 99d7453include/sys zfs_bootenv.h, lib/libzpool/include Makefile.am

libzpool: add BE_POSIX_VENDOR for userspace bootenv

This is mostly a placeholder; it's not actually clear if a boot
environment makes any sense for userspace. Still, "posix" is the likely
future name of libzpool as a port, and this define is mandatory, so lets
roll with it for now.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
DeltaFile
+39-0lib/libzpool/include/sys/zfs_bootenv_os.h
+1-0include/sys/zfs_bootenv.h
+1-0lib/libzpool/include/Makefile.am
+41-03 files

FreeBSD/src 801d9b4include/os/freebsd/spl/sys sdt.h, include/os/freebsd/zfs/sys zfs_debug_os.h

debug: move all of the debug bits out of the spl

Pull all of the internal debug infrastructure up in to the zfs
code to clean up the layering.  Remove all the dodgy usage of
SET_ERROR and DTRACE_PROBE from the spl.  Luckily it was
lightly used in the spl layer so we're not losing much.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
DeltaFile
+48-0include/os/freebsd/zfs/sys/zfs_debug_os.h
+0-47include/os/freebsd/spl/sys/sdt.h
+29-0include/os/linux/zfs/sys/zfs_debug_os.h
+29-0lib/libzpool/include/sys/zfs_debug_os.h
+1-24lib/libzpool/include/sys/trace_zfs.h
+0-24lib/libspl/include/sys/trace_spl.h
+107-9512 files not shown
+115-12618 files

FreeBSD/src eceb5b3include/sys zfs_context.h, lib/libspl/include/sys types.h

libspl: move loff_t declaration from zfs_context.h

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
DeltaFile
+4-0lib/libspl/include/sys/types.h
+0-4include/sys/zfs_context.h
+4-42 files

FreeBSD/src 5305d0finclude/sys zfs_context.h, lib/libspl/include/sys debug.h

zfs_context: move empty __init/__exit macros to sys/debug.h

These are kind-of compiler attribute placeholders, so go here with the
others for now.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
DeltaFile
+0-6include/sys/zfs_context.h
+6-0lib/libspl/include/sys/debug.h
+6-62 files

FreeBSD/src 2924382include/sys zfs_context.h, lib/libspl/include/sys debug.h

libspl: move compiler attribute macros from zfs_context.h

sys/debug.h is not really the right place for them, but we already have
some there for libspl, so it is at least convenient.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
DeltaFile
+18-0lib/libspl/include/sys/debug.h
+0-8include/sys/zfs_context.h
+18-82 files