Stop using non-standard UID_MAX and GID_MAX because a variety of code
uses inclusive comparisons such that the UINT_MAX value aliases on top
of -1 and causes issues. First instance of this reported by Acts1631.
joint work with millert
Stop using non-standard UID_MAX and GID_MAX because a variety of code
uses inclusive comparisons such that the UINT_MAX value aliases on top
of -1 and causes issues. First instance of this reported by Acts1631.
joint work with millert
Stop using non-standard UID_MAX and GID_MAX because a variety of code
uses inclusive comparisons such that the UINT_MAX value aliases on top
of -1 and causes issues. First instance of this reported by Acts1631.
joint work with millert
Do not write multiple assignment of the same value to multiple cmmu registers
as nested assignment in a single statement.
This used to work in the gcc 2 days, but from gcc 3 onwards, because these
registers are declared volatile, this caused register reloads to propagate
the assignment value.
This had been noticed and fixed in arch/luna88k/luna88k/machdep.c 1.135, but
the similar constructs in this file were missed.
Noticed by tsutsuii at netbsd
Do not limit kernel-mode cmmu fault handling to segment and page faults,
there could be write protection faults as well.
The CMU Mach code did not have such a restriction, it had been added by
Nivas while doing the original mvme88k port.
The logic is now the same for kernel and userland.
Noticed by tsutsui at netbsd.
Adjust graceful restart timer handling for multi-AFI/SAFI sessions
The timer is global for all AFI/SAFI but the first EoR would clear the timer
which then can result in stale routes. Instead stop clearing the timer and
use a new flag CAPA_GR_FINISHED. The code no longer clears CAPA_GR_RESTARTING
on EoR but instead sets CAPA_GR_FINISHED and so when the timer fires the
loop over all AFI/SAFI pairs will will skip all the ones that only have
CAPA_GR_RESTARTING set (but no CAPA_GR_FINISHED).
On top of this improve parse_capabilities() by respecting that only the last
instance of the capability matters. Also make sure capa_neg_calc() does not
write anything to capa.neg.grestart if the capability is disabled on our
end.
Reported by N0zoM1z0
OK tb@
change some busy wait delays to tsleep
Previously tsleep was avoided in usleep_range(), drm_msleep() and
fsleep() on precision grounds. That shouldn't be a problem after
kern_synch.c rev 1.225.
This change prevents inteldrm GuC initialisation errors seen on
Alder Lake by daniel@ and rsadowski@
Problem found by and initial patch from daniel@
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
rpki-client: check all !TA certs for resource coverage
For historic reasons, EE certs did not have their resources checked for
coverage in the parent. Since we have the exception of EE certs that need
special casing for inheritance (MFT/TAK/GBR), this can be done at the end
of valid_x509(). The check is not expensive since this only goes up as
many issuers as needed to hit explicit resources.
Rename the misnamed valid_cert() to valid_resources() for lack of a better
idea and call it from the end of valid_x509(). Remove the remaining calls
since they're now redundant, and make valid_resources() static.
ok job
uaudio: Make sure the reported format and channels are usable
A bogus device may trigger a division by zero if the number of
channels or sample size are 0. Similarly, memory corruption may occur
if the reported sample size is larger than four bytes.
Found by Acts1631 <acts1631kjv at proton.me>, who proposed a diff that
inspired this fix. Thanks!
The MTP firmware needs to stay around after "loading" it; the comprocessor
that runs the firmware seems to reference the firmware image that we pass
it directly instead of making its own copy. This fixes a regression on
laptops with a dockchannel touchpad after the recent changes to apldart(4).
ok tobhe@
As well as tracking modified (dirty) lines during a synchronized update,
also track scrolled lines. This means they can be scrolled as one
instead of forcing each line to be redrawn - much less expensive for a
very common operation. From Ben Maurer in GitHub issue 5611.
rpki-client: match CRLDP and referring Manifest for all !TA certs
Now that crl->mftcrldp is always set, we can move the comparison of
cert->crl with crl->mftdp into valid_x509() so that all certs which
come through here must satisfy this requirement. While TA certs are
not validated here, add a check for cert->purpose to avoid potential
NULL accesses.
ok job