Type the service.query result in the S3 license reconcile guard
mypy: Returning Any from function declared to return "bool"
[no-any-return]. middleware.call returns Any, so the comparison in
should_run was Any too. Annotate the entry as ServiceEntry, as
lifecycle.py already does for the same call.
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
Only build DTLS handshake messages once and re-use for retransmits.
Build a struct dtls12_handshake_msg when the TLS handshake message is first
created, then retain a pointer to this struct with reference counting.
Retransmits can now be performed using this same DTLS handshake message.
ok kenjiro@ tb@
[CAS] Check StandaloneData before reopening a standalone object (#223807)
OnDiskGraphDB::load() inserted every standalone object it mapped into
StandaloneData but never read from it: lookup() and count() had no
callers anywhere. So each load of an object stored outside the data pool
repeated the open, fstat, mmap and close, and then insert() saw the hash
was already present, dropped the freshly created mapping, and returned
the pointer it already had. The whole sequence was wasted.
Consult lookup() before touching the filesystem to make loading already
opened CAS objects much faster.
Merge upstream main into cir-callconv-union-tail-padding
#223859 is in main now, so takeTailByteOrPtr passes. #223538 also landed
and touched the same union arm, so its struct-only restructuring of the
empty-member rules is kept and the spanning checks this branch removes
are not.
That leaves three of its NYI cases accepted. UBitUnnamed is already
covered here by takeBitUnnamed, and UNuaEmptyNarrow plus a named
bit-field variant move to call-conv-lowering-x86_64-empty.cpp, both
matching classic. Also dropped the type aliases our earlier commit
orphaned.
Assisted-by: Cursor / claude-opus-5
[BOLT] Gadget scanner: prevent false positives due to jump tables
As part of PAuth hardening, AArch64 LLVM backend can use a special
BR_JumpTable pseudo (enabled by -faarch64-jump-table-hardening
Clang option) which is expanded in the AsmPrinter into a contiguous
sequence without unsafe instructions in the middle.
This commit adds another target-specific callback to MCPlusBuilder
to make it possible to inhibit false positives for known-safe jump
table dispatch sequences. Without special handling, the branch
instruction is likely to be reported as a non-protected call (as its
destination is not produced by an auth instruction, PC-relative address
materialization, etc.) and possibly as a tail call being performed with
unsafe link register (as the detection whether the branch instruction
is a tail call is an heuristic).
For now, only the specific instruction sequence used by the AArch64
LLVM backend is matched.
iflib: implement driver-provided queue selection for simple tx
Until now, simple tx has used its own queue selector, and has
ignored isc_txq_select and isc_txq_select_v2 (not this only
seems to matter for ice(4) with dcb enabled). This change
makes simple-tx use isc_txq_select* when present.
The implementation is defined to be efficient, with a
transmit routine chosen up-front that hard-codes the
queue selection and calls an always-inlined body. This
avoids a useless test per packet in the hotpath, and
also may avoid speculation into header parsing.
Note that this was designed for readability and efficiency
in the common case (interface up, not ALTQ). That's why
we do queue selection without duplicating nic-running and
altq checks, leaving them to the common implmentation.
Sponsored by: Netflix
[2 lines not shown]
[mlir][python] Register linalg.ElementwiseOp wrapper as op view (#223806)
Register the wrapper for `ElementwiseOp` with
`@_ods_cext.register_operation(_Dialect, replace=True)` so the exported
class is the one the registry instantiates.
Fixes #223673
Assisted by: Claude
Restart the S3 service when the license changes
The S3 daemon asks truenas.entitlements.check for S3_VERSIONING and
S3_AUDIT once, before it registers a bucket, and holds the answer for
the life of the process. A reload re-reads its files and not the
license -- by design, so every registration-consumed fact arrives the
same way, a restart. Nothing performed that restart: no
system.post_license_update subscriber reached the service, and the
license reconcile pass carried no S3 delegate.
So a revoked versioning entitlement went on minting versions until
someone restarted the service by hand, and -- the direction that
reaches a customer -- a granted one left every object-lock bucket the
daemon had excluded at start answering 503 after the license that
would serve it was installed.
Register a RESTART delegate for the service, ordered after the user
delegate since the credentials file the restart renders resolves every
access key through NSS. It runs only while the service is up: RESTART
[2 lines not shown]
[libc++] Skip including langinfo.h when unused (#223749)
A previous change unconditionally includes <langinfo.h>.
__get_locale_encoding() only uses langinfo when compiling shared
libraries, and hardcodes "UTF-8" on Android.
glibc's <langinfo.h> defines POSIX nl_item constants as raw numeric
preprocessor macros (#define ERA 46).
This causes Bionic's #define ERA 46 leaks into C++ translation units on
Android and fails the compilation with:
```
error: expected member name or ';' after declaration specifiers
static constexpr typename ERA = random_value;
```
[AMDGPU] Classify generic-target features
Classify features used by generic targets but absent from some covered
GPUs as AMDGPUGenericAnyFeature. This covers the gfx11 workarounds,
gfx12.5 register fixup and WMMA timing, and LDS size and bank count.
Derive the classified features directly from the SubtargetFeature subclass
and preserve their existing predicates. Keep RequiresCOV6 outside this
policy because it is specific to generic targets and absent from their
covered GPUs.
Test the real target definitions, missing support for classified features,
and the existing all-member requirement for instruction capabilities.
Change-Id: I9fffbe532b8b5bc8875f20f394f29e2e6899f52e
[AMDGPU][NFC] Allow selected generic features on any covered GPU
Add AMDGPUGenericAnyFeature so individual feature classes can require
support from at least one covered GPU. Check explicitly marked features
even when they are not frontend-visible, while retaining the all-member
check for ordinary frontend-visible features.
Follow implied features using their own validation rules. Require named
generic targets to cover at least one concrete AMDGPU GPU, rejecting self
references, other generic targets, pseudo targets, and invalid members.
Cover partial support, missing support, exact numeric-feature membership,
backend-only features, implications, and malformed coverage lists with
TableGen tests. Generated target definitions remain unchanged.
proc: free kstack buffers when debug permission changes
The kern.proc.kstack handler allocates its output and stack buffers
before deliberately checking p_candebug again under the process lock.
If trace-control state changes between authorization checks, the failure
path balances the process and exec state but leaks both buffers.
Submitted by calif.io for the OpenAI Patch The Planet program
Signed-off-by: Andrew Griffiths <andrew at calif.io>
Fixes: 8b5abd9027b8 ("kern_proc.c: disallow execve around sysctl kern.proc.kstacks")
Reviewed by: markj
MFC after: 1 week
mac_bsdextended: reject negative rule indices in sysctl_rule()
The security.mac.bsdextended.rules.<N> node handler takes N as
`index = name[0]` (a signed int) and only checks
`index >= MAC_BSDEXTENDED_MAXRULES`. A negative index is caught on
the read branch, but the write-only add and delete
branches proceed to `rules[index]` unconditionally.
Reject `index < 0` alongside the existing upper-bound check.
Submitted by calif.io for the OpenAI Patch The Planet program
Signed-off-by: Andrew Griffiths <andrew at calif.io>
Reviewed by: markj
MFC after: 2 weeks
[mlir][SparseTensor][NFC] Improve documentation for SparseTensor_LvlOp (#223307)
Update the `sparse_tensor.lvl` documentation to correctly describe the
level mapping for `%j floordiv 3`.
truss(1): capsicumize
The new ptrace(2) features allow to change truss(1) to systematically
operate on the process descriptors instead of pids.
Allocate the global kqueue that tracks all noted children
by pdopenpid()-ing them and adding to the kqueue with
EVFILT_PROCDESC/NOTE_PDSIGCHLD. The activated knote triggers the
pdwait() call to return the child tracing info. This replaces the
waitid(P_ALL) call in the non-capsicumized truss(1) eventloop.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D58094
[clang-tidy] `use-ranges`: avoid unsafe result fix-its
Preserve callable results with .fun, allow structured-binding-safe rewrites, and keep diagnostics while suppressing unsafe fix-its when ranges result objects do not match the original result shape.
Assisted by Codex.
[clang-tidy] `use-ranges`: preserve output results
Preserve used output iterator results for output algorithm replacements by appending .out where the ranges algorithm returns an algorithm result object.
Fix #110223
Assisted by Codex.
[libc] Add macro / sysconf support for POSIX threads features. (#223543)
Define all `_POSIX_THREAD_*` macro and corresponding `_SC_THREAD_`
sysconf names that provide information on availability of certain
POSIX threads features.
* Explicitly provide all relevant macro from POSIX standard:
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/unistd.h.html
to either 202405L (current POSIX version supported by LLVM-libc), or -1
(if the feature is unsupported)
* Support returning these features via `sysconf` for matching `_SC_`
name values;
* Add unit tests that validate the actual numerical values.