FreeBSD/src 955f213sys/geom/raid3 g_raid3.c

graid3: Fix teardown in g_raid3_try_destroy()

Commit 33cb9b3c3a22 replaced a g_raid3_destroy_device() call with a
g_raid3_free_device() call, which was incorrect and could lead to a
panic if a RAID3 GEOM failed to start (e.g., due to missing disks).

Reported by:    graid3 tests
Fixes:          33cb9b3c3a22 ("graid3: Fix teardown races")
MFC after:      3 days
Sponsored by:   Klara, Inc.
DeltaFile
+1-1sys/geom/raid3/g_raid3.c
+1-11 files

FreeBSD/src c0f1323tests/sys/net if_wg.sh Makefile

wg tests: Add a simple regression test case for netmap support

MFC after:      1 month
Sponsored by:   Klara, Inc.
Sponsored by:   Zenarmor
DeltaFile
+92-0tests/sys/net/if_wg.sh
+5-1tests/sys/net/Makefile
+97-12 files

FreeBSD/src bf454cashare/man/man4 wg.4, sys/dev/wg if_wg.c

wg: Add netmap support

When in netmap (emulated) mode, wireguard interfaces prepend or strip a
dummy ethernet header when interfacing with netmap.  The netmap
application thus sees unencrypted, de-encapsulated frames with a fixed
header.

In this mode, netmap hooks the if_input and if_transmit routines of the
ifnet.  Packets from the host TX ring are handled by wg_if_input(),
which simply hands them to the netisr layer; packets which would
otherwise be tunneled are intercepted in wg_output() and placed in the
host RX ring.

The "physical" TX ring is processed by wg_transmit(), which behaves
identically to wg_output() when netmap is not enabled, and packets
appear in the "physical" RX ring by hooking wg_deliver_in().

Reviewed by:    vmaffione
MFC after:      1 month

    [3 lines not shown]
DeltaFile
+149-6sys/dev/wg/if_wg.c
+14-0share/man/man4/wg.4
+163-62 files

FreeBSD/src 278d695lib/libpmc/pmu-events/arch/x86/amdzen4 data-fabric.json cache.json

libpmc: Import AMD Zen 4 PMU events

MFC after:      1 week
DeltaFile
+1,090-0lib/libpmc/pmu-events/arch/x86/amdzen4/data-fabric.json
+828-0lib/libpmc/pmu-events/arch/x86/amdzen4/cache.json
+818-0lib/libpmc/pmu-events/arch/x86/amdzen4/floating-point.json
+418-0lib/libpmc/pmu-events/arch/x86/amdzen4/recommended.json
+174-0lib/libpmc/pmu-events/arch/x86/amdzen4/memory.json
+138-0lib/libpmc/pmu-events/arch/x86/amdzen4/other.json
+3,466-05 files not shown
+3,871-111 files

FreeBSD/src dfa3913contrib/llvm-project/compiler-rt/lib/builtins/riscv save.S restore.S, contrib/llvm-project/libcxx/include stddef.h

Merge llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6.

PR:             276104
MFC after:      3 days
DeltaFile
+9-51contrib/llvm-project/llvm/lib/Target/Mips/MipsExpandPseudo.cpp
+44-0contrib/llvm-project/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
+8-34contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+42-0contrib/llvm-project/compiler-rt/lib/builtins/riscv/save.S
+42-0contrib/llvm-project/compiler-rt/lib/builtins/riscv/restore.S
+10-19contrib/llvm-project/libcxx/include/stddef.h
+155-10419 files not shown
+234-14025 files

FreeBSD/src 0b56acflibexec/rtld-elf rtld.c rtld.1, libexec/rtld-elf/aarch64 reloc.c

rtld: introduce STATIC_TLS_EXTRA

(cherry picked from commit 95335dd3c19e0ade161bb4dc8462fc3d045ce4f8)
DeltaFile
+17-4libexec/rtld-elf/rtld.c
+7-1libexec/rtld-elf/rtld.1
+2-1libexec/rtld-elf/powerpc64/reloc.c
+2-1libexec/rtld-elf/arm/reloc.c
+2-1libexec/rtld-elf/powerpc/reloc.c
+1-1libexec/rtld-elf/aarch64/reloc.c
+31-94 files not shown
+35-1210 files

