[LoopIdiom] Fix miscompile for big-endian sub-byte CRC (#213040)
The Sarwate lookup table optimization shifts the top bits of the
`Indexer` down to the low byte before indexing into the table. Though
uncommon, if the CRC has a sub-byte width, the top bits of `Indexer`
must be shifted *up* to align with the low byte, but this is never
accounted for. Shift `Indexer` either right *or* left depending on CRC
bitwidth.
[libc] Add <sys/statfs.h> header and entrypoints. (#213108)
Implement `statfs` and `fstatfs` functions on Linux.
We already have `struct statfs` and syscall wrappers defined (to
implement POSIX `<sys/statvfs.h>`). Use them to provide Linux-specific
functions as well.
NAS-141666 / 27.0.0-BETA.1 / Relocate migrated container origins out of legacy .ix-virt (by Qubad786) (#19454)
## Problem
Incus containers are ZFS clones of an image snapshot. The
incus->container auto-migration relocated each container from
`<pool>/.ix-virt/containers/<name>` to
`<pool>/.truenas_containers/containers/<name>` with a bare `zfs rename`
and did nothing else. A `zfs rename` does not change a clone's `origin`,
so a migrated container stayed a clone of a snapshot still living inside
`.ix-virt`. `.ix-virt` was visible in the UI and not delete-guarded, so
deleting it recursively destroyed those origin snapshots and cascaded
into the dependent migrated clones — silently destroying migrated
containers.
This is also the release that made `.ix-virt` deletable in the first
place, so the window between "your containers migrated fine" and "you
reclaimed the old dataset and lost them" is exactly this upgrade.
[100 lines not shown]
bhyve: tpm: Avoid printing a message when clearing the cancel bit
Some drivers do this routinely, e.g., FreeBSD's tpm20 does this every
time it sends a command in tpmcrb_transmit(). This causes the console
to fill up with messages. Instead, only print a warning if the cancel
bit is set to one.
Reviewed by: corvink
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D52425
tests/libc: Fix fortify_source uio tests
Some of the preadv() and readv() tests were not initializing the iovecs
they pass to the system call. When the system call is expected to fail,
that's fine since the FORTIFY_SOURCE checks cause the process to be
aborted. However, in the rest of the test cases, the (p)readv() call
could cause spurious test failures, e.g., when an uninitialized iov
entry points to the current stack frame and the canary gets overwritten.
Modify the tests to explicitly initialize iov entries to avoid this.
The "iov" variants don't have this problem, so leave them alone.
Reviewed by: kevans
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58289
net-mgmt/netbox: Update to 4.6.6
Changelog:
Enhancements:
* Enable the selection of VLANs scoped to a device's cluster or cluster
group when assigning VLANs to interfaces
* Render colored badges for custom field choices in tables
* Change the default color of the DHCP IP address status from green to
purple to distinguish it from "available"
* Introduce an "any" lookup for the tag and tag_id filters to match
objects assigned any of the specified tags
* Add a header_safe Jinja2 filter for sanitizing HTTP header values
Performance Improvements:
* Improve the speed of bulk object deletion by avoiding per-object
cascade handling and N+1 counter updates
* Avoid an unnecessary queryset evaluation when rendering export
templates
[53 lines not shown]
[mlir][complex] Fix canonicalize tests (#213259)
Remove trailing spaces and double line breaks, fix variable
re-definitions, make variables match regex consistent.
[libc] Add 'struct ucred' definition. (#213152)
This is a Linux extension that allows to obtain credentials of a peer
process connected to a socket, e.g. via passing `SO_PEERCRED` to
`getsockopt` function.
[flang][Transforms] Add LiftSCFWhileToSCFFor pass
Introduces `--lift-scf-while-to-scf-for`, which walks every scf.while
produced by upstream `lift-cf-to-scf` and, when the canonical
"trip-counter + induction-variable" shape is recognized, rewrites the
loop as scf.for. Other loop-carried before-args are passed through as
iter_args. Loops that do not match (data-dependent updates, used
results, non-positive IV step, etc.) are left untouched and a
diagnostic is emitted to stderr.
Recognition collects a LoopInfo describing the loop:
- trip counter: candidate the gating cmp uses, must have step -1
- induction variable: the single non-trip affine recurrence, must
have positive step (negative step bails for now)
- iter_args: any other before-args that pass through unchanged
Rewrite materializes `ub_excl = ivInit + tripInit * ivStep` before
the scf.while, casts lb/ub/step to index (so the resulting scf.for
is compatible with downstream affine conversion), and clones the
[8 lines not shown]