sound tests: Check the return value of close(2)
While here, remove two munmap(2) calls on mappings the tests require to
have failed, since they are practically dead.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60800
sound: Let pcm_unregister() tear down a partially initialized device
Since 3107b952f534 ("sound: Merge PCM_ALIVE() with PCM_REGISTERED()"),
pcm_unregister() is gated on PCM_REGISTERED(), so it cannot run unless
pcm_register() has already succeeded, which means drivers will leak
resources if a failure happened prior to this.
Reintroduce PCM_ALIVE(), but test dev rather than the lock. pcm_init()
assigns dev before anything else, so it can tell us whether pcm_init()
has run or not. Make sure to clear it in pcm_unregister() so that a
second call to pcm_unregister() cannot double-free.
While here, publish to sndstat(4) only once pcm_register() has
succeeded.
Reported by: jah
Fixes: 3107b952f534 ("sound: Merge PCM_ALIVE() with PCM_REGISTERED()")
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
[2 lines not shown]
[AArch64][DAG] Add ISel for SVE floating-point non-temporal loads and stores. (#232171)
loads/stores with non-temporal metadata for types 1: float point
scalable length vector or 2: float point fixed length wider vectors with
sve-vector-length bigger than 128 get error:
```
LLVM ERROR: Cannot select: t7: nxv2f32,ch = masked_load<(non-temporal load unknown-size from %ir.a, align 1)> t0, t2, poison:i64, t4, poison:nxv2f32
```
This patch fixes above error:
1: if the type has related non-temporal load/store instructions, select
the instructions
2: if the type has no non-temporal load/store instructions, select the
normal load/store instread of crash
NAS-144873 / 28.0.0-BETA.1 / Fix `become_readonly` in token sessions (by themylogin) (#20054)
`become_readonly` updates `app.authenticated_credentials.user` changing
its privilege.
`TokenSessionManagerCredentials` maintain reference to its parent
credentials user, so when `become_readonly` is called in a token
session, the parent session is also affected.
Additionally, `TokenSessionManagerCredentials` ignored its assigned
`allowlist` and reported parent session roles.
Original PR: https://github.com/truenas/middleware/pull/20048
Co-authored-by: themylogin <themylogin at gmail.com>
[mlir][vector][tensor] Scalarize select conditions from broadcast and splat (#235593)
## Summary
Canonicalize `arith.select` with a mask produced by `vector.broadcast`
of a scalar `i1`, or by `tensor.splat`, to a select on the scalar
condition.
```python
%mask = vector.broadcast %p : i1 to vector<4xi1>
%result = arith.select %mask, %a, %b : vector<4xi1>, vector<4xi32>
```
becomes:
```python
%result = arith.select %p, %a, %b : vector<4xi32>
```
[23 lines not shown]
kea: add daemon supervisor support
Kea differs from the other supervised services because keactrl is a short-lived dispatcher which starts several independent daemons in the background. Supervising keactrl itself would only restart the dispatcher, risk duplicate start attempts, and leave daemon(8) unable to distinguish an intentional child stop from a failure.
Extend the shared supervisor helper with reusable profile dispatch. The Kea rc.d wrapper obtains each component command, configuration and enabled state from keactrl.conf, then starts the profile either through daemon(8) or through the native keactrl profile command. Stop checks every supervisor before delegating to the native script, so changing the option cannot leave a supervisor behind; native reload and status continue to use the Kea PID files.
Expose Restart on failure independently for DHCPv4, DHCPv6, DHCP DDNS and the Control Agent. Unchecked profiles retain their existing lifecycle, supervised and native profiles can be mixed, and the default configuration remains unchanged.
[AArch64] Add .cfi_non_hint_pauth_frame when PAuth_LR instructions used for signing (#233885)
The .cfi_set_ra_state directive indicates whether the value of PC was used
as a diversifier for return address signing. However, it is not sufficient
to distinguish whether hint-space instructions were used.
For example, when PSTATE.PACM is 1, then the PACIASP instruction is extended
to take the PC as an additional diversifier. This means that the hint-space
sequence PACM; PACIASP may produce the same result as the FEAT_PAUTH_LR
instruction PACIASPPC.
However, if PACM has a trivial implementation and does not affect PSTATE.PACM,
the sequences will give different results [1].
If FEAT_PAuth_LR instructions were used to sign the return address, the
CFI directive .cfi_non_hint_pauth_frame is emitted for the frame and the
'N' character will be added to the CIE augmentation string [2]. Libunwind
uses this information to recover the correct sequence of instructions for
authentication which matches signing (e.g. PACM; AUTIA1716 or AUTIA171615).
[2 lines not shown]
[AArch64][llvm] Fix incorrect diagnostic (index/immediate in simm9)
Improve the error message in the simm9 diagnostics and use the word
'immediate' instead of 'index'. This was noticed when creating the
CFLT instructions for Armv9.8-A, but would have caused a lot of
unrelated churn if merged as part of that change.
Co-authored-by: Martin Wehking <martin.wehking at arm.com>