FreeBSD/src 8d74737libexec/rtld-elf rtld.1

rtld(1): minor clarification for LD_STATIC_TLS_EXTRA

Also properly style the paragraph.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+5-2libexec/rtld-elf/rtld.1
+5-21 files

FreeBSD/src fa3b320sys/dev/iicbus/rtc ds1307.c

ds1307(4): Fix a typo in a source code comment

- s/slighly/slightly/

MFC after:      1 week
DeltaFile
+1-1sys/dev/iicbus/rtc/ds1307.c
+1-11 files

FreeBSD/src e6c45f3sys/i386/include atomic.h

i386: Fix a typo in a source code comment

- s/slighly/slightly/

MFC after:      1 week
DeltaFile
+1-1sys/i386/include/atomic.h
+1-11 files

FreeBSD/src 1bbdcf6sys/dev/safe safe.c

safe(4): Remove a double word in a source code comment

- s/of of/of/

MFC after:      3 days
DeltaFile
+1-1sys/dev/safe/safe.c
+1-11 files

FreeBSD/src 604511fsys/dev/usb usb_device.c

usb(4): Remove a double word in a source code comment

- s/of of/of/

MFC after:      3 days
DeltaFile
+1-1sys/dev/usb/usb_device.c
+1-11 files

FreeBSD/src d274796sys/dev/bhnd/nvram bhnd_nvram_data_bcmraw.c

bhnd(4): Remove a double word in a source code comment

- s/of of/of/

MFC after:      3 days
DeltaFile
+1-1sys/dev/bhnd/nvram/bhnd_nvram_data_bcmraw.c
+1-11 files

FreeBSD/src 1ff65c5sys/conf NOTES

NOTES: Remove a double word in comment

- s/of of/of/

MFC after:      3 days
DeltaFile
+1-1sys/conf/NOTES
+1-11 files

FreeBSD/src 516e591sys/arm64/qoriq qoriq_dw_pci.c

arm64: Remove a double word in a source code comment

- s/of of/of/

MFC after:      3 days
DeltaFile
+1-1sys/arm64/qoriq/qoriq_dw_pci.c
+1-11 files

FreeBSD/src cf5d9c4sys/sys link_elf.h types.h

sys: Remove two double words in source code comments

- s/of of/of/

MFC after:      5 days
DeltaFile
+1-1sys/sys/link_elf.h
+1-1sys/sys/types.h
+2-22 files

FreeBSD/src e1e149atools/tools/mwl/mwlstats mwlstats.c

mwlstats: Fix a typo in an error message

- s/the the/the/

MFC after:      5 days
DeltaFile
+1-1tools/tools/mwl/mwlstats/mwlstats.c
+1-11 files

FreeBSD/src ce77c4ccompiler-rt/lib/builtins/riscv restore.S save.S, libcxx/include stddef.h

Vendor import of llvm-project branch release/18.x llvmorg-18.1.4-0-ge6c3289804a6.
DeltaFile
+9-51llvm/lib/Target/Mips/MipsExpandPseudo.cpp
+44-0llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
+42-0compiler-rt/lib/builtins/riscv/restore.S
+42-0compiler-rt/lib/builtins/riscv/save.S
+8-34llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+10-19libcxx/include/stddef.h
+155-10412 files not shown
+219-12518 files

FreeBSD/src 68b9eb9sbin/ifconfig ifieee80211.c

ifconfig(8): Fix two typos in source code comments

- s/the the/the/

MFC after:      3 days
DeltaFile
+2-2sbin/ifconfig/ifieee80211.c
+2-21 files

FreeBSD/src 82d22a8lib/libgcc_eh Makefile.inc

libgcc_{eh,s}: restore __*_frame_info symbols post llvm18

The upstream llvm commit 5eb44df1b64d made the addition of these GCC
compatability symbols dependent on build configuration rather than
hardcoded for amd64, i386, and powerpc.  Reenable them.

Reviewed by:    dim
Differential Revision:  https://reviews.freebsd.org/D44877

(cherry picked from commit 0b9e3585805e83718c3ebdab923aca51597193cd)
DeltaFile
+3-0lib/libgcc_eh/Makefile.inc
+3-01 files

FreeBSD/src 70ab6e9contrib/llvm-project/libcxx/include/__type_traits is_convertible.h

Revert commit 925a11a5f221 from llvm-project (by Nikolas Klauser):

  [libc++] Simplify is_convertible

  GCC 13 has added __is_convertible(), so we don't need to keep the fallback implementation around.

  Reviewed By: #libc, Mordante

  Spies: Mordante, libcxx-commits

  Differential Revision: https://reviews.llvm.org/D157939

This should allow buildworld with gcc 12 to work again.

PR:             276104
MFC after:      1 month

(cherry picked from commit 2365f012951e5f0333cf31c690f668299c86b30e)
DeltaFile
+78-1contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h
+78-11 files

FreeBSD/src 5b763c0contrib/llvm-project/llvm/lib/Transforms/Utils SimplifyCFG.cpp

Merge commit 37b7207651b4 from llvm-project (by zhongyunde at huawei.com):

  [SimplifyCFG] Fix crash when there is unreachable large index (#88616)

  The large case index out of scope is dead code, but it is still be
  created for TableContents in SwitchLookupTable::SwitchLookupTable,
  so make sure the table size after growing should not get smaller.

  Fix https://github.com/llvm/llvm-project/issues/88607

This should fix "Assertion failed: (idx < size()), function operator[]"
when building the science/dynare port.

PR:             276104, 278320
Reported by:    yuri
MFC after:      1 month

(cherry picked from commit 514c98ba14a0f590891844d1a6bec0ac4de54489)
DeltaFile
+3-1contrib/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+3-11 files

FreeBSD/src 50fd2fblib/libcompiler_rt Makefile.inc

libcompiler_rt Makefile.inc: update _Float16/__bf16 checks

Clang supports __bf16 for riscv from version 18.0 onwards, so update the
checks for it. While here, rewrite the checks so they are hopefully more
readable, and also handle gcc a little better.

In addition, define COMPILER_RT_HAS_FLOAT16 and COMPILER_RT_HAS_BFLOAT16
when these features should be available, since there are some parts in
compiler-rt that check for these defines.

PR:             276104
MFC after:      1 month

(cherry picked from commit f276adc148433d009d198c2ebccdd3303377e237)
DeltaFile
+28-5lib/libcompiler_rt/Makefile.inc
+28-51 files

FreeBSD/src 667a595sys/conf files.i386, sys/modules/ce Makefile

tau32-ddk.c: suppress warning about ignored attributes

This driver is heavily obfuscated, and causes a -Werror warning with
clang 18 now:

  sys/dev/ce/tau32-ddk.c:358:10: error: 'const' attribute on function returning 'void'; attribute ignored [-Werror,-Wignored-attributes]
    358 | ((const))nvqbt(void){__asm __volatile("repe; nop; repe; nop;"
        |          ^

Supress the warning since the driver can never be fixed. Direct commit
to stable/13, since the driver has been removed in 14.x and later.

PR:             276104
DeltaFile
+1-1sys/conf/files.i386
+1-0sys/modules/ce/Makefile
+2-12 files

FreeBSD/src ac652eecontrib/llvm-project/llvm/lib/Target/X86 X86InstrAVX512.td X86ISelLowering.cpp

Merge commit 55c466da2f2f from llvm-project (by Benjamin Kramer):

  [X86][AVX512BF16] Add a few missing insert/extract patterns

  These are really the same as the f16 (and i16) instructions, but we need
  them for any type that can occur.

Merge commit 2e4e04c59043 from llvm-project (by Phoebe Wang):

  [X86][BF16] Do not lower to VCVTNEPS2BF16 without AVX512VL (#86395)

  Fixes: #86305

These should fix "fatal error: error in backend: Cannot select: t71:
v32bf16 = insert_subvector t67, t64, Constant:i32<16>" when building the
misc/ncnn port.

PR:             278305
Reported by:    yuri

    [3 lines not shown]
DeltaFile
+12-0contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td
+5-2contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
+17-22 files

FreeBSD/src 055e875sys/sys param.h

Bump __FreeBSD_version for llvm 18.1.3 merge

PR:             276104
MFC after:      1 month

(cherry picked from commit 0192eda105b367d4670205547e8e830e3716bea3)
DeltaFile
+1-1sys/sys/param.h
+1-11 files

FreeBSD/src bf7e13econtrib/llvm-project/compiler-rt/lib/sanitizer_common sanitizer_linux_libcdep.cpp

sanitizers: mark __elf_aux_vector as weak, to allow linking without libsys

After libsys was introduced, linking sanitized programs started failing
with:

  # c++ -fsanitize=address main.cc
  ld: error: undefined symbol: __elf_aux_vector
  >>> referenced by sanitizer_linux_libcdep.cpp:950 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:950)
  >>>               sanitizer_linux_libcdep.o:(__sanitizer::ReExec()) in archive /usr/lib/clang/17/lib/freebsd/libclang_rt.asan-x86_64.a
  c++: error: linker command failed with exit code 1 (use -v to see invocation)

Mark __elf_aux_vector as weak in the internal sanitizer declaration, so
the linker will accept it at link time. The dynamic linker will then
take care of the symbol at run time.

Suggestion by:  brooks
PR:             276104, 277393
MFC after:      1 month

(cherry picked from commit 8b181c2fbaa8c6b32e5510ef6e3a6d364ff4710e)
DeltaFile
+1-1contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
+1-11 files

FreeBSD/src 7334d08lib/libcompiler_rt Makefile.inc

libcompiler_rt Makefile.inc: include bsd.compiler.mk to fix build

Apparently libgcc_s has always included libcompiler_rt's Makefile.inc
without first including bsd.compiler.mk, even though Makefile.inc used
COMPILER_TYPE already. It looks like we were just lucky that the
expression was not malformed.

PR:             276104
Reported by:    Herbert J. Skuhra <herbert at gojira.at>
MFC after:      1 month

(cherry picked from commit 4c983a2886877a855ac3a2836b15d80356fbb8d4)
DeltaFile
+1-0lib/libcompiler_rt/Makefile.inc
+1-01 files

FreeBSD/src 89cc833sys/conf kern.pre.mk

Fix GENERIC-KASAN kernel build for amd64

Work around https://github.com/llvm/llvm-project/issues/87923, which
leads to an assertion failure compiling several kernel source files with
asan enabled.

PR:             276104
MFC after:      1 month

(cherry picked from commit b811dac2115a6ada606c03d7d823a95d11c5f3c9)
DeltaFile
+7-0sys/conf/kern.pre.mk
+7-01 files

FreeBSD/src 7b86b92sys/conf files.arm64

Fix arm64 build after llvm 18.1.3 upgrade

Apparently clang 18 has become more strict about using floating point
registers in inline assembly when -mgeneral-regs-only is used. This
causes sys/arm64/arm64/vfp.c to fail to compile, with "error:
instruction requires: fp-armv8", and "error: expected readable system
register".

To fix it, similar to other files compiled for arm64, disable
-mgeneral-regs-only for this particular file.

PR:             276104
MFC after:      1 month

(cherry picked from commit f4d93b67611f6f8b19db7bac6b0973b2ef0cfcb6)
DeltaFile
+2-1sys/conf/files.arm64
+2-11 files

FreeBSD/src 0764680sys/arm64/arm64 vfp.c, sys/conf files.arm64

Fix arm64 build after llvm 18.1.3 upgrade (take 2)

Instead of compiling the whole sys/arm64/arm64/vfp.c file without
-mgeneral-regs-only, which might have unwanted side effects, add
".arch_extension fp" / ".arch_extension nofp" pairs to the inline
assembly.

PR:             276104
Suggested by:   andrew
MFC after:      1 month

(cherry picked from commit 61e482f2fcd53bbc7fd3d4cc8b7df79d5d57d75c)
DeltaFile
+4-0sys/arm64/arm64/vfp.c
+1-2sys/conf/files.arm64
+5-22 files