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)
auditdistd: Use fixed-length protocol names
All communication between auditdistd senders and receivers and
internally between auditdistd and its worker children passes through the
same pair of send / receive functions. The receive function uses
recv(2) with the MSG_WAITALL flag, which in theory means we should never
get a short read. However, when handing off a socket to a worker child,
we also pass a variable-length string identifying the type of socket
we're passing, and reading this string relies on a short read. This
used to work because the arrival of the descriptor would interrupt the
recv(2) call, but this bug was fixed when the AF_UNIX code was rewritten
a while ago and auditdistd has been broken ever since.
Fixing the length of the protocol name to four characters including the
terminating null solves the short-read bug by never requiring a short
read (nothing else in auditdistd requires one).
PR: 296107
MFC after: 1 week
[4 lines not shown]
libfetch: Plug leak in 304 Not Modified case
When we get a 304 Not Modified response, we need to go through the error
path to properly free any resources we've allocated instead of just
returning NULL directly.
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D60016
(cherry picked from commit b212f565fb1a34fdcd2f5c9530164ff4718a1a9f)
auditd: Support logging directly to syslog
Every tenth call to auditwarnlog(), check that the audit_warn(5) script
exists and is executable by us. If it is, execute it as previously;
otherwise, fall back to calling syslog(3) directly.
Additionally, if we choose to use the script and fail, also log the
original message to syslogd, not just the fact that we failed to log.
We could record the result of trying to execute the script, but that
would require pausing while it runs (or at least until the execve(2)
call has completed).
Retesting every tenth call is a little clunky but avoids having to
restart or signal auditd(8) to force it to notice a change in
availability, or adding a command-line option and / or modifying the
audit_control(5) syntax to let the user express a preference.
MFC after: 1 week
[6 lines not shown]
audit_warn: Avoid pointless fork and path search
While here, document what the script actually does, not what it once did
on a project branch somewhere that was never merged.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Qualys, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D60171
(cherry picked from commit 173268f3d5ede5f55a25f684d4c8c4c43749fde7)