arm64 vfp: eliminate nested critical sections
At two out of three call sites to vfp_restore_state_common(), the caller
must use critical_{enter,exit}() to prevent preemption between its call
to vfp_restore_state_common() and other actions, notably its call to
sve_enable(). So, it is arguably better to make
vfp_restore_state_common()'s caller responsible for performing
critical_{enter,exit}() and simply perform CRITICAL_ASSERT() inside
vfp_restore_state_common().
(cherry picked from commit 189ee41b6cc3b0d92c291cc854d9781afec23ad4)
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.
arm64: close a race in SVE register management
While testing an unrelated pmap change, D58708, that dramatically
reduces the number of TLBI instructions performed, and likely the
timing of unrelated events, I started seeing "Storing an invalid VFP
state" panics in vfp_save_state_common(). However, the origin of this
panic is elsewhere, in the else branch of sve_restore_state().
Specifically, my pmap change seems to have increased the likelihood that
the thread executing the else branch would be preempted by another
thread between the critical_exit() inside the else branch's call to
vfp_restore_state_common() and its own call to critical_enter(). Prior
to expanding the scope of the else branch's critical section, the MPASS
added by this change would fire, catching the problem at its source,
rather than later in vfp_save_state_common().
(cherry picked from commit 6fa9c2b1d2824034268646e0744e5e010155ffaf)
[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