profil(2): release the dirfd reference, and publish pr_cdir once
Fixes both leaks reported by Acts1631, plus the race that fixing the
first one exposes.
- Take the vnode reference while the file reference is still held, then
FRELE() it.
- Acquire pr_ucred together with pr_cdir, after validation, so an
EBADF/ENOTDIR return cannot leave a cred held with pr_cdir still NULL
- Re-test pr_cdir before publishing to and release the loser's resource
deraadt@ Looks good
Do a prefix re-evaluation if the validation state of a route changes.
The validation state of a route does not change the route evaluation
but if the state changes the result of the outbound filters may change.
Because of this do the same dance we do for the filtered flag and
re-evaluate the prefix.
Move the validation state also into the middle of the re-evaluation dance
even though it is not strictly needed. At least that way it is more
consistent with the rest of the code.
Reported by N0zoM1z0
OK tb@
sys/arm: avoid cache faults on untranslated aliases
An executable PV entry does not establish a usable hardware translation;
for an unreferenced prefaulted page, pmap_enter() can install an L2 PTE
with its access flag clear while leaving the L1 descriptor invalid.
pmap_clean_page() nevertheless uses such aliases for cache maintenance;
during address space teardown, a translation abort can reenter
uvm_fault() while the current thread owns the map write lock, provoking
recursive acquisition of vmmaplk.
Inspect each executable alias's L1 descriptor before issuing cache
maintenance by virtual address; if it is invalid, use
cpu_idcache_wbinv_all() and return, since the operation covers the
remaining aliases. This preserves data cache cleaning and instruction
cache invalidation without translating the unusable address; aliases
with valid L1 descriptors retain the existing per page operation.
This idea follow discovered discussion in linux-arm-kernel:
https://lists.infradead.org/pipermail/linux-arm-kernel/2018-January/556458.html
[4 lines not shown]
iked: Remove invalid SPI size 8 in delete path
DELETE does not provide the SPI of the IKE SA to be deleted. It
is the IKE SA that is used to send the DELETE notify. Therefore,
SPI size 8 is not valid. With the previous change, such DELETE
notifies will be dropped. Therefore remove the now dead code.
See https://www.rfc-editor.org/rfc/rfc7296.html#section-3.11
ok markus@
vmm(4): Do not access raw PSL_I
With SEV-ES enabled we can not directly access PSL_I in RFLAGS.
Instead we have to use the GUEST_INTR_MASK bit in vmcb->v_intr_shadow
which indicates the actual PSL_I state.
ok dv@ mlarkin@
rpki-client: rename valid_x509() to valid_cert()
x509 usually indicates an X509 * argument and cert a struct cert *.
This got changed in the surgery today and valid_cert() is now free,
so we can fix this.
ok claudio
update to darktable-5.6.1, from Josh Grosse with tweaks from Brad
I have hit some double-free crashes at exit, but have the same with the
previous version too.