Allow configured origins to read /api/versions for TrueNAS Connect
nginx answers CORS on /api/versions only when the system is registered
with TrueNAS Connect, and only for the TNC web app (plus `ng serve` on
dev and staging). A TNC client run against an unregistered system (an
ephemeral TNC stack, local development, CI) cannot read the versions, so
@truenas/api-client falls back to v25.10.0 on systems that serve newer
API versions.
* tn_connect gains `allowed_origins`, set with the private
tn_connect.update_environment. Each must be an origin exactly as a
browser sends it: https with a lowercase host name, or http to
localhost or 127.0.0.1, with an optional port and no path. Unlike the
endpoints it may change while TNC is enabled. update_environment now
reloads nginx after a write, since the endpoints and the origins both
reach its CORS maps.
* /api/versions answers CORS, with Vary: Origin, when the system is
registered or allowed_origins is not empty. Its map lists the allowed
origins and falls back to the existing $allow_origin. /_download keeps
[7 lines not shown]
[clang][test] Added regression test for #36907 (#240787)
Closes #36907
this adds regression test coverage to ensure that evaluating delayed
noexcept specifiers on member function pointers
[SROA] Fix an error where SROA can leave "dead" allocas (#238897)
SROA may fully replace allocas with their constituent parts, but in some
cases it can leave behind "dead" allocas that have only droppable uses. The
leftover allocas are can retain debug information conflicting with the debug
information for the partitions they were split into, which may lead to assertions
failures.
This patch removes such "dead" allocas.
Fixes https://github.com/llvm/llvm-project/issues/238154
Let zfs rewrite -W skip only blocks that a rewrite would keep
zfs rewrite -W skips blocks whose allocated size would not change, so
that a rewrite after a RAID-Z expansion can be run again without
rewriting the same blocks twice. It also skips blocks that a rewrite
would change in other ways: after the compression, checksum, copies,
dedup or special_small_blocks property of a dataset changes, the
blocks written before keep their size and are skipped. After an
expansion, it leaves in place the blocks that take the same space at
the new width, and they split the space freed around them.
Skip a block only when a rewrite would leave it as it is: compare the
block pointer with the properties that dmu_write_policy() gives a write
of the file now, the class of each DVA with the one that
spa_preferred_class() would choose (moved into spa_class_select(), with
no functional change), and, on a RAID-Z vdev, the logical width at the
block's physical birth with the width in the txg of the rewrite. A
block on a vdev that takes no allocations, or is being removed, is
rewritten.
[15 lines not shown]
[mlir][ODS] Include headers declaring used type and attribute constraints (#240449)
#236155 added `cppIncludes` to traits and interfaces so that generated
declarations include the headers of the traits they use.
Extend `cppIncludes` to type and attribute constraints. It lists the C++
headers declaring the C++ classes a constraint refers to. A single
header is not always enough: e.g. `TypeAttrOf<T>` needs
`BuiltinAttributes.h` and the header of `T`. Generated op
declarations now include the headers of the constraints of their
operands, results and attributes, and generated attribute and type
declarations include the headers of attribute and type parameters.
The builtin type and attribute constraints and the builtin dialect
attributes, types and locations set their headers, as do the base
classes of dialect attributes and types.
Co-authored-by: Claude <noreply at anthropic.com>
[OpenMP] Use device scope for atomic constructs on the device
OpenMP 6.0, 17.8.5 specifies that "The memscope clause determines the
binding thread set for an atomic region. If the memscope clause is not
present, the behavior is as if the memscope clause appeared on the
construct with the device scope-specifier."
Thread the sync scopes through codegen amd also add a release note
because this is changing existing behavior.
Existing behavior was overly cautios for OpenMP 5.2, too, though. The
atomic construct never specified the option of having system-level
scope. This only came with the memscope clause and it's "all"
scope-specifier.
Claude assisted with this patch.
[SandboxVec][DAG][Scheduler] Combine erase instr callbacks (NFC) (#240678)
Call the scheduler's erase instruction callback from within the DAG
callback. This is a step towrads simplifying the DAG maintenance logic.
[OpenMP][clang] Apply atomic options to atomic compare
Thread denormal mode, fine-grained memory and remote memory options
through for atomic compare directivs.
Claude assisted with this patch.
[SystemZ] Port LongBranch to NewPM
Standard NewPM pass porting. Also note that the CFG is preserved in the
LegacyPM.
Reviewers: JonPsson1, uweigand
Pull Request: https://github.com/llvm/llvm-project/pull/240598
delete: refuse a path which does not fit when scheduling a directory
The name was copied with strlcpy() into a MAXPATHLEN buffer and then
extended with a slash without checking the result, so a long path was
silently replaced by a truncated one. A path without any slash made the
trailing strrchr() dereference NULL.
register: report a path which does not fit instead of crashing
pkg_absolutepath() returns NULL when the path does not fit in the
MAXPATHLEN buffer it fills, and the three callers ignored it, so
xstrdup(NULL) crashed the manifest parser as soon as a manifest listed a
directory, a file or a configuration file whose path is that long.
delete: strip the leading slashes with RELATIVE_PATH()
The code assumed that a package path and the package prefix both start
with exactly one slash and skipped that character by hand, which pointed
past the terminating NUL for an empty prefix and kept a path absolute
when it started with two slashes.
delete: check that the root directory can be opened
pkg_open_root_fd() reports why it failed but its result was ignored, so
the removal went on with a rootfd of -1: the files were left behind while
the package was unregistered from the database.
[SystemZ] Port ElimCompare to NewPM
Standard NewPM pass porting. Also mark the CFG as preserved in the
LegacyPM.
Reviewers: JonPsson1, uweigand
Pull Request: https://github.com/llvm/llvm-project/pull/240596
[SystemZ] Port ShortenInst to NewPM
Standard NewPM pass porting. Also mark the CFG as preserved in the
LegacyPM.
Reviewers: uweigand, JonPsson1
Pull Request: https://github.com/llvm/llvm-project/pull/240590