LLVM/project 3b9f791compiler-rt/lib/lsan lsan_common.cpp

[LSAN] Add extra suppressions on Apple Aarch64 (#117478)

- _fetchInitializingClassList for startup code in dyld.
- dyld4::RuntimeState::_instantiateTLVs for thread locals.

Fixes https://github.com/llvm/llvm-project/issues/115992, now it shows
the following instead (in a project using thread locals):
```
-----------------------------------------------------
Suppressions used:
  count      bytes template
      3        120 *_fetchInitializingClassList*
      1        104 *dyld4::RuntimeState::_instantiateTLVs*
-----------------------------------------------------
```
DeltaFile
+7-0compiler-rt/lib/lsan/lsan_common.cpp
+7-01 files

LLVM/project 42629d7llvm/lib/Target/AArch64 AArch64InstrInfo.td, llvm/test/CodeGen/AArch64 logical-op-with-not.ll atomicrmw-O0.ll

[AArch64][CodeGen] match (or x (not y)) to generate mov+orn (#190769)

Fixes: https://github.com/llvm/llvm-project/issues/100045

Adds AddedComplexity to increase the priority the pattern that matches
(or x (not y)) and generates a mov+orn instead of the original mvn+orr.

The number of instructions still stay the same but mov+orn can be
considered better than mvn+orr for two reasons:
1. Symmetry: For the same input with an 'and' instead of 'or', mov+bic
is generated.
2. Optimzation through register rename: If mov is immediate (for
example, 'mov x1, #0x4'), it can be retired early by the register
renamer and never issued for execution.
DeltaFile
+32-8llvm/test/CodeGen/AArch64/logical-op-with-not.ll
+12-12llvm/test/CodeGen/AArch64/atomicrmw-O0.ll
+4-0llvm/lib/Target/AArch64/AArch64InstrInfo.td
+2-2llvm/test/CodeGen/AArch64/arm64-atomic.ll
+50-224 files

LLVM/project dabd8cccompiler-rt/lib/sanitizer_common sanitizer_platform_limits_posix.cpp

[compiler-rt] fix __sanitizer::struct_sock_fprog_sz availability (#183411)

`struct sock_fprog` is not provided by glibc, but rather by the linux
headers (`#include <linux/filter.h`). It seems that glibc due to an
implementation detail internally includes `<linux/filter.h>` somewhere
other C libs (e.g. musl) do not, which previously caused build failures
and let to disabling `struct sock_fprog` on non-glibc Linux systems.

This adds the missing include and provides it again for all Linux
systems regardless of C lib.
DeltaFile
+2-1compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+2-11 files

LLVM/project fc48faccompiler-rt/lib/sanitizer_common sanitizer_linux_libcdep.cpp

[TSan] Fix determining static TLS blocks (#183106)

Running gcc test c-c++-common/tsan/tls_race.c on s390 we get:

ThreadSanitizer: CHECK failed: tsan_platform_linux.cpp:618 "((thr_beg))
>= ((tls_addr))" (0x3ffaa35e140, 0x3ffaa35e250) (tid=2419930)
#0 __tsan::CheckUnwind() /devel/src/libsanitizer/tsan/tsan_rtl.cpp:696
(libtsan.so.2+0x91b57)
#1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/devel/src/libsanitizer/sanitizer_common/sanitizer_termination.cpp:86
(libtsan.so.2+0xd211b)
#2 __tsan::ImitateTlsWrite(__tsan::ThreadState*, unsigned long, unsigned
long) /devel/src/libsanitizer/tsan/tsan_platform_linux.cpp:618
(libtsan.so.2+0x8faa3)
#3 __tsan::ThreadStart(__tsan::ThreadState*, unsigned int, unsigned long
long, __sanitizer::ThreadType)
/devel/src/libsanitizer/tsan/tsan_rtl_thread.cpp:225
(libtsan.so.2+0xaadb5)

    [30 lines not shown]
DeltaFile
+2-2compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
+2-21 files

LLVM/project e65dd1fllvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV musttail.ll

[RISCV][NFC] Improve Musttail Comments/Tests (#191093)

In the Target code, this is mostly fixing typos or other comment issues.

In the musttail.ll test, this ensures the tests are more aligned with
their comments, and that the comments are accurate. I inserted some
inline asm clobbers so it's also easier to see what's going on.
DeltaFile
+61-37llvm/test/CodeGen/RISCV/musttail.ll
+4-2llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+65-392 files

LLVM/project d0a5449clang/include/clang/ScalableStaticAnalysisFramework/Core/Serialization SerializationFormat.h, clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat WPASuite.cpp

[clang][ssaf] Add `JSONFormat` support for `WPASuite` (#191082)

This patch adds `JSONFormat` serialization support for `WPASuite`.

- Adds `readWPASuite` / `writeWPASuite` to the `SerializationFormat`
abstract interface and implements them in `JSONFormat`.
- Introduces `AnalysisResultRegistryGenerator`, a per-format plugin
registry template in `SerializationFormat`, allowing analysis authors to
register (de)serializers for their `AnalysisResult` subtypes with a
single static declaration.
- Extends `PrivateFieldNames.def` with `WPASuite::Data` and
`WPASuite::IdTable`, and adds a `makeWPASuite()` factory to
`SerializationFormat`, so deserialization code can construct a
`WPASuite` incrementally through the same access-controlled pattern used
for all other SSAF data structures.
DeltaFile
+212-0clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat/WPASuite.cpp
+197-0clang/lib/ScalableStaticAnalysisFramework/Plugins/ExamplePlugin/PairsAnalysis.cpp
+160-0clang/lib/ScalableStaticAnalysisFramework/Plugins/ExamplePlugin/TagsAnalysis.cpp
+136-0clang/lib/ScalableStaticAnalysisFramework/Plugins/ExamplePlugin/TagsPairsAnalysis.cpp
+134-0clang/include/clang/ScalableStaticAnalysisFramework/Core/Serialization/SerializationFormat.h
+132-0clang/test/Analysis/Scalable/ssaf-format/WPASuite/with-plugin.test
+971-041 files not shown
+1,683-447 files

LLVM/project 8ce74e7llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/ARM funnel-shift.ll

[TargetLowering] Add support for more constants to expandDIVREMByConstant. (#189286)

If we can find a chunk size k where 2^k mod divisor == -1, we can add
the even chunks and subtract the odd chunks. The resulting sum may be
negative, so we need to add 2^k + 1 (a multiple of divisor) for each odd
chunk to ensure the result is positive. We have enough extra bits
between the chunk size and HBitWidth to avoid overflow.

The idea here is similar to checking if a decimal number is divisible by
11. You can add the even digits and subtract the odd digits. If the
resulting sum is divisible by 11 the original number is divisible by 11.
DeltaFile
+191-186llvm/test/CodeGen/Mips/funnel-shift.ll
+130-178llvm/test/CodeGen/PowerPC/funnel-shift.ll
+156-116llvm/test/CodeGen/ARM/funnel-shift.ll
+64-37llvm/test/CodeGen/X86/funnel-shift.ll
+47-17llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+32-5llvm/test/CodeGen/X86/i128-udiv.ll
+620-5396 files

FreeBSD/src 84ce651sys/sys extattr.h

<sys/extattr.h>: use designated initializers for EXTATTR_NAMESPACE_NAMES

This is not a functional change, but it makes it more clear upon
inspection of the definition that the mapping property described is
preserved.  Maybe more importantly, if one ends up getting an index
wrong or punching a hole in the name array unexpectedly, then it'll
hopefully manifest more clearly as a (null) or nullptr deref rather than
potentially just emitting the wrong namespace name.

It's noted that this almost certainly invalidates its use in C++, but
there aren't really any known C++ consumers of it- let's just cross
that bridge if we get there.

Reviewed by:    kib, mckusick, rmacklem
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D55323
DeltaFile
+3-3sys/sys/extattr.h
+3-31 files

FreeBSD/src 22fba3ausr.bin/find function.c find.1, usr.bin/find/tests find_test.sh

find: add -xattr and -xttrname

We use -xattr in our openrsync tests for convenience, and it seems like
a good addition to FreeBSD.  -xattr and -xattrname will both consult all
available namespaces by default, but -xattrname allows filtering by
namespace using a "user:" or "system:" prefix.

Inspired by:    https://github.com/apple-oss-distributions/shell_cmds
Reviewed by:    kib, rmacklem
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D55286
DeltaFile
+94-0usr.bin/find/function.c
+80-0usr.bin/find/tests/find_test.sh
+21-2usr.bin/find/find.1
+2-0usr.bin/find/extern.h
+2-0usr.bin/find/option.c
+199-25 files

FreeBSD/src 9a8d333lib/libc/gen memfd_create.c, lib/libsys shm_open.2

libc: fix memfd_create's HUGETLB handling

The 'simplification' commit referenced below actually broke one aspect
of MFD_HUGETLB: the caller isn't supposed to be required to specify a
size.  MFD_HUGETLB by itself without a shift mask just requests a large
page, so we revert that part of memfd_create() back.

While we're here, fix up the related parts of the manpages a little bit,
since MFD_HUGETLB is actually supported.  The manpage claims that we
would return ENOSYS if forced mappings weren't supported, but this was
actually not true.  However, that seems like a very important
distinction to make between ENOSYS and EOPNOTSUPP, so fix the
implementation to match the docs.

Fixes:  8b8cf4ece660f ("memfd_create: simplify HUGETLB support [...]")
Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D56114
DeltaFile
+45-0tests/sys/posixshm/posixshm.h
+13-25tests/sys/posixshm/posixshm_test.c
+35-0tests/sys/posixshm/memfd_test.c
+27-4lib/libsys/shm_open.2
+16-7lib/libc/gen/memfd_create.c
+136-365 files

FreeBSD/src 0c9cec8tests/sys/kqueue kqueue_fork.c

tests: kqueue: add a basic test for CPONFORK

Just copy over a timer and a write-filter, be sure that we can observe
both in the child.  Maybe the timer should check for a minimum time
passed, but I don't know that we'd be likely to get that wrong.

This also adds a negative test with a kqueue that is *not* set for
CPONFORK being added to the first one, made readable, and confirming
that we don't see a knote for it in the child.

Some other improvements to the test noted in the review are planned in
the short term, but they're not particularly worth blocking adding this
as a basic sanity check.

Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D56223
DeltaFile
+140-0tests/sys/kqueue/kqueue_fork.c
+140-01 files

FreeBSD/src c6dd40fsys/kern kern_event.c

kqueue: slightly clarify the flow in knlist_cleardel()

This is purely a cosmetic change to make it a little easier on the eyes,
rather than jumping back to the else branch up top.  Re-flow it to use
another loop on the outside and just inline the re-lock before we repeat
after awaking from fluxwait.

The !killkn path should maybe issue a wakeup if there's a thread in
KQ_SLEEP so that userland can observe the EOF, but this isn't a
practical problem today: pretty much every case of knlist_clear is tied
to a file descriptor and called in the close(2) path.  As a consequence,
potentially affected knotes are almost always destroyed before we even
get to knlist_clear().

Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D56226
DeltaFile
+29-21sys/kern/kern_event.c
+29-211 files

FreeBSD/src 0bf4d22sys/kern kern_event.c

kqueue: don't leak file refs on failure to knote_attach()

We'll subsequently just knote_free() since the knote is barely
constructed, but that bypasses any logic that might release references
on owned files/fops.  Defer clearing those until the knote actually owns
them and update the comment to draw the line more clearly.

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D56318
DeltaFile
+10-6sys/kern/kern_event.c
+10-61 files

LLVM/project 0c36771llvm/lib/Target/RISCV RISCVInstrInfoZicbo.td

[RISCV] Remove NoVendorXMIPSCBOP from the Zicbop instructions. (#191015)

The XMIPSCBOP encodings use OP-CUSTOM-0 so there's no encoding overlap
here. Presence of a vendor extension should not disable parsing or
disassembly of a standard extension that doesn't overlap.
DeltaFile
+2-2llvm/lib/Target/RISCV/RISCVInstrInfoZicbo.td
+2-21 files

HardenedBSD/ports 26332d7devel/git-delta distinfo Makefile.crates, misc/github-copilot-language-server/files package-lock.json

Merge remote-tracking branch 'internal/freebsd/main' into hardenedbsd/main
DeltaFile
+253-129devel/git-delta/distinfo
+126-64devel/git-delta/Makefile.crates
+173-0net/ucx/files/patch-src_uct_tcp_tcp__iface.c
+87-0net/ucx/files/patch-src_uct_sm_mm_base_mm__iface.c
+61-0net/ucx/files/patch-src_ucs_async_thread.c
+28-28misc/github-copilot-language-server/files/package-lock.json
+728-22149 files not shown
+999-36055 files

HardenedBSD/ports add51aedevel/ocaml-opam/files patch-Makefile

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+0-5devel/ocaml-opam/files/patch-Makefile
+0-51 files

LLVM/project 53e0c2butils/bazel/llvm-project-overlay/mlir BUILD.bazel

[bazel] Rename PYBIND11 variables (#191095)

These are still used with nanobind so this name was misleading
DeltaFile
+23-24utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+23-241 files

LLVM/project f736537clang/test/SemaHIP incorrect-atomic-scope.hip, clang/test/SemaOpenCL incorrect-atomic-scope.cl

[Clang][NFC] tests showcasing incorrect use of HIP and OpenCL memory scope macros (#188890)

The tests demonstrate how incorrect LLVM IR is generated without
diagnostics, when an OpenCL or HIP scope number is passed to an AMDGPU
intrinsic. #185408 lays the groundwork for properly diagnosing this
situation by internally using a separate enum type to represent each set
of scope numbers.
DeltaFile
+35-0clang/test/SemaOpenCL/incorrect-atomic-scope.cl
+31-0clang/test/SemaHIP/incorrect-atomic-scope.hip
+66-02 files

FreeBSD/src 9f7080bsecure/lib/libcrypto/man/man3 X509V3_EXT_print.3 Makefile

crypto/openssl: add new manpage from release 3.5.6

MFC after:      1 day (the security issues warrant a quick backport).
MFC with:       10a428653ee7216475f1ddce3fb4cbf1200319f8
DeltaFile
+108-0secure/lib/libcrypto/man/man3/X509V3_EXT_print.3
+2-0secure/lib/libcrypto/man/man3/Makefile
+110-02 files

LLVM/project c981328llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/RISCV basic-strided-stores.ll

[SLP] Create SLP trees starting from constant stride stores (#185964)

Must use `-slp-enable-strided-stores` to enable.
DeltaFile
+193-60llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+27-223llvm/test/Transforms/SLPVectorizer/RISCV/basic-strided-stores.ll
+220-2832 files

FreeBSD/src 5254e16secure/lib/libcrypto/man/man3 SSL_CTX_set1_curves.3 SSL_CONF_cmd.3, secure/lib/libcrypto/man/man7 property.7

crypto/openssl: update artifacts to match 3.5.6 release artifacts

A new manpage and any associated links will be added in the next commit.

MFC after:      1 day (the security issues warrant a quick backport).
MFC with:       10a428653ee7216475f1ddce3fb4cbf1200319f8
DeltaFile
+442-346secure/usr.bin/openssl/man/openssl-ciphers.1
+85-36secure/lib/libcrypto/man/man3/SSL_CTX_set1_curves.3
+56-48sys/crypto/openssl/aarch64/vpsm4_ex-armv8.S
+27-2secure/lib/libcrypto/man/man7/property.7
+9-11secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3
+12-3secure/lib/libcrypto/man/man3/PKCS5_PBE_keyivgen.3
+631-446903 files not shown
+1,654-1,424909 files

FreeBSD/src 10a4286crypto/openssl CHANGES.md NEWS.md, crypto/openssl/doc/man1 openssl-ciphers.pod.in

MFV: crypto/openssl: update to 3.5.6

This change brings in version 3.5.6 of OpenSSL, which features
several security fixes (the highest of which is a MEDIUM severity
issue), as well as some miscellaneous feature updates.

Please see the release notes [1] for more details.

PS Apologies for the confusing merge commits -- I was testing out a
new automated update process and failed to catch the commit message
issues until after I pushed the change.

1. https://github.com/openssl/openssl/blob/openssl-3.5.6/NEWS.md

MFC after:      1 day (the security issues warrant a quick backport).
Merge commit 'ab5fc4ac933ff67bc800e774dffce15e2a541e90'
DeltaFile
+438-329crypto/openssl/doc/man1/openssl-ciphers.pod.in
+363-212crypto/openssl/CHANGES.md
+232-195crypto/openssl/NEWS.md
+152-213crypto/openssl/util/platform_symbols/windows-symbols.txt
+84-35crypto/openssl/doc/man3/SSL_CTX_set1_curves.pod
+109-1crypto/openssl/test/evp_extra_test.c
+1,378-985250 files not shown
+3,695-2,017256 files

LLVM/project fdfa627.github/workflows release-llvm-testing-tools.yml

update

Created using spr 1.3.7
DeltaFile
+1-0.github/workflows/release-llvm-testing-tools.yml
+1-01 files

LLVM/project 3b3ac5autils/bazel/llvm-project-overlay/mlir BUILD.bazel

[bazel] Remove unnecessary textual_hdrs usage (#191072)

textual_hdrs is supposed to be used for header files that aren't
standalone, which isn't the case for these mlir headers. Being in
textual_hdrs excludes them from header parsing, which means
layering_check results aren't entirely valid. I'm going to try and
enable header parsing on these targets in a follow up change.
DeltaFile
+10-13utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+10-131 files

OpenBSD/src OW2wJeqsys/kern kern_sched.c

   don't clear non-smt block bits in sysctl_hwsmt()
   make hw.smt 1->0 work again
   ok deraadt@
VersionDeltaFile
1.116+5-2sys/kern/kern_sched.c
+5-21 files

OpenBSD/src S7cpqRvshare/man/man1 dpb.1

   Remove references to tag:kde3 and tag:kde4 as something that one
   might find in the current ports tree. kde3/kde4 and their tags are
   long gone.

   Leave them in place for the historical section describing what
   tags are used for in dpb/DPB_PROPERTIES

   ok phessler
VersionDeltaFile
1.37+3-15share/man/man1/dpb.1
+3-151 files

FreeNAS/freenas 0e98acbsrc/middlewared/middlewared/plugins account.py

NAS-139995 / 26.0.0-BETA.2 / fix updating users with invalid builtins (by yocalebo) (#18700)
DeltaFile
+5-4src/middlewared/middlewared/plugins/account.py
+5-41 files

FreeNAS/freenas d30b2a7src/middlewared/middlewared/plugins/service_/services dbus_router.py, tests/api2 test_530_ups.py

NAS-140616 / 26.0.0-BETA.2 / fix ups api test failures (by yocalebo) (#18699)
DeltaFile
+8-15tests/api2/test_530_ups.py
+21-0src/middlewared/middlewared/plugins/service_/services/dbus_router.py
+29-152 files

FreeNAS/freenas 91ed280src/middlewared/middlewared/plugins account.py

NAS-139995 / 27.0.0-BETA.1 / fix updating users with invalid builtins (#18696)
DeltaFile
+5-4src/middlewared/middlewared/plugins/account.py
+5-41 files

FreeNAS/freenas 0b4736bsrc/middlewared/middlewared/plugins/service_/services dbus_router.py, tests/api2 test_530_ups.py

NAS-140616 / 27.0.0-BETA.1 / fix ups api test failures (#18698)
DeltaFile
+8-15tests/api2/test_530_ups.py
+21-0src/middlewared/middlewared/plugins/service_/services/dbus_router.py
+29-152 files