FreeNAS/freenas 326ea31src/middlewared/middlewared/plugins alert.py

NAS-140259 / 25.10.7 / Fix KeyError in alertservice.test error handler (by ixhamza) (by bugclerk) (#19532)

This is a partial backport of the original PR.

- Fix `KeyError` in `alertservice.test` error handler where
`data["type"]` should be `data["attributes"]["type"]`, which masked the
real exception on `send()` failures.

Original PR: https://github.com/truenas/middleware/pull/18449
Original PR: https://github.com/truenas/middleware/pull/18451

---------

Co-authored-by: Ameer Hamza <ahamza at ixsystems.com>
Co-authored-by: caleb <yocalebo at gmail.com>
DeltaFile
+1-1src/middlewared/middlewared/plugins/alert.py
+1-11 files

LLVM/project 4ccc07bllvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV select-const.ll

[RISCV] Use SLLI+ADD for a select of constants that differ by a power of 2 in more cases. (#217812)

Previously we restricted to cases that can use ADDI, but we need
to materialize a constant for the czero+add lowering. Using slli
avoids materializing the delta constant.

I'm restricting to cases where we can't fold the comparison into
the czero.
DeltaFile
+162-8llvm/test/CodeGen/RISCV/select-const.ll
+23-1llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+185-92 files

LLVM/project e7635cclibc/src/__support/math CMakeLists.txt roundf.h, libc/test/src/math RoundTest.h

[libc][math] Add some explicit macro checks to round and roundf. (#217822)

This will allow users to use them without going through our cmake build
checks or forcing the flag `__LIBC_USE_BUILTIN_ROUND`.
DeltaFile
+1-47libc/test/src/math/RoundTest.h
+28-1libc/src/__support/math/roundf.h
+28-1libc/src/__support/math/round.h
+7-0libc/src/__support/math/CMakeLists.txt
+64-494 files

LLVM/project ce56928llvm/utils/gn/secondary/clang/unittests BUILD.gn, llvm/utils/gn/secondary/clang/unittests/offload-arch BUILD.gn

[gn] port fa0bf9b9c72ea5822 / 6ac719c105b5d69 (OffloadArchTests) (#217953)
DeltaFile
+18-0llvm/utils/gn/secondary/clang/unittests/offload-arch/BUILD.gn
+1-0llvm/utils/gn/secondary/clang/unittests/BUILD.gn
+19-02 files

LLVM/project 3cb11f4llvm/include/llvm/Transforms/IPO SampleProfileMatcher.h, llvm/include/llvm/Transforms/Utils SimplifyLibCalls.h

[Transforms] Remove dead declarations (#217829)

reportOrPersistProfileStats: Added on March 28, 2024 in commit
1d99d7a6f841de594b38936a4a73866b23a8b105 without a corresponding
function definition.

optimizeStrNCpy: The corresponding function definition was removed on
September 27, 2022 in commit e80e134c77bb093370a3e4fee41ebe8710e3564d.
DeltaFile
+0-1llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
+0-1llvm/include/llvm/Transforms/IPO/SampleProfileMatcher.h
+0-22 files

LLVM/project b71bcabllvm/lib/Transforms/Utils LoopUtils.cpp, llvm/lib/Transforms/Vectorize LoopVectorize.cpp VPlanTransforms.cpp

Tests, fixes, and design rework
DeltaFile
+603-175llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+174-0llvm/test/Transforms/LoopVectorize/compress-idioms-negative-tests.ll
+87-49llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+58-74llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+98-0llvm/test/Transforms/LoopVectorize/compress-store-vec-epilogue.ll
+66-0llvm/lib/Transforms/Utils/LoopUtils.cpp
+1,086-29812 files not shown
+1,212-38518 files

LLVM/project fe5f07cllvm/lib/Transforms/Vectorize VPRecipeBuilder.h

Add comment
DeltaFile
+3-0llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+3-01 files

LLVM/project 4628dc9llvm/lib/Transforms/Vectorize LoopVectorizationLegality.cpp, llvm/test/Transforms/LoopVectorize compress-idioms-negative-tests.ll

Add out-of-loop use check
DeltaFile
+32-0llvm/test/Transforms/LoopVectorize/compress-idioms-negative-tests.ll
+10-2llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+42-22 files

LLVM/project e98495cllvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.h, llvm/test/Transforms/LoopVectorize compress-idioms.ll

[LoopVectorize] Support vectorization of compressing patterns in VPlan

RFC link: https://discourse.llvm.org/t/rfc-loop-vectorization-of-compress-store-expand-load-patterns/86442

This adds loop vectorizer support for "compressing" patterns,
for example:

```
int dst_idx = 0;
for (int i = 0; i < n; i++) {
  if (cond[i])
    dst[dst_idx++] = src[i];
}
```

Can be vectorized with a `llvm.masked.compressstore` as:

```
int dst_idx = 0;

    [52 lines not shown]
DeltaFile
+424-0llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+157-0llvm/test/Transforms/LoopVectorize/VPlan/compress-idioms.ll
+132-0llvm/test/Transforms/LoopVectorize/AArch64/compress-idioms.ll
+112-15llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+60-4llvm/lib/Transforms/Vectorize/VPlan.h
+49-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+934-1915 files not shown
+1,117-2721 files

LLVM/project 10c9b61llvm/include/llvm/Analysis IVDescriptors.h, llvm/lib/Analysis IVDescriptors.cpp

Fixups
DeltaFile
+59-8llvm/unittests/Analysis/IVDescriptorsTest.cpp
+9-10llvm/lib/Analysis/IVDescriptors.cpp
+1-1llvm/include/llvm/Analysis/IVDescriptors.h
+69-193 files

LLVM/project ae84e7dllvm/include/llvm/Analysis IVDescriptors.h, llvm/lib/Analysis IVDescriptors.cpp

Rework and simplify
DeltaFile
+47-82llvm/lib/Analysis/IVDescriptors.cpp
+30-20llvm/include/llvm/Analysis/IVDescriptors.h
+3-28llvm/unittests/Analysis/IVDescriptorsTest.cpp
+80-1303 files

LLVM/project bb7ca94llvm/include/llvm/Analysis IVDescriptors.h, llvm/lib/Analysis IVDescriptors.cpp

[IVDescriptors] Implement MonotonicDescriptor

RFC link: https://discourse.llvm.org/t/rfc-loop-vectorization-of-compress-store-expand-load-patterns/86442

"Monotonic" variable is similar to induction variable, but its value is updated under some condition, e.g.:
```
int idx = 0;
for(int i = 0; i < n; ++i) {
  // some uses of idx
  if (cond)
    ++idx;
}
```
In this example, `i` is induction variable and `idx` is monotonic variable: it's updated only when cond == true. In LLVM IR, this looks like:
```
loop_header:
  %monotonic_phi = [%start, %prehader], [ %chain_phi0, %latch]

step_bb:

    [26 lines not shown]
DeltaFile
+153-0llvm/unittests/Analysis/IVDescriptorsTest.cpp
+121-0llvm/lib/Analysis/IVDescriptors.cpp
+39-0llvm/include/llvm/Analysis/IVDescriptors.h
+313-03 files

LLVM/project 5f9d22bllvm/utils/gn/secondary/clang-tools-extra/clang-tidy/portability BUILD.gn

[gn build] Port 9f57227b016b (#217952)
DeltaFile
+1-0llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/portability/BUILD.gn
+1-01 files

LLVM/project bc3881cllvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port 2f459272a2bf (#217951)
DeltaFile
+1-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+1-01 files

FreeNAS/freenas cf67636src/middlewared/middlewared/plugins/cloud_sync __init__.py rclone.py, src/middlewared/middlewared/pytest/unit/plugins test_cloud_sync.py

NAS-142234 / 27.0.0-BETA.1 / Use `configparser` to generate rclone configs (#19514)

This prevents us from generating invalid ini files by escaping invalid
characters.
DeltaFile
+63-1src/middlewared/middlewared/pytest/unit/plugins/test_cloud_sync.py
+37-13src/middlewared/middlewared/plugins/cloud_sync/rclone.py
+2-1src/middlewared/middlewared/plugins/cloud_sync/__init__.py
+102-153 files

LLVM/project f4117abllvm/lib/Transforms/Vectorize LoopVectorizationLegality.cpp, llvm/test/Transforms/LoopVectorize compress-idioms-negative-tests.ll

Add out-of-loop use check
DeltaFile
+32-0llvm/test/Transforms/LoopVectorize/compress-idioms-negative-tests.ll
+10-2llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+42-22 files

LLVM/project 483f923llvm/lib/Target/RISCV RISCVAsmPrinter.cpp

[RISCV] Use the value type rather than the pointer type of a global when determining if an allocation granule makes sense. (#217924)

Further attempt to fix RISCV stage2 failure introduced by
f6ea145aa8e89631ae04f72df32580b20256d40c.
DeltaFile
+1-1llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+1-11 files

FreeNAS/freenas ab03a78src/middlewared/middlewared/alert/service snmp_trap.py

Revert "Fix SNMP trap alerts failing to load TRUENAS-MIB"

This reverts commit bcb3551112720e47c6f26c4ba46563ef248aa021.
DeltaFile
+3-6src/middlewared/middlewared/alert/service/snmp_trap.py
+3-61 files

FreeBSD/ports 9936f14www/ungoogled-chromium Makefile distinfo, www/ungoogled-chromium/files patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc

www/ungoogled-chromium: update to 151.0.7922.169

Security:       https://vuxml.freebsd.org/freebsd/d14c86b6-9ca3-11f1-bf98-a8a1599412c6.html
DeltaFile
+7-7www/ungoogled-chromium/distinfo
+2-2www/ungoogled-chromium/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc
+2-2www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc
+1-2www/ungoogled-chromium/Makefile
+12-134 files

FreeNAS/freenas bcb3551src/middlewared/middlewared/alert/service snmp_trap.py

Fix SNMP trap alerts failing to load TRUENAS-MIB

Commit 6a01cb9b removed the pre-compiled TRUENAS-MIB.py from
/usr/local/share/pysnmp/mibs/, but the SNMP trap alert service still
expected to load the MIB as a pre-compiled .py file from that path.
Replace with pySMI's addMibCompiler to compile the ASN.1 .txt MIB source
on-the-fly instead.

(cherry picked from commit fe66b2efd3de268454d5d0e7c637ef276245e3c9)
(cherry picked from commit 71fc5806d9f3486984a80d5e73bff576f25a78aa)
DeltaFile
+6-3src/middlewared/middlewared/alert/service/snmp_trap.py
+6-31 files

FreeNAS/freenas 78ef78asrc/middlewared/middlewared/plugins alert.py

Fix KeyError in alert service test error handler

The error handler in alertservice.test referenced data["type"] but type
is nested under data["attributes"]["type"]. This caused a KeyError that
replaced the original exception, preventing the real send() failure from
being logged.

(cherry picked from commit 84408bd1857c722086dfb81c52faad0c558f6e93)
(cherry picked from commit 288fa6f4d08ed7ada424e4e48e511e3ff10c46ab)
DeltaFile
+1-1src/middlewared/middlewared/plugins/alert.py
+1-11 files

LLVM/project 0e011c4lldb/docs/resources lldbgdbremote.md, lldb/source/Plugins/Process/wasm RegisterContextWasm.cpp ProcessWasm.h

[lldb] Scope Wasm global reads to a module instance (#213176)

A Wasm global belongs to a module instance, not to a frame. The global
index space is per instance, and `DW_OP_WASM_location`'s global operand
indexes the index space of the instance whose code is being evaluated,
so two instances of one module have separate globals. `qWasmGlobal`
takes a frame index instead, which leaves a global of an instance with
no active frame out of reach.

Name the instance instead: `qWasmGlobal:<index>;instance:<id>;`. The id
is the module id LLDB already carries in bits 61:32 of a Wasm address,
so nothing has to be enumerated first. A stub opts in by advertising
`qWasmInstance+` in its `qSupported` response, which covers every Wasm
packet whose scope is an instance rather than a frame, so a query for
other instance-scoped state does not need a packet of its own. A stub
that does not advertise it keeps getting the frame form.

Linear memory needs no suffix: a Wasm address already carries the id of
the instance it points into, which the documentation now spells out

    [9 lines not shown]
DeltaFile
+608-81lldb/test/API/functionalities/gdb_remote_client/TestWasm.py
+238-0lldb/test/API/functionalities/gdb_remote_client/simple_global_frame_base.yaml
+92-45lldb/source/Plugins/Process/wasm/ProcessWasm.cpp
+57-4lldb/docs/resources/lldbgdbremote.md
+34-6lldb/source/Plugins/Process/wasm/ProcessWasm.h
+22-3lldb/source/Plugins/Process/wasm/RegisterContextWasm.cpp
+1,051-1395 files not shown
+1,092-14211 files

FreeBSD/ports b6e51acsecurity/certmonger Makefile

security/certmonger: Fix hardcoded paths

The location of the IPA configuration is hardcoded in three source
files, so on FreeBSD certmonger never finds it and every certificate
request fails with "Unable to determine location of IPA LDAP server".
Renewal is affected too, dogtag-ipa-renew-agent-submit carries the same
paths.

PR:                     297709
Approved by:            crees (maintainer)
Sponsored by:           Netzkommune GmbH

(cherry picked from commit 2a0a6d9d4d7e21058908377aff9d6ec101ff3993)
DeltaFile
+7-1security/certmonger/Makefile
+7-11 files

LLVM/project 8beec63llvm/lib/DWARFLinker/Parallel DWARFLinkerImpl.h DWARFLinkerImpl.cpp

[DWARFLinker] Simplify clang module unit bookkeeping (NFC) (#217758)

RefModuleUnit paired a DWARFFile reference with a CompileUnit, but the
reference was never read and duplicates CompileUnit::getContaingFile(),
so ModulesCompileUnits becomes a plain UnitListTy. Its
addModulesCompileUnit() accessor has no callers, and
DWARFLinkerImpl::ClangModulesMutex is declared but never locked, which
is correct because addObjectFile() is the only writer of ClangModules
and runs serially. Document that instead.

Assert that no module unit is inter-connected. The inter-connected loops
in LinkContext::link iterate CompileUnits alone, so a module unit which
got marked would strand at Stage::Loaded and never be cloned, with the
gate at the top of linkSingleCompileUnit hiding it.

Assisted-by: Claude
DeltaFile
+26-32llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.cpp
+3-18llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.h
+29-502 files

LLVM/project a42bf7allvm/include/llvm/MC MCSectionGOFF.h, llvm/lib/MC MCAsmInfoGOFF.cpp

[SystemZ][z/OS] Refactor switching section for HLASM (#216824)

Emitting the HLASM instructions for switching section is distributed
between MCAsmInfoGOFF and SystemZHLASMAsmStreamer, with some code
duplication. This change consolidates the implementation in
SystemZHLASMAsmStreamer.
DeltaFile
+163-49llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+4-157llvm/lib/MC/MCAsmInfoGOFF.cpp
+3-1llvm/include/llvm/MC/MCSectionGOFF.h
+170-2073 files

FreeBSD/src fdf3e57sys/dev/sdhci sdhci_fdt_spacemit.c

sdhci: Remove redundant device_get_softc

Fixes: 550db3d6f502 ("sdhci: Initial support for the SpacemiT K1 sdhci controller")
Reviewed by:    bnovkov
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59083
DeltaFile
+1-1sys/dev/sdhci/sdhci_fdt_spacemit.c
+1-11 files

LLVM/project 410f557lldb/test/API/commands/frame/var-dil/expr/Casts TestFrameVarDILCast.py

[lldb][NFC] Fix Minor Typo In DIL Test Description (#217493)

Correct typo in spelling of evaluator.

Signed-off-by: Will Hawkins <hawkinsw at obs.cr>
DeltaFile
+1-1lldb/test/API/commands/frame/var-dil/expr/Casts/TestFrameVarDILCast.py
+1-11 files

LLVM/project aac34c9llvm/lib/Transforms/Utils LoopUtils.cpp, llvm/lib/Transforms/Vectorize LoopVectorize.cpp VPlanTransforms.cpp

Tests, fixes, and design rework
DeltaFile
+603-175llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+174-0llvm/test/Transforms/LoopVectorize/compress-idioms-negative-tests.ll
+87-49llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+58-74llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+98-0llvm/test/Transforms/LoopVectorize/compress-store-vec-epilogue.ll
+66-0llvm/lib/Transforms/Utils/LoopUtils.cpp
+1,086-29812 files not shown
+1,212-38518 files

LLVM/project 497d716llvm/lib/Transforms/Vectorize VPRecipeBuilder.h

Add comment
DeltaFile
+3-0llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+3-01 files

LLVM/project e59f641llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.h, llvm/test/Transforms/LoopVectorize compress-idioms.ll

[LoopVectorize] Support vectorization of compressing patterns in VPlan

RFC link: https://discourse.llvm.org/t/rfc-loop-vectorization-of-compress-store-expand-load-patterns/86442

This adds loop vectorizer support for "compressing" patterns,
for example:

```
int dst_idx = 0;
for (int i = 0; i < n; i++) {
  if (cond[i])
    dst[dst_idx++] = src[i];
}
```

Can be vectorized with a `llvm.masked.compressstore` as:

```
int dst_idx = 0;

    [52 lines not shown]
DeltaFile
+424-0llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+157-0llvm/test/Transforms/LoopVectorize/VPlan/compress-idioms.ll
+132-0llvm/test/Transforms/LoopVectorize/AArch64/compress-idioms.ll
+112-15llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+60-4llvm/lib/Transforms/Vectorize/VPlan.h
+49-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+934-1915 files not shown
+1,117-2721 files