netlink: Make room for the unfinished message when growing the buffer
When a message outgrows the writer's buffer, _nlmsg_refill_buffer()
allocates a larger one and moves the unfinished message there. The new
buffer was sized for the data about to be added alone, so with enough of
the message already written the caller wrote past its end and left it
with datalen > buflen. A 20-byte message plus an attribute of 8176
bytes got a buffer of 8192 bytes for 8200 bytes of data, and reading it
panicked an INVARIANTS kernel in nl_soreceive().
Size the new buffer for both, and add a ktest for it.
Reviewed by: glebius
Fixes: 7e5bf68495cc ("netlink: add netlink support")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D60541
netlink: Make room for the unfinished message when growing the buffer
When a message outgrows the writer's buffer, _nlmsg_refill_buffer()
allocates a larger one and moves the unfinished message there. The new
buffer was sized for the data about to be added alone, so with enough of
the message already written the caller wrote past its end and left it
with datalen > buflen. A 20-byte message plus an attribute of 8176
bytes got a buffer of 8192 bytes for 8200 bytes of data, and reading it
panicked an INVARIANTS kernel in nl_soreceive().
Size the new buffer for both, and add a ktest for it.
Reviewed by: glebius
Fixes: 7e5bf68495cc ("netlink: add netlink support")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D60541
sysutils/cni-epair: Update to 1.1.3
Request DHCP leases under the container's name instead of the host's
hostname, so a container no longer takes over the host's DNS record.
While here, update MAINTAINER to my FreeBSD address.
Reviewed by: acm, dtxdf
Approved by: acm, dtxdf (mentors)
Differential Revision: https://reviews.freebsd.org/D60583
sysutils/cni-epair: Update to 1.1.3
Request DHCP leases under the container's name instead of the host's
hostname, so a container no longer takes over the host's DNS record.
While here, update MAINTAINER to my FreeBSD address.
Reviewed by: acm, dtxdf
Approved by: acm, dtxdf (mentors)
Differential Revision: https://reviews.freebsd.org/D60583
databases/postgresql*-server: Drop duplicate -p in rc.d script
(This change was applied a week ago to 18 after testing. This commit
applies it to the rest of the pgsql server packages, without testing.)
While "${MKDIR} -p" looks right, the variable already has -p, so drop
the extra one.
Reported by Luis Falcon, and fix proposed on netbsd-users@ with
$MAINTAINER CC without objections.
[VPlan] Build packs from lane values in replicateByVF (NFC). (#231040)
Previously materializePacksAndUnpacks created single-operand
BuildVectors for all per-lane definitions with vector users or users
inside replicate regions, which replicateByVF later extended with the
per-lane values. Recipes in replicate regions then accessed their lanes
via extractelement(BuildVector, Lane), which had to be folded by several
BuildVector look-throughs.
Instead, create the BuildVectors directly in replicateByVF from the
per-lane definitions, only for users that need a vector. Users inside
replicate regions keep using the original definition until the replicate
regions are dissolved; the resulting lane extracts are then replaced by
the corresponding per-lane definitions before the original definition is
removed. As BuildVectors are only created with all lanes, they now
always use only the first lane of their operands.
This removes a number of indirections and folds, and simplifies the
code.
[orc-rt] Add Session instance symbols, SPS CI to look them up (#231043)
Objects created at runtime (e.g. service instances) have no symbols
under the standard object models, so the controller has no way to find
them by name. Instance symbols fill that gap:
Session::addInstanceSymbols registers (name, address) pairs for such
objects, and Session::lookupInstanceSymbols resolves a SymbolLookupSet
against them, with the same missing-symbol semantics as
SimpleSymbolTable::lookup. Duplicate handling follows
SimpleSymbolTable::addUnique: a batch containing a conflicting
definition is rejected as a whole.
The new orc_rt_ci_sps_Session_lookupInstanceSymbols wrapper exposes the
lookup to the controller. It is registered by sps_ci::addSession, which
sps_ci::addAll now includes.
net80211: add driver registration documentation
This is a brief introduction into the top-level newbus
driver methods and net80211 driver registration.
Differential Revision: https://reviews.freebsd.org/D60503
Reviewed by: ziaee, zi
net80211: add DRIVER_REGISTRATION to README.md ; fix links
* add the driver registration doc to README.md
* fix the links to resolve correctly with current doxygen
(1.18.0) with the current file path -> sanity conversion ->
html path rules.
Differential Revision: https://reviews.freebsd.org/D60504
Reviewed by: ziaee
net80211: add DRIVER_REGISTRATION to README.md ; fix links
* add the driver registration doc to README.md
* fix the links to resolve correctly with current doxygen
(1.18.0) with the current file path -> sanity conversion ->
html path rules.
Differential Revision: https://reviews.freebsd.org/D60504
Reviewed by: ziaee
net80211: add driver registration documentation
This is a brief introduction into the top-level newbus
driver methods and net80211 driver registration.
Differential Revision: https://reviews.freebsd.org/D60503
Reviewed by: ziaee, zi
TableGen: Cache resolved class instantiations
The same class instantiation is often referenced many times in one
record, and each reference was resolved again from scratch along with
everything nested in its arguments. Cache the results in MapResolver and
RecordResolver. The cache is cleared when the mappings change, and is
bypassed while a mapped variable is being resolved.
Nested instantiations are resolved through a TrackUnresolvedResolver,
which does not change the result. These share the cache of the
underlying resolver, which also records whether any references were left
unresolved so the trackers can be updated on a hit.
Gigainstructions executed by llvm-tblgen --null-backend
before after
AMDGPU.td 71.75 18.22 -74.6%
X86.td 6.10 6.15 +0.8%
AArch64.td 3.28 3.32 +1.3%
[3 lines not shown]
TableGen: Skip resolving values that cannot change
Lists, dags, bits and arguments made only of leaf values always resolve
to themselves, but resolving them still walked every element. Record
this when they are created and return early.
Gigainstructions executed by llvm-tblgen --null-backend
before after
AMDGPU.td 79.12 71.73 -9.3%
X86.td 6.25 6.12 -2.1%
AArch64.td 3.40 3.28 -3.7%
RISCV.td 8.34 8.19 -1.8%
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
TableGen: Use DenseMap for the IntInit pool
Gigainstructions executed by llvm-tblgen --null-backend
before after
AMDGPU.td 79.34 79.13 -0.3%
X86.td 6.30 6.25 -0.7%
AArch64.td 3.43 3.41 -0.6%
RISCV.td 8.40 8.34 -0.7%
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[VPlan] Use getFastMathFlagsOrNone in VPIRFlags::applyFlags (NFC) (#231036)
applyFlags hand-rolled the same field-by-field FastMathFlagsTy to
FastMathFlags conversion as getFastMathFlagsOrNone. Use the latter
together with copyFastMathFlags.