vm: Clean up cdev_pager_allocate() a bit
* Introduce 'pindex' variable to clean up the code.
* Add KASSERT() to ensure the object type matches (obtained from FreeBSD)
vm: Remove duplicate reference in cdev_pager_allocate()
The code was updated in 2013 [1] to bring in various changes from
FreeBSD, but left this duplicate reference. Remove the erroneous
vm_object_reference_locked() call.
[1] kernel: Port new device_pager interface from FreeBSD
commit f2c2051ee473577d22178d55f782ceebbd88d58f
GitHub-PR: #49
Credit: LI Leding
kernel: Disable build-ID for vkernel(7) and fix build
Vkernel(7) doesn't use a linker script, so it's not easy to define
__build_id_{start,end} for it.
A solution would be to locate the ELF in memory, parse and walk the
program headers to find the ".note.gnu.build-id" section.
Reported-by: Michael Neumann
[libc++][test] Suppress warning on bitwise shift with `bool` operands in `std::byte` tests for MSVC (#212433)
It was intentional in https://llvm.org/PR204116 that tests for
`operator<<`, `operator<<=`, `operator>>`, `operator>>=` used `bool`
operands, because `bool` is an integral type and thus satisfies the
constraints of these operators.
However, MSVC considers `bool` is unsafe as an operand of bitwise shift
operators and emits warning C4804. So this patch suppresses the warning
for MSVC.
AMDGPU: Remove dead FEATURE_FP64/FEATURE_LDEXP from ArchFeatureKind
No GPU ever sets these bits, and clang's hasFP64()/hasLDEXPF() short-circuit
on isAMDGCN() before testing them, so the bits are never observed.
Co-authored-by: Claude (Claude-Opus-4.8)
NAS-141982 / 27.0.0-BETA.1 / Remove dead code `NFSBindAddressAlert` (#19416)
The code setting `interfaces_are_set_up` was guarded under `if
osc.FREEBSD` and removed in 2021.
Nothing calls `nfs.bindip`
There is no other code raising `NFSBindAddressAlert`
`validate_bind_ip` is also not used by anything else
Thread Safety Analysis: Honor try-lock branches of a void conditional (#211973)
Try-locks are not acquired on the arms of a `?:`, because the arms would
then disagree about whether the capability is held and warn where they
join. That reasoning assumes the `?:` produces a result that is branched
on later, which is where the acquisition is handled instead.
A void `?:` has no such result. Its branch is all there is to interpret,
and its arms might not join at all because one of them does not return
(this is how glibc before 2.32 spells `assert()`).
So asserting that a try-lock succeeded left the capability unheld on
every path, and a function documented to acquire it warned that it did
not, if written like so:
void lock(void) ACQUIRE(mu) {
int got = trylock();
assert(got); // warning: expecting mutex 'mu' to be held at the end of
function
[6 lines not shown]
[libc] Make hash_test hermetic (#212428)
Aligned allocation is now supported, but the test burns through our 1MB
never-freeing bump pointer allocation buffer. I tweak the test to reuse
the buffer between loop iterations, reducing its memory usage by about
300x :P.
devel/umlgraph: deprecate and expire
I succeeded in building the forked(?) https://github.com/dspinellis/UMLGraph.
But it didn't run. Patch is in the PR.
NB: domainname was for sale now. Changed in something more reasonable.
PR: 297117
Approved-by: no maintainer
NAS-141966 / 26.0.0-BETA.3 / Remove frames from JSON-RPC error responses (by anodos325) (#19414)
The client-facing error trace included every stack frame's locals (via
get_frame_details, which reprs each local). This can result in API calls
echoing back parameters from the call to the same API client in the
error response. Generally, this information is not consumed by the
truenas API client, jobs framework, or other internal call sites.
Original PR: https://github.com/truenas/middleware/pull/19403
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
NAS-141966 / 26.0.0-RC.1 / Remove frames from JSON-RPC error responses (by anodos325) (#19415)
The client-facing error trace included every stack frame's locals (via
get_frame_details, which reprs each local). This can result in API calls
echoing back parameters from the call to the same API client in the
error response. Generally, this information is not consumed by the
truenas API client, jobs framework, or other internal call sites.
Original PR: https://github.com/truenas/middleware/pull/19403
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
Merge commit 6b0a46958c56 from llvm-project (by Piotr Kubaj):
[libunwind][PPC64] Fix unw_getcontext corrupting callee-saved VSX registers on LE (#198371)
This is the first of two independent fixes for libunwind on ppc64le
(ELFv2 ABI, little-endian), where two separate bugs together cause
SIGSEGV during backtracing. This commit addresses the VSX register
corruption; the TOC-restore fault is handled in a follow-up. Both
were discovered while debugging lang/rust build failures with
RUST_BACKTRACE=1 on FreeBSD/powerpc64le (IBM POWER9).
On ppc64le, `unw_getcontext` saves each VS register with an in-place
`xxswapd n, n` followed by `stxvd2x`. The swap is needed because
`stxvd2x` stores doublewords in the wrong order on LE. However, the
macro never applies a second `xxswapd` to restore the register after
the store, so all 64 VS registers are permanently corrupted on return
from `unw_getcontext`.
This affects every callee-saved VSX register: f14-f31 (VSR14-VSR31)
[11 lines not shown]
[mlir][Target] Make nvptxcompiler passed options high priority to keep consistent with ptxas behavior (#121036)
When using `ptxas` to do ptx->cubin, the options passed (via `cmd`) have
higher priority than the gpuModule target (such as `opt-level`). When
using `nvptxcompiler`, it is the opposite and we need to be consistent.
NAS-141966 / 27.0.0-BETA.1 / Remove frames from JSON-RPC error responses (#19403)
The client-facing error trace included every stack frame's locals (via
get_frame_details, which reprs each local). This can result in API calls
echoing back parameters from the call to the same API client in the
error response. Generally, this information is not consumed by the
truenas API client, jobs framework, or other internal call sites.
(cherry picked from commit e156c14b313546cf7e9eed02a2365909ac9bf99e)