firewall: pluginify filter_core_get_default_nat_outbound_networks() #10539
Bring a bit of structure into this legacy code: move the "plugin"
parts to its own "oubound_net" run target, collect it with the new
filter_auto_source_nat() and just iterate over it from the code
that needs this. We do all of this to provide a possible configd
target to expose the actual automatic rules skeleton to the MVC
source NAT GUI.
# pluginctl -r outbound_nat
{
"pf": {
"wan": {
"lan": "LAN networks",
"lo0": "Loopback networks",
"127.0.0.0/8": "127.0.0.0/8"
}
}
}
[RISCV] Don't transfer (select c, t, f) to Zicond when optimizing for size (#163501)
The Zicond form of (select c, t, f), (or (czero_eqz t, c),
(czero_nez f, c)), has no compressed encodings and is always 12 bytes.
The branch form (branch + mv) is at most 8 bytes, and with the C
extension
4 bytes when the branch compresses (c.mv always does) or 6 bytes when it
does not; it shrinks further when a condition is shared across selects.
Since it is never larger by byte count, skip the Zicond transform under
optsize via !DAG.shouldOptForSize().
Fixes https://github.com/llvm/llvm-project/issues/158633.
py-numexpr: updated to 2.14.2
Changes from 2.14.1 to 2.14.2
* Added a ``disable_cache`` parameter to ``evaluate()`` to bypass the
internal expression cache. Thanks to 27rabbitlt.
* Added Windows ARM64 wheel builds.
* Dropped support for Python 3.10.
* No longer build free-threaded Python 3.13 wheels, matching NumPy's own
support.
* Avoid keeping arrays passed as ``out=`` alive in the ``re_evaluate`` cache
* Guarded out-of-range shift counts (shift amount >= bit width) in the
integer ``<<``/``>>`` opcodes, which was undefined behavior in C and could
return garbage results. Thanks to uwezkhan
* Fixed ``run_interpreter()`` unconditionally returning success even when
the VM engine failed, so execution errors are now correctly raised
instead of silently discarded
* Fixed a reference leak of ``constsig`` on the allocation-failure path in
``NumExpr_init()``
py-oath: updated to 1.4.5
1.4.5
* fix licensing metadata in setup.py, license is BSD 3-clause not MIT
* fix ci workflow
* fix typos (Tim Gates)
* fix dead declaration for test_suite in setup.py
[clang] Use key-value initialization for LangASMap (NFCI) (#210259)
The original implementation requires each target to list a value for
every LangAS in exact enum order. This forces targets to specify
mappings for unrelated address spaces and makes it easy to introduce
ordering bugs, such as the one fixed in
4479f3397f827291c51698fbaa685b1a9493467a.
Address this by introducing a class that supports order-independent
key-value initialization and defaults unspecified entries to 0.
net: Fix SIOCSIFDESCR fallthrough bug in ifioctl()
* Add the missing 'break' to SIOCSIFDESCR to fix the fallthrough bug.
* Remove the redundant ifnet_lock()/unlock() pair.
* Clean up the code a bit by rearranging the local variables.
net: Fix ifnet_mtx deadlock in ifioctl()
Several error paths in ifioctl()'s switch (SIOCGIFGROUP, SIOCAIFGROUP,
SIOCDIFGROUP, SIOCSIFDESCR) return directly instead of break, bypassing
the ifnet_unlock() at the end of the function. As a result, ifnet_mtx
is held across the switch and will block any future ifnet_lock() calls,
which basically breaks the network subsystem.
What makes matter worse is that SIOCGIFGROUP has no caps check, so
any local user can trigger such a deadlock in the network subsystem.
GitHub-PR: #47
Assisted-with: Zhipu GLM-5.2
net: Fix ifnet_mtx deadlock in ifioctl()
Several error paths in ifioctl()'s switch (SIOCGIFGROUP, SIOCAIFGROUP,
SIOCDIFGROUP, SIOCSIFDESCR) return directly instead of break, bypassing
the ifnet_unlock() at the end of the function. As a result, ifnet_mtx
is held across the switch and will block any future ifnet_lock() calls,
which basically breaks the network subsystem.
What makes matter worse is that SIOCGIFGROUP has no caps check, so
any local user can trigger such a deadlock in the network subsystem.
GitHub-PR: #47
Assisted-with: Zhipu GLM-5.2
net: Fix SIOCSIFDESCR fallthrough bug in ifioctl()
* Add the missing 'break' to SIOCSIFDESCR to fix the fallthrough bug.
* Remove the redundant ifnet_lock()/unlock() pair.
* Clean up the code a bit by rearranging the local variables.
[libc] Add struct group_req, struct group_source_req, and related socket options (#210029)
Add definitions for struct group_req and struct group_source_req in
llvm-libc-types and wire them into <netinet/in.h>.
Also define the multicast socket options using these structs:
- MCAST_JOIN_GROUP
- MCAST_LEAVE_GROUP
- MCAST_BLOCK_SOURCE
- MCAST_UNBLOCK_SOURCE
- MCAST_JOIN_SOURCE_GROUP
- MCAST_LEAVE_SOURCE_GROUP
Add layout assertions for struct group_req and struct group_source_req
to the netinet/in.h unit test.
Assisted by Gemini.
[libc] Make hermetic test syscall deps linux-only (#210715)
They are only used on linux, so this matches that.
They are also only used in full build mode, but hermetic tests only work
in full build mode, so we don't need to check that here. The darwin
check is a noop as (AAIU) we don't support full_build on darwin, but
I've kept it for symmetry.
[AMDGPU] Fix simplification of VM_VSRC based on VMEM waits (#178711)
Teach simplifyVmVsrc that a wait for a VMEM counter (LOAD_CNT, DS_CNT
etc) only implies a corresponding wait for VM_VSRC if there are no
outstanding VMEM operations that use a different VMEM counter.
Fix coro.free in .resume clones when [[clang::coro_await_elidable]] is used with suspend_never final suspend
Fixes https://github.com/llvm/llvm-project/issues/188230
CoroAnnotationElide rewrites annotated safe calls to the .noalloc
variant. The noalloc frame is caller-owned, but its .resume clone is
shared with ordinary heap-allocated instances.
With a suspend_never final suspend, normal resumption falls through to the
coro.free-based deallocation path. Regular frontend cleanup has already run
before this point. coro.free must therefore produce the frame pointer for a
heap instance and null for a .noalloc instance.
Use the frame destroy slot as a per-instance allocation tag. Cache its value
at resume entry, before user code can resume and release the enclosing caller
frame, then compare it with the cleanup clone. Replace each coro.free result
with the frame pointer for a heap instance and null for an elided instance.
Update the CoroSplit and Clang CodeGen checks to cover the conditional
[3 lines not shown]
Fix coro.free in .resume clones when [[clang::coro_await_elidable]] is used with suspend_never final suspend
Fixes https://github.com/llvm/llvm-project/issues/188230
CoroAnnotationElide rewrites annotated safe calls to the .noalloc
variant. The noalloc frame is caller-owned, but its .resume clone is
shared with ordinary heap-allocated instances.
With a suspend_never final suspend, normal resumption falls through to the
coro.free-based deallocation path. Regular frontend cleanup has already run
before this point. coro.free must therefore produce the frame pointer for a
heap instance and null for a .noalloc instance.
Use the frame destroy slot as a per-instance allocation tag. Cache its value
at resume entry, before user code can resume and release the enclosing caller
frame, then compare it with the cleanup clone. Replace each coro.free result
with the frame pointer for a heap instance and null for an elided instance.
Update the CoroSplit and Clang CodeGen checks to cover the conditional
[3 lines not shown]