[GitHub] Label floating-point PRs touching APFloat, KnownFPClass, and related files (#246233)
This should label PRs if they touch, APFloat, ConstantFPRange,
KnownFPClass, and other floating-point related files.
TargetLibraryInfo: Add NetBSD, OpenBSD and DragonFly function list (#150885)
Describe which libc functions NetBSD, OpenBSD and DragonFly have, so
that LLVM uses the ones that exist and does not emit calls to ones
that do not.
NetBSD:
- getc_unlocked, getchar_unlocked, putc_unlocked and putchar_unlocked
are available.
OpenBSD:
- ffsl and ffsll are available.
- getc_unlocked, getchar_unlocked, putc_unlocked and putchar_unlocked
are available.
DragonFly:
- bcmp, ffsl, ffsll, fls, flsl and flsll are available.
- fputc_unlocked, fputs_unlocked, fread_unlocked, fwrite_unlocked,
getc_unlocked, getchar_unlocked, putc_unlocked and putchar_unlocked
[11 lines not shown]
[ValueTracking] Only use ninf to rule out infinite fma operands (#246224)
computeKnownFPClass for fma/fmuladd applied KnownNotFromFlags to the
operands. That mask includes classes ruled out for the result by
nofpclass on the call and by dominating conditions, not just the
nnan/ninf flags.
A NaN operand always gives a NaN result, so a NaN-free result still
means NaN-free operands. That is not true for infinity: fma produces
NaN when multiplying zero by infinity, or when adding two exact
infinities of the opposite sign. A result known not to be infinite says
nothing about the operands, and treating them as non-infinite lets NaN
be ruled out wrongly.
Only use the ninf flag to rule out infinite operands.
Fixes #246208
---------
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
sysrc: Restore the ability to pin default value
Fix 1 issue identified in post-commit review of eaf7113:
POSTCR-1: "unchanged" short-circuit counts a value that only comes
from RC_DEFAULTS, so `sysrc -f file var=<default>` writes nothing.
Add an ATF test to ensure we preserve this functionality.
Reported by: llm-postcr
Fixes: eaf7113bef8f ("sysrc: Add "unchanged" messages")
Merge tag 'for-7.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fixes from David Sterba:
"A number of fixes as reported on the Sashiko Bugs page and the usual
bag of regular fixes:
- send fixes:
- fix sending file hole punching command in incremental mode
- fix invalid memory access for inline extent
- fixes for nowait semantics:
- fix memory allocation in encoding read ioctl
- don't wait for ordered extents in buffered write
- don't propagate nodatacow from mount option to files with
compression flag inherited from parent directory
- fix fsync mode in encoded write so the data are fully written
[38 lines not shown]
lualoader: don't run a failed command twice from the prompt
interp_run() hands each command line to cli_execute, which runs
builtins through loader.command. If that returned an error, it then
ran the command again with interp_builtin_cmd(), as a fallback for when
lua couldn't run the command at all. A command that simply failed thus
ran twice, printing any errors twice and repeating whatever it did
before it failed.
Only fall back when the lua call itself failed, and otherwise take the
command's own result.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D61845
loader: i386: fix vectx handling in chain error paths
Once vectx_open() succeeds, the stat, device, root device and read error
paths all returned without freeing the context, leaking it.
We also closed the fd before calling vectx_close(), which may need to
read the remainder of the file to finish hashing it. This is harmless
as-is because we've always read the whole file by that point, but close
it afterwards so that we aren't relying on that.
Reviewed by: sjg
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D61840
stand/zfs: leave variables that nvstore doesn't own alone
Setting an nvstore variable also sets it in the loader's environment,
both when we store it and when we import the nvstore at startup. We
did that with EV_NOHOOK, which is right for our own variables, since
their hook is what stores them. A variable that something else in the
loader created, e.g., currdev or console, has hooks of its own that
validate it or act on it. We bypassed those, so a stored value never
really took effect, and we could set or discard a variable whose hooks
would have refused.
Refuse to set or unset such a variable with EPERM before we touch the
pool label, and skip it when we import the nvstore.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D61844
libsecureboot: don't remember files accepted unverified
verify_file() caches the result for each file by dev/ino, including
VE_UNVERIFIED_OK. That status only says that the file was unverified
but acceptable at the severity the caller asked for, but a later
request for the same file takes the cached result as-is: verify_prep()
and vectx_open() both treat it as "not verifying this", even at
VE_MUST.
As a result, anything that could be opened at a lower severity could
then be loaded where it must verify, e.g.:
include /boot/modules/evil.ko # VE_WANT, no fingerprint
load evil # VE_MUST, but cached as OK
Stop caching VE_UNVERIFIED_OK so that each request is judged by its own
severity, under whatever policy is in effect at the time. Files that
would be accepted unverified have no usable fingerprint, so there's
nothing to hash; they're just looked up again (and reported, if verbose)
[6 lines not shown]
loader: fix double free of vectx on verification failure
vectx_close() always frees the context it is handed, but both
file_loadraw() and the i386 chain command would free(vctx) again when
it reported a verification failure.
Reviewed by: imp, sjg
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D61839
lualoader: match the .lua extension literally
Both config.processFile() and try_include() checked for a .lua
extension with ".lua$", but '.' matches any character, so a name like
foo_lua also matched.
In processFile(), that meant that a config file such as /boot/foo_lua
was run as lua, though it was opened like any other config file.
With veriexec, that file only needs VE_WANT rather than the VE_MUST
that we expect for lua code, so an unverified file could be run as lua.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D61843
loader: efi: fix error check on fstat() in chain
fstat() returns -1 on failure, so testing for a return value less than
-1 could never catch an error, and we would carry on with whatever
garbage was in the stat buffer.
Reviewed by: imp, sjg, tsoome
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D61846
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.
Let's try this again:
limit the number and total size of packets that we will queue
while KEX is running. Avoids possible DoS when KEX stalls and local
processes continue generating channel data for too long
Anthropic ANT-2026-Q1334JFN but with a separate threshold after which
the channels stop producing packets too
Now with at least one fewer redundant and one fewer wrong test to break
mux.
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).
Merge tag 'probes-fixes-v7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull probes fixes from Masami Hiramatsu:
- Do not let KASAN check the $stackN read
Use READ_ONCE_NOCHECK() in ftrace_regs_get_kernel_stack_nth() so
reading $stackN entries that fall in another frame's redzone does not
trigger KASAN stack-out-of-bounds splats under CONFIG_KASAN_STACK
- Zero out faulted dereferenced fields
Zero the destination in probe_mem_read() and probe_mem_read_user() on
read failure and continue storing zero in process_fetch_insn_bottom()
instead of leaving stale ring-buffer contents when a dereference
faults
* tag 'probes-fixes-v7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
tracing/probes: Zero out faulted dereferenced fields
tracing/fprobe: Do not let KASAN check the $stackN read
[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)
revert:
limit the number and total size of packets that we will queue
while KEX is running. Avoids possible DoS when KEX stalls and local
processes continue generating channel data for too long
Anthropic ANT-2026-Q1334JFN but with a separate threshold after which
the channels stop producing packets too
Causes hangs with multiplexed connections. Needs further debugging