HardenedBSD/src 208b2e0lib/libsys timerfd.2, sbin/ldconfig ldconfig.8

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+7-1usr.bin/man/man.sh
+3-2sbin/ldconfig/ldconfig.8
+1-1lib/libsys/timerfd.2
+1-1sys/fs/tarfs/tarfs_vnops.c
+1-1sbin/nvmecontrol/nvmecontrol.h
+1-1usr.sbin/binmiscctl/binmiscctl.8
+14-76 files

HardenedBSD/ports 7b028c7databases/diesel distinfo Makefile, ftp/filezilla Makefile

Merge branch 'freebsd/main' into hardenedbsd/main
DeltaFile
+81-81databases/diesel/distinfo
+41-42databases/diesel/Makefile
+11-13ftp/filezilla/Makefile
+18-3ftp/libfilezilla/pkg-plist
+9-5sysutils/zellij/distinfo
+0-14multimedia/snapcast/pkg-plist
+160-15858 files not shown
+298-29764 files

HardenedBSD/ports e08c679deskutils/fet distinfo Makefile

deskutils/fet: update to 6.19.3

Changelog: https://lalescu.ro/liviu/fet/news.html

Approved by:    bofh (implicit), diizzy (implicit)
DeltaFile
+3-3deskutils/fet/distinfo
+1-1deskutils/fet/Makefile
+4-42 files

HardenedBSD/ports ee4549bx11/way-displays distinfo Makefile

x11/way-displays: update to 1.11.0

Changes:        https://github.com/alex-courtis/way-displays/releases/tag/1.11.0
Reported by:    GitHub (watch releases)
DeltaFile
+3-3x11/way-displays/distinfo
+1-1x11/way-displays/Makefile
+4-42 files

HardenedBSD/ports fd73befgraphics/vulkan-validation-layers distinfo Makefile

graphics/vulkan-validation-layers: update to 1.3.283

Changes:        https://github.com/KhronosGroup/Vulkan-ValidationLayers/compare/v1.3.282...v1.3.283
Reported by:    Repology, portscout
DeltaFile
+3-3graphics/vulkan-validation-layers/distinfo
+1-1graphics/vulkan-validation-layers/Makefile
+4-42 files

HardenedBSD/ports bb3056egraphics/vulkan-utility-libraries distinfo Makefile

graphics/vulkan-utility-libraries: update to 1.3.283

Changes:        https://github.com/KhronosGroup/Vulkan-Utility-Libraries/compare/v1.3.282...v1.3.283
Reported by:    Repology, portscout
DeltaFile
+3-3graphics/vulkan-utility-libraries/distinfo
+1-1graphics/vulkan-utility-libraries/Makefile
+4-42 files

HardenedBSD/ports 25711cfgraphics/vulkan-tools distinfo Makefile

graphics/vulkan-tools: update to 1.3.283

Changes:        https://github.com/KhronosGroup/Vulkan-Tools/compare/v1.3.282...v1.3.283
Reported by:    Repology, portscout
DeltaFile
+5-5graphics/vulkan-tools/distinfo
+2-2graphics/vulkan-tools/Makefile
+7-72 files

HardenedBSD/ports b36cd8dgraphics/vulkan-loader distinfo Makefile

graphics/vulkan-loader: update to 1.3.283

Changes:        https://github.com/KhronosGroup/Vulkan-Loader/compare/v1.3.282...v1.3.283
Reported by:    Repology, portscout
DeltaFile
+3-3graphics/vulkan-loader/distinfo
+1-2graphics/vulkan-loader/Makefile
+1-1graphics/vulkan-loader/pkg-plist
+5-63 files

HardenedBSD/ports b55899dgraphics/vulkan-headers distinfo Makefile, graphics/vulkan-loader Makefile

graphics/vulkan-headers: update to 1.3.283

Force rebuild vulkan-loader to make sure vulkaninfo shows the new version.

Changes:        https://github.com/KhronosGroup/Vulkan-Headers/compare/v1.3.282...v1.3.283
Reported by:    Repology, portscout
DeltaFile
+3-3graphics/vulkan-headers/distinfo
+1-1graphics/vulkan-headers/Makefile
+1-0graphics/vulkan-loader/Makefile
+5-43 files

HardenedBSD/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

HardenedBSD/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

HardenedBSD/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

HardenedBSD/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

HardenedBSD/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

HardenedBSD/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

HardenedBSD/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

HardenedBSD/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

HardenedBSD/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

HardenedBSD/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

HardenedBSD/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

HardenedBSD/src e2e4022lib/libcompiler_rt Makefile.inc

libcompiler_rt Makefile.inc: don't build bfloat16 support for gcc < 13

Older versions of gcc produce "error: unknown type name '__bf16'".

PR:             276104
MFC after:      1 month

(cherry picked from commit 2e226748a961329471f5b51483318b94c8735f34)
DeltaFile
+4-3lib/libcompiler_rt/Makefile.inc
+4-31 files

HardenedBSD/src 5018444lib/libcompiler_rt Makefile.inc

libcompiler_rt Makefile.inc: remove debugging messages

PR:             276104
MFC after:      1 month

(cherry picked from commit d00b9344bb10a9a35b02df33475bec951dfccd78)
DeltaFile
+0-7lib/libcompiler_rt/Makefile.inc
+0-71 files

HardenedBSD/src 3f0f6c9lib/clang/libllvm Makefile

libllvm: add missed tlbgen headers and sources for BPF target

Noticed by:     vishwin
PR:             276104
MFC after:      1 month

(cherry picked from commit 442d351bd242d14b1c0bb67cd048ac022f2e82ad)
DeltaFile
+7-0lib/clang/libllvm/Makefile
+7-01 files

HardenedBSD/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

HardenedBSD/src a4f6bfelib/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

HardenedBSD/src 7c41358sys/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

HardenedBSD/src 18590accontrib/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

HardenedBSD/src 40d5cf3contrib/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

HardenedBSD/src 47020dflib/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

HardenedBSD/src fcfb38acontrib/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