zfsbootcfg: fix some error handling bugs in setting/deleting keys
A few bugs dating back to the original bootenv support:
- delete_pair() freed an uninitialized nvlist if it couldn't fetch the
bootenv, e.g., with a nonexistent pool.
- A missing else meant that "yes" and "no" were always rejected for
DATA_TYPE_BOOLEAN_VALUE; only "true", "false" and numbers worked.
- With -p, the result of printing the bootenv replaced the result of
setting or deleting a key, so a failed set or delete exited 0.
- errno was never cleared before strto*(), so a stale errno left behind
by libzfs could make a valid numeric value fail.
Values for the narrower integer types are still silently truncated
(e.g., 300 for DATA_TYPE_UINT8 sets 44). Rejecting them would also
reject values like -1 for the unsigned types that scripts may rely on,
so I'm punting for now.
Reported by: llm-postcr
[6 lines not shown]
[BOLT][RISCV] Use relaxable tail calls for entry patches (#245950)
The AUIPC/ADDI/JALR entry patch needs 12 bytes and clobbers t0, which
can hold the return address as the alternate link register. Emit
`PseudoTAIL` to fit the trampoline in eight bytes and preserve t0.
JITLink can relax the AUIPC/JALR pair to a direct jump for nearby
targets.
imx_ccm: extend the core for non-FDT i.MX50/51 CCM support
- Allow four register regions for the i.MX5 CCM and DPLL1-3.
- Add read-only divider and mux macros, including _INDEX variants.
- Add IMX_DIV_ONE_BASED, where zero means the clock is stopped.
- Add IMX_DIV_BUSY and its _INDEX variant to wait for the busy bit.
- Validate parent names against the clock table on non-FDT attach.
- Add a read-only i.MX5 DPLL clock type, kept out of GENERIC builds.
Use unsigned rate differences in divider and composite set_rate.
A true difference of 2^31 Hz or more could appear negative as an int
and select the wrong divisor. This is the only behavior change on
i.MX7D and i.MX8MQ.
Tested on QEMU mcimx7d-sabre: the clock list was unchanged, and a
3 GHz request with a 24 MHz parent changed from 3,428,571 Hz (/7)
to 24 MHz (/1). Built GENERIC, GENERIC64, KOBO, and NETWALKER
(i.MX8MQ build-tested only).
[ELF] MergeNoTailSection: Use partitioned hash aggregation. NFC (#245892)
MergeNoTailSection::finalizeContents adds pieces to 32
StringTableBuilder shards, and every thread scans all pieces to pick
those of its own shards.
Group the live pieces of each chunk of sections by shard in parallel,
then add each shard's pieces to its StringTableBuilder on one thread in
input order, and store the offsets in a final parallel pass.
Process the sections in waves of 4M pieces to bound the memory for the
grouped pieces.
clang-debug --threads=8: 3.20 -> 2.89 s. merge/finalize:
```
before after
clang-debug t8 981 ms 665 ms
clang-debug t1 3403 ms 2846 ms
clang-release t8 5.5 ms 5.5 ms
[3 lines not shown]
[flang][OpenMP] Keep pending METADIRECTIVE variants in their scope (#246123)
A loop-associated METADIRECTIVE replacement inside a BEGIN METADIRECTIVE
region can escape the region. In
```fortran
!$omp begin metadirective default(parallel)
continue
!$omp metadirective when(user={condition(flag)}: simd) default(do)
!$omp end metadirective
do i = 1, n
end do
```
neither SIMD nor DO has a loop in the region, but only the DO is
reported. The SIMD is checked against the loop after END METADIRECTIVE.
In this PR each block records where its entries start in the list of
pending replacements, so that it can diagnose the leftovers when it
[4 lines not shown]
[llvm-ir2vec][MIR2Vec] skip noreg operands in triplets (#246048)
`MIRVocabulary::getRegisterEmbedding()` gives zero embeddings for noreg
operands. This patch skips `noreg` during triplet generation.
[IR2Vec][NFC] Map TypeIDs to canonical types with a switch (#246069)
TypeIDMapping was indexed by Type::TypeID and relied on listing the
types in enum order; its static_assert only checked the size. A TypeID
inserted in the middle of the enum would silently shift the mapping. Use
an exhaustive switch instead so that new TypeIDs are flagged.
[InstCombine] Skip extelt-trunc bitcast fold for non-power-of-2 element sizes (#242998)
`foldVecExtTruncToExtElt()` turns trunc(extractelement) into
bitcast + extractelement. For vectors with a non-power-of-2 element
size this creates bitcasts like
```
bitcast <vscale x 4 x i56> to <vscale x 56 x i4>
```
which the backend cannot legalize, so RISC-V crashes in
WidenVecRes_BITCAST. For fixed vectors the bitcast is legalizable, but
the backend has to emulate it through memory, which costs more than
the scalar trunc.
Skip the fold for non-power-of-2 element sizes, for both fixed and
scalable vectors.
Fixes #242247
Assisted-by: TRAE CLI (GLM-5.4)
[FlowSensitive][Expected] Model `operator==` and `operator!=` in `UncheckedExpectedAccessModel` [PR 2/N] (#244872)
This is the second part of a split of #233219
(`bugprone-unchecked-expected-access`). It builds on the base
model from #242868 and adds modeling of the equality comparisons.
`operator==` and `operator!=` calls are now modeled when an expected is
compared with:
- **another expected**: if they are equal, both hold a value or both
hold an error. Nothing else follows,
because the values (or errors) themselves may still differ. Two
`expected<void, E>` objects that both hold
a value are always equal.
- **a value**: if `e == v`, then `e` holds a value.
- **an `unexpected`**: if `e == u`, then `e` holds an error.
Expected scope of the user-facing changes:
```cpp
[20 lines not shown]
misc/zeroclaw: mark 64-bit only (build fails on i386)
zeroclaw 0.8.5 fails on the 14.4 i386 package builders: rustc
aborts with SIGABRT while compiling zeroclaw-config. The
upstream release profile (lto = "fat", codegen-units = 1) needsi
more memory than a 32-bit rustc can address.
The software is only used and supported on 64-bit systems, so
mark the port NOT_FOR_ARCHS for the 32-bit targets.
PR: 301123
[libc][math] Fix near-overflow and NaN handling in expm1 and expm1f. (#246103)
- Clamp the `-2^(-hi)` exponent when `hi >= 1023` in `expm1` so `hi ==
1024` near overflow does not construct `-Inf` and raise a spurious
`FE_INVALID` in `exact_add`.
- Explicitly quiet `+/-sNaN` and raise `FE_INVALID` in `expm1` and
`expm1f`, and use `fputil::round_result_slightly_up(-1.0f)` for large
negative finite inputs in `expm1f` so `FE_INEXACT` is raised.
- Add smoke tests for `+/-sNaN`, `+/-qNaN`, and near-overflow `expm1`
inputs, and sync CMake and Bazel dependencies.
Assisted-by: Gemini
[libc][math] Fix NaN handling in log, log10, log2, log10f, log2f, and log1pf. (#246102)
- Quiet signaling `NaN` inputs and raise `FE_INVALID` before
floating-point zero comparisons in `log`, `log10`, `log2`, `log10f`, and
`log2f`.
- Handle `+/-Inf` and `+/-NaN` via `FPBits` before ordered `<` /
equality comparisons and `double` conversion in `log1pf_double_eval`
(avoiding spurious `FE_INVALID` on quiet `NaN`s and enabling `sNaN`
checks).
- Add smoke tests for `+/-sNaN` and `+/-qNaN` handling, and sync CMake
and Bazel dependencies.
Assisted-by: Gemini
[libc][math] Fix Ziv error bound in sincos_eval. (#246105)
- Increase the Ziv error bound floor in `sincos_eval` from `0x1.0p-105`
to `0x1.0p-102` (matching `tan_eval`) to bound the small-range reduction
rounding and truncation error (`<= 2^-104` for `|x| < 2^16`) near odd
multiples of `pi / 2`.
- Add regression tests in `cos_test.cpp` and sync CMake and Bazel
dependencies.
Assisted-by: Gemini
[AMDGPU] Fix gfx950/gfx942 TRANS co-execute slot
On gfx950/gfx942, fix TRANS co-exec slot to be same as VALU.
Excluded from this commit:
TRANS on gfx950 (in unit of hardware cycle):
Reciprocal throughput (per SIMD):
f32/f16: 8
f64: 16
Def-to-use latency:
f32/f16: 12 to a non-TRANS reader, 8 to a TRANS reader
f64: 20 to a non-TRANS reader, 16 to a TRANS reader
Blocks this wave's issue for:
f32/f16: 8
f64: 16
On gfx942, f32/f16 have the same numbers as f64 above.
Currently, GCNHazardRecognizer inserts the correct s_nop between a TRANS
[4 lines not shown]
[AMDGPU] Precommit packed F32 co-exec tests (NFC)
Add a gfx950 coexec scheduler case where a v_pk_add_f32 and a v_add_f32
compete for the window of an XDL2x (v_mfma_f32_16x16x32_bf16) MFMA, and
a unit test for the co-execution class of the packed F32 instructions
and v_pk_add_f16. Packed F32 VALU is treated as plain VALU so far.
Assisted-by: Claude Opus 5.5
[AMDGPU] Precommit TRANS co-exec tests (NFC)
Add a gfx950 coexec scheduler case where a v_exp_f32 and a v_add_f32
compete for the window of an XDL2x (v_mfma_f32_16x16x32_bf16) MFMA.
No MFMA row allows TRANS so far, so the v_exp_f32 issues after the
MFMA window.
Assisted-by: Claude Opus 5.5
[AMDGPU] Fix gfx950/gfx942 v_pk f32 instr co-exec slot
On gfx950/gfx942, v_pk f32 instrs can issue only after the MFMA's own
cycles (in hardware cycles):
XDL/SMFMAC: 8 cycles
XDL2x/SMFMAC2x: 12 cycles
SGEMM/DGEMM: 8 cycles
Currently they are categorized as VALU. This is wrong for
XDL/SMFMAC/XDL2x/SMFMAC2x, since VALU can issue within the MFMA's own
cycles.
Fix this by adding a PK_F32 CoExecMask bit, a PK_F32 slot in each MFMA
row, and a PackedF32VALU InstructionFlavor. Classify the following
instrs as PackedF32VALU on gfx942/gfx950:
V_PK_{ADD,FMA,MUL}_F32, V_PK_MOV_B32.
NFC for gfx1250.
[2 lines not shown]
[AMDGPU] Precommit legacy MFMA co-exec tests (NFC)
Add coexec scheduler cases for a gfx940 SMFMAC
(v_smfmac_f32_16x16x32_f16) on gfx950 and for a DGEMM
(v_mfma_f64_16x16x4_f64) on gfx942 and gfx950, a gfx942 RUN line in
coexec-sched-warning.mir, and unit test rows for one MFMA per legacy
variant on gfx950 plus v_mfma_f64_16x16x4_f64 on gfx942.
The legacy variants fall back to a permissive window that lets anything
co-execute. v_mfma_f64_16x16x4_f64 uses its gfx950 rule on gfx942 as
well, and gfx942 does not enable the co-exec model yet, so it warns and
its scheduler case runs without the model.
Assisted-by: Claude Opus 5.5
[AMDGPU] Fix gfx950 MFMA co-exec rows for XDL2x_8Pass, SMFMAC2x, DGEMM
Fix the co-exec rows for the following instructions:
XDL2x_8Pass:
v_mfma_f32_32x32x16_f16
v_mfma_f32_32x32x16_bf16
v_mfma_i32_32x32x32_i8
v_mfma_f32_32x32x64_f8f6f4 and v_mfma_scale_f32_32x32x64_f8f6f4
with no fp8/bf8 operand
SMFMAC2x_4Pass:
v_smfmac_f32_16x16x64_f16
v_smfmac_f32_16x16x64_bf16
v_smfmac_i32_16x16x128_i8
v_smfmac_f32_16x16x128_{bf8,fp8}_{bf8,fp8}
SMFMAC2x_8Pass:
v_smfmac_f32_32x32x32_f16
[8 lines not shown]
[AMDGPU] Add MFMA co-exec rows for gfx942 MFMAs
Add MFMA co-exec rows for gfx942 MFMAs for both gfx942 and gfx950.
Gfx950 support gfx942 mfma opcodes as well as others.
Add rows for:
XDL_2Pass:
v_mfma_f32_4x4x4_16b_{f16,bf16}
v_mfma_i32_4x4x4_16b_i8
XDL_4Pass:
v_mfma_f32_16x16x16_{f16,bf16}
v_mfma_i32_16x16x32_i8
v_mfma_f32_16x16x8_xf32 (gfx942 only)
v_mfma_f32_16x16x32_{bf8,fp8}_{bf8,fp8}
XDL_8Pass:
v_mfma_f32_16x16x4_4b_{f16,bf16}
[43 lines not shown]
[AMDGPU] Precommit gfx950 MFMA co-exec row tests (NFC)
Add a gfx950 coexec scheduler case for v_smfmac_f32_16x16x64_f16, and a
unit test that checks the first co-exec stage of SALU, DS and VMEM, VALU
and the next MFMA for one MFMA per gfx950 variant.
Assisted-by: Claude Opus 5.5
[AMDGPU] Describe MFMAs with a variant in MAIInstInfoTable (NFC)
- Add an MFMAVariant enum. Each MFMA pseudo gets its variant from
MAIInstInfoTable, a TableGen GenericTable. Each real MFMA opcode
inherits the variant of its pseudo through VOP3P_Real.
- Look up an MFMA's co-execution info by its variant, as gfx1250 does
for WMMA, instead of matching every opcode.
- Replace the is_dgemm and is_gfx940_xdl fields with the variant.
- Describe each MFMA row by the first stage at which SALU, memory, VALU
and the next MFMA may issue, plus the window length.
Assisted-by: Claude Opus 5.5
[AMDGPU] Exclude real V_ACCVGPR_READ/WRITE_B32_vi opcodes from isMFMA
Currently, only pseudo V_ACCVGPR_{READ,WRITE}_B32_e64 is excluded, fix
by also exclude real V_ACCVGPR_READ/WRITE_B32_vi.
libsaslc: Rework gssapi/krb5 instructions.
1. Simplify by using just a postfix-specific keytab -- no kinit
involved.
2. Nix kstash(8), not recommended.
3. Abbreviate kadmin(8) options with `--use-defaults'.
4. Do not recommend copying every keytab around everywhere; these
should be restricted to the hosts (and only to the users on those
hosts) that need them.
5. Fix missing smtp_sasl_password_maps in postfix config and omit
needless AUTHCID setting -- it comes from that. (Note what
properties postfix provides defaults for and which ones it passes
unconditionally too.)
6. Quietly suggest using smtp_tls_security_level=encrypt so that the
[12 lines not shown]