libthr: Predict libthr is initialized in _thr_check_init
_thr_check_init() is called on hot paths such as pthread_once(), and
the uninitialized case can only happen once. Mark it with
__predict_false so the compiler lays out the initialized case as the
fall-through path.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D61213
NAS-145070 / 28.0.0-BETA.1 / Send the system global ID to HexOS alongside the hostid hash (by creatorcary) (#20144)
HexOS identifies each server by a hash of `/etc/hostid`, but hostids
collide across installs: until
[NAS-143895](https://ixsystems.atlassian.net/browse/NAS-143895) the
installer's hostid generator seeded itself from the process ID and the
clock, so machines installed without a working RTC could end up with the
same hostid, and that fix only helps new installs. The HexOS tunnel URL
now also carries the system's global ID (the random UUID behind
`system.global.id`) as a `gid` query parameter. The URL path is
unchanged so HexOS can keep matching servers it already knows by hostid,
and when the ID cannot be read the URL is exactly what it was before.
The ID is read straight from the config database, so starting the tunnel
never waits on middlewared.
Original PR: https://github.com/truenas/middleware/pull/20122
---------
Co-authored-by: Logan Cary <logan.cary at ixsystems.com>
hastd: Remove pidfile on exit
Make hastd remove its pidfile before exit after catching a signal or a
stop control message, not just on failure to start.
MFC after: 1 week
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D60192
(cherry picked from commit 3f2f6bb8f7b562276bffd04a9ae4c05a351b4435)
hastd: Remove pidfile on exit
Make hastd remove its pidfile before exit after catching a signal or a
stop control message, not just on failure to start.
MFC after: 1 week
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D60192
(cherry picked from commit 3f2f6bb8f7b562276bffd04a9ae4c05a351b4435)
[SLP]Allow copyable when other operand is built from same-lane operand
Copyable lanes were rejected if the second operand column had more
than one instruction. If each such instruction uses only the same-lane
first operand and constants, the column is a vector op over the
vectorized first operand, not a gather.
Fixes #183730
Assisted-by: Cursor
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/239268
NAS-145079 / 28.0.0-BETA.1 / Release NFS locks before unmounting a dataset (#20129)
### Background
nfsd and lockd keep a file open for every NFSv3 lock and every NFSv4
open or delegation, and deleting a share does not release them. Once the
share is gone, an NFSv3 client can't even release a write lock anymore:
lockd reopens the file through nfsd for the unlock, and the handle is
stale by then. The dataset stays busy, so `pool.dataset.delete`,
`pool.dataset.lock` and `pool.export` fail with EBUSY, even after a lazy
unmount has hidden it. We saw this on a customer system weeks after the
shares had been deleted.
### Change
A private `nfs.release_dataset_filesystems` that the three operations
call right before they unmount. For every live filesystem in the tree it
writes `/proc/fs/nfsd/unlock_filesystem`, reaching the filesystem
through `fsmount()` so a lazily unmounted one works too, and does the
same for snapshots automounted under `.zfs/snapshot`. This releases
NFSv3 locks and NFSv4 opens and delegations. A filesystem another share
[20 lines not shown]
[libc] Fix AVX2 compare_and_mask broadcasting byte needle with epi16 (#235246)
In `libc/src/string/memory_utils/x86_64/inline_strlen.h`, the AVX2
specialization of `compare_and_mask` used `_mm256_set1_epi16(c)` instead
of `_mm256_set1_epi8(c)`.
Because `compare_and_mask` is used by `find_first_character` (and
therefore `memchr`), this caused:
1. Matches at odd offsets to be missed (since odd bytes in the vector
mask were 0x00 instead of `c`).
2. False positive matches when 0x00 (or 0xFF) occurred at odd offsets
while searching for a nonzero character.
This change fixes the broadcast intrinsic to `_mm256_set1_epi8(c)`
(matching the SSE2 and AVX-512 specializations) and adds regression
tests to `memchr_test`.
Fixes #226787.
[ValueTracking] Allow compares against a variable bound to be analyzed (#237661)
Extend using conditional branches to limit the range of an incoming
value to a phi-node in KnownBits analysis. Previously only comparisons
of an incoming value to a phi-node against a constant were allowed. This
PR extends it to allow comparisons of the value with a variable value
that is itself analyzed by KnownBits.
---------
Signed-off-by: John Lu <John.Lu at amd.com>
Revert "[libc] Implement swprintf." (#239260)
Reverts llvm/llvm-project#235008
Test failures have to do with float128 conversion when long double is
not float128.
security/ruby-net-sftp: update to 4.1.1
4.0.1 (2026-10-22)
* Allow net-ssh 8 [#181]
4.0.2 (2026-10-25)
* Security: Recursive downloads refuse to follow an existing local symlink
at a server-named path instead of writing through it. The local path
passed by the caller may still be a symlink. Suggested in #162 by
srosenhamer [#186]
* Security: Recursive downloads reject file names from the server that are
not a single path component (such as `../x` or `a/b`) instead of writing
outside the target directory. Reported in #162 by srosenhamer [#185,
#162]
* Net::SFTP now works with frozen string literals enabled: `File` reads and
`Dir#glob` no longer mutate frozen strings, and `glob` no longer modifies
[114 lines not shown]
ice(4): Do not leave device non-functional if Tx scheduler config fails
The ice_cfg_tx_topo function attempts to apply Tx scheduler topology
configuration based on NVM parameters, selecting either a 5 or 9 layer
topology. As part of this flow, the driver acquires the "Global Configuration Lock",
which is a hardware resource associated with programming the DDP package
to the device. This "lock" is implemented by firmware as a way to
guarantee that only one PF can program the DDP for a device. Unlike a
traditional lock, once a PF has acquired this lock, no other PF will be
able to acquire it again (including that PF) until a CORER of the device.
However, if configuration of the Tx topology fails, (i.e.
ice_get_set_tx_topo returns an error code), the driver exits
ice_cfg_tx_topo() immediately, and fails to trigger CORER.
While the global configuration lock is held, the firmware rejects most
AdminQ commands, as it is waiting for the DDP package download (or Tx
scheduler topology programming) to occur.
Refactor ice_cfg_tx_topo() to always trigger a CORER after acquiring the
global lock, regardless of success or failure of the topology
configuration.
[15 lines not shown]
[X86] Fix `combineFP_EXTEND` for `bf16` vectors to `f80/f128` and strict `fpext` (#233066)
Fixes #228648
`combineFP_EXTEND` runs before type legalization and rewrote every
vector `bf16` `fpext` as if the result were `f32` or `f64` and the node
non-strict, asserting otherwise. A `<4 x bfloat>` to `<4 x x86_fp80>`
`fpext` hit the assert; release builds emitted a mis-sized `bitcast` and
returned garbage.
Extend to an f32 vector first and let the generic legalizer widen the
rest, as the f64 case already did; strict nodes keep their chain.
AI assisted!
auditdistd: Use void pointers for opaque data
Use void, not char, for pointers to opaque data in our send and receive
functions.
Sponsored by: Klara, Inc.
Sponsored by: Qualys, Inc.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D60728
(cherry picked from commit 4f19e4aca4f4b7a3058be5d3bfc5aed66668b00f)
auditdistd: Fix build failure
Fixes: 4f19e4aca4f4 ("auditdistd: Use void pointers for opaque data")
Reported by: garga@
(cherry picked from commit 0ce9d6e240a14d5b7cd8eb45a83d0e429f4a3edf)