FreeBSD/src c2a005asys/net80211 ieee80211.h

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
DeltaFile
+52-11sys/net80211/ieee80211.h
+52-111 files

FreeBSD/src e9961easys/net80211 ieee80211.c ieee80211_crypto.c

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.

    [2 lines not shown]
DeltaFile
+22-0sys/net80211/ieee80211.c
+21-0sys/net80211/ieee80211_crypto.c
+4-0sys/net80211/ieee80211_var.h
+4-0sys/net80211/ieee80211_crypto.h
+51-04 files

FreeBSD/src 491938dcontrib/wpa/src/drivers driver_bsd.c

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
DeltaFile
+0-12contrib/wpa/src/drivers/driver_bsd.c
+0-121 files

FreeBSD/src 1116e8bshare/man/man9 ieee80211.9, sys/net80211 ieee80211_crypto.c ieee80211_ioctl.c

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

    [29 lines not shown]
DeltaFile
+12-0sys/net80211/ieee80211_crypto.c
+5-1sys/net80211/ieee80211_ioctl.c
+3-1share/man/man9/ieee80211.9
+2-2sys/net80211/ieee80211_ioctl.h
+3-1sys/net80211/ieee80211_var.h
+25-55 files

FreeBSD/src ebcfab9sys/dev/nvme nvme.h

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
DeltaFile
+1-1sys/dev/nvme/nvme.h
+1-11 files

FreeBSD/src 2ae0f5asys/compat/linuxkpi/common/include/linux io.h

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
DeltaFile
+4-5sys/compat/linuxkpi/common/include/linux/io.h
+4-51 files

FreeBSD/src 22b3e78contrib/llvm-project/openmp/runtime/src kmp_settings.cpp

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

    [2 lines not shown]
DeltaFile
+2-0contrib/llvm-project/openmp/runtime/src/kmp_settings.cpp
+2-01 files

FreeBSD/src da15ed2contrib/llvm-project/openmp/runtime/src z_Linux_util.cpp

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

    [11 lines not shown]
DeltaFile
+3-3contrib/llvm-project/openmp/runtime/src/z_Linux_util.cpp
+3-31 files

FreeBSD/src 7ef6ce5share/man/man4 smsc.4, sys/dev/usb/net if_smsc.c

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
DeltaFile
+6-6share/man/man4/smsc.4
+2-2sys/dev/usb/net/if_smsc.c
+8-82 files

FreeBSD/src 5d62025usr.sbin/bhyve gdb.c

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
DeltaFile
+0-1usr.sbin/bhyve/gdb.c
+0-11 files

FreeBSD/src e333364sys/amd64/vmm vmm_dev.c, sys/arm64/vmm vmm_dev.c

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
DeltaFile
+15-14sys/arm64/vmm/vmm_dev.c
+7-8sys/amd64/vmm/vmm_dev.c
+22-222 files

FreeBSD/src ffbaa45usr.sbin/bsdinstall/scripts config

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
DeltaFile
+0-3usr.sbin/bsdinstall/scripts/config
+0-31 files

FreeBSD/src 74b67dbsys/contrib/openzfs/module/icp/asm-aarch64/blake3 b3_aarch64_sse41.S b3_aarch64_sse2.S

zfs: unbreak aarch64 build with non-gcc compilers

Vendor did not backport this fix into zfs-2.2-release yet.

OpenZFS PR: #16103 35bf25848 Fix: FreeBSD Arm64 does not build currently
Approved by:    re (cperciva)

(cherry picked from commit b9dee1dca2d74e12e867fd29d2d584fc385078eb)
(cherry picked from commit 7e10c2d27a538aa3f5afcafe48801a9316e30027)
DeltaFile
+2-2sys/contrib/openzfs/module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S
+2-2sys/contrib/openzfs/module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S
+4-42 files

FreeBSD/src 78c9d8fsys/contrib/openzfs/config ax_python_devel.m4, sys/contrib/openzfs/module/os/linux/zfs vdev_disk.c

zfs: merge openzfs/zfs at 256659204 (zfs-2.2-release) into stable/14

OpenZFS release 2.2.4

Notable upstream pull request merges:
 #15076 fdd97e009 Refactor dmu_prefetch()
 #15225 5972bb856 Use ASSERT0P() to check that a pointer is NULL
 #15381 7ea833100 ZIL: Detect single-threaded workloads
 #15515 8b1a132de ZIO: Optimize zio_flush()
 #15225 d6da6cbd7 Clean up existing VERIFY*() macros
 #15225 5dda8c091 Add VERIFY0P() and ASSERT0P() macros
 #15436 61f3638a3 Add prefetch property
 #15509 6f323353d Add ashift validation when adding devices to a pool
 #15539 ea3f7c12a Extend import_progress kstat with a notes field
 #15635 25ea8ce94 ZIL: Improve next log block size prediction
 #15784 16c223eec Do no use .cfi_negate_ra_state within the assembly on
                  Arm64
 #15839 706307445 vdev probe to slow disk can stall mmp write checker
 #15879 86b39b41a zpool: Fix locale-specific time

    [34 lines not shown]
DeltaFile
+702-215sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c
+232-118sys/contrib/openzfs/module/zfs/zil.c
+229-112sys/contrib/openzfs/config/ax_python_devel.m4
+241-55sys/contrib/openzfs/module/zfs/dmu_zfetch.c
+146-60sys/contrib/openzfs/module/zfs/zap_micro.c
+205-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/zed_slow_io.ksh
+1,755-560152 files not shown
+4,820-1,658158 files

FreeBSD/src 2a32b54contrib/ofed/libibverbs libibverbs.map

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
DeltaFile
+0-2contrib/ofed/libibverbs/libibverbs.map
+0-21 files

FreeBSD/src eb5fd01tests/sys/vm/soxstack soxstack.c

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
DeltaFile
+2-2tests/sys/vm/soxstack/soxstack.c
+2-21 files

FreeBSD/src ec2b6b1lib/libthr/thread thr_syscalls.c thr_private.h

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
DeltaFile
+5-20lib/libthr/thread/thr_syscalls.c
+2-2lib/libthr/thread/thr_private.h
+7-222 files

FreeBSD/src 7b65987sys/sys sdt.h

sdt: Add macros which expand to probe and provider structure names

No functional change intended.

MFC after:      1 week

(cherry picked from commit 4afce4473db4f51acd034333b8506294b4fb61e6)
DeltaFile
+21-16sys/sys/sdt.h
+21-161 files

FreeBSD/src f4ab464sys/netgraph ng_pipe.c

ng_pipe: Replace deprecated random() with prng32_bounded()

Signed-off-by: Martin Vahlensieck <git at academicsolutions.ch>

MFC after:      2 weeks
Reviewed by:    markj
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1181

(cherry picked from commit a3ecf8c7863683e53c77a17f96ab7012352265b9)
DeltaFile
+3-2sys/netgraph/ng_pipe.c
+3-21 files

FreeBSD/src a3ca254sys/netgraph ng_pipe.c

ng_pipe: Remove node when all hooks are disconnected

This is the behavior described in the man page.

Signed-off-by: Martin Vahlensieck <git at academicsolutions.ch>

Discussed with: glebius
Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1181

(cherry picked from commit bb2ab7a374b9d81f8368acc506c9700af20a22d6)
DeltaFile
+7-0sys/netgraph/ng_pipe.c
+7-01 files

FreeBSD/src a709ac6sys/netgraph ng_pipe.c

ng_pipe: Fix whitespace

Signed-off-by: Martin Vahlensieck <git at academicsolutions.ch>

Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1181

(cherry picked from commit 8512311fb5004444f43701eb122b6d77c76d7564)
DeltaFile
+8-8sys/netgraph/ng_pipe.c
+8-81 files

FreeBSD/src f55be6dcontrib/netbsd-tests/fs/tmpfs t_times.sh

tmpfs tests: Remove an xfail annotation

This test passes after commit 08f3d5b60cdf ("copy_file_range: Call
vn_rdwr() at least once").

PR:             274615
MFC after:      1 month

(cherry picked from commit 8eb21b4ff0082a707517f805cf14616f91d9218e)
DeltaFile
+0-2contrib/netbsd-tests/fs/tmpfs/t_times.sh
+0-21 files

FreeBSD/src 50af25esys/netgraph ng_pipe.c

ng_pipe: Do not panic when memory allocations fail

Signed-off-by: Martin Vahlensieck <git at academicsolutions.ch>

Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1181

(cherry picked from commit d44c78074d8738db67a2fa6bf07b630c61eee6ab)
DeltaFile
+30-15sys/netgraph/ng_pipe.c
+30-151 files

FreeBSD/src e3b27ccsys/kern vfs_vnops.c

copy_file_range: Call vn_rdwr() at least once

This ensures that we invoke VOP_READ on the input file even if it's
empty, which in turn helps ensure that filesystems update the atime of
the file.

PR:             274615
Reviewed by:    olce, rmacklem, kib
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D43524

(cherry picked from commit 08f3d5b60cdfff434e391d96cdffc5a90c550b07)
DeltaFile
+12-4sys/kern/vfs_vnops.c
+12-41 files

FreeBSD/src 95cb702sys/arm/include armreg.h

arm: Remove duplicate definitions in armreg.h

No functional change intended.

MFC after:      1 week

(cherry picked from commit 4a5e2ddbd8943baf7add831ab835594ac60f94d1)
DeltaFile
+0-2sys/arm/include/armreg.h
+0-21 files

FreeBSD/src 3f6515csys/dev/iicbus if_ic.c, sys/dev/wg if_wg.c

bpf: Make BPF interop consistent with if_loop

The pseudo_AF_HDRCMPLT check is already being done in if_loop and
just needed to be ported over to if_ic, if_wg, if_disc, if_gif,
if_gre, if_me, if_tuntap and ng_iface.  This is needed in order to
allow these interfaces to work properly with e.g., tcpreplay.

PR:             256587
Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/876

(cherry picked from commit 2cb0fce24d64039090dc9243cdf0715ee80c91b1)
DeltaFile
+2-2sys/dev/iicbus/if_ic.c
+2-1sys/net/if_gre.c
+2-1sys/dev/wg/if_wg.c
+2-1sys/net/if_gif.c
+2-1sys/net/if_me.c
+1-1sys/netgraph/ng_iface.c
+11-72 files not shown
+13-98 files

FreeBSD/src ebc5b3busr.bin/ctags C.c ctags.c

ctags: Use C99 bool instead of defining our own

Use stdbool.h definitions instead of defining non-standard ones.

Signed-off-by: Collin Funk <collin.funk1 at gmail.com>

Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1107

(cherry picked from commit 87b0195ace1a71a1a07244890be3aaef72e1ffcd)
DeltaFile
+38-38usr.bin/ctags/C.c
+11-11usr.bin/ctags/ctags.c
+6-6usr.bin/ctags/fortran.c
+5-6usr.bin/ctags/ctags.h
+5-5usr.bin/ctags/yacc.c
+4-4usr.bin/ctags/lisp.c
+69-701 files not shown
+70-717 files

FreeBSD/src 2a9aae9sys/netinet tcp_output.c tcp_var.h, usr.bin/netstat inet.c

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
DeltaFile
+5-3usr.bin/netstat/inet.c
+3-0sys/netinet/tcp_output.c
+2-1sys/netinet/tcp_var.h
+1-0sys/netinet/in_kdtrace.c
+1-0sys/netinet/in_kdtrace.h
+12-45 files

FreeBSD/src dcdfe44sys/netinet tcp_sack.c tcp_output.c

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
DeltaFile
+5-0sys/netinet/tcp_sack.c
+1-1sys/netinet/tcp_output.c
+2-0sys/netinet/tcp_var.h
+8-13 files

FreeBSD/src cbf3575sys/netinet tcp_sack.c

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
DeltaFile
+4-1sys/netinet/tcp_sack.c
+4-11 files