Age | Commit message (Collapse) | Author |
|
to avoid possible use-after-free references when swapping ids in threaded
processes. "Do I have the right creds?" checks are always made with the
threads creds.
Inspired by FreeBSD and NetBSD
"right time" deraadt@
|
|
|
|
ok miod@
|
|
|
|
ok mpi@ yuo@
|
|
interrupt is routed through the ISA PIC, the interrupt is edge-triggered
(despite PCI interrupts being level-triggered).
Attempt to recognize this and correctly setup the PIC ELCR register to `edge'.
This allows ES40 systems (and maybe others, but apparently all the other alpha
systems with on-board M5237 correctly route its interrupt as a PCI interrupt)
to reliably boot multiuser without suffering from USB interrupt storms (this is
especially noticeable when using glass console which, unlike serial console,
does not trigger other interrupts to give other devices a chance to run).
However, this is not enough yet to allow for proper USB device usage; your
mileage may vary.
Tested by bluhm@ and me. Putting it early in the release cycle so that
regressions on other systems, if any, can hopefully get noticed soon enough.
|
|
This should make bus_dmamap_load(9) and bus_dmamap_unload(9) "mpsafe".
As a bonus this gets rid of a potential memory allocation in the IO path.
ok miod@
|
|
Be a bit cynical about firmware fitting, of course..
ok jmatthew
|
|
struct ucred; struct process then directly links to the ucred
Based on a discussion at c2k10 or so before noting that FreeBSD and
NetBSD did this too.
ok matthew@
|
|
ok dlg@ mpi@ deraadt@
|
|
Tweak the handling of ktrace EMUL when changing ktracing: only
generate one per process (not one per thread) and pass the correct
proc pointer down to the VFS layer. Permit generating of NAMI and
CSW records inside ktrace(2) itself.
ok deraadt@ millert@
|
|
testing help mpi@
|
|
|
|
we block all interrupts that can grab the kernel lock. The simplest way to
achieve this is to make sure mutexes always raise the ipl to the highest
level that has interrupts that grab the kernel lock. This will allow us
to have "mpsafe" interrupt handlers at lower priority levels.
No change for non-MULTIPROCESSOR kernels.
ok miod@
|
|
native size, so eliminate the #defines.
ok miod@
|
|
|
|
"mainbus" device. this breaks when mpath is enabled because it
attaches before mainbus and therefore takes the head position.
have autoconf provide device_mainbus() which looks up mainbus_cd,
and use that instead.
discussed with deraadt who just wants mpath stuff to move forward
despite there being many ways to shine this particular turd.
|
|
|
|
namespace, so stop changing behavior when it's #defined
ok beck@ krw@
|
|
|
|
ok miod@
|
|
are having trouble, dejavu from sparc64 when we hit multiple-bus-master
iic machines using this chipset. In that case, it was chip read/write PCI
timeouts, at the moment we do not know. Future work would be to figure
this out and re-enable this.
ok miod.
|
|
|
|
|
|
qle in GENERIC on i386, amd64 and sparc64, where it's reasonably well tested
and likely to be useful.
requested by deraadt@ and kettenis@, ok dlg@
|
|
unconditional call in machdep.c!boot(). Except that the cpp conditional
enabling its use was not in machdep.c's scope, so this function was never
called. Ouch.
Remove it from boot() and grow a ca_activate method to the sio(4/alpha) device,
which will take care of invoking sio_intr_shutdown() if DVACT_POWERDOWN.
|
|
|
|
code paths which can be run from ipi handlers, to avoid running soft interrupt
handlers if lowering ipl to 0. Soft interrupts will be processed upon returning
from the ipi interrupt anyway.
|
|
kernel lock held.
|
|
Similar to what other platforms do.
|
|
In MP kernel, replace a TOCTTOU-vulnerable assert with a ``loop until we have
achieved our goals'' logic.
|
|
|
|
|
|
entries per processor, don't bother using a pool and allocate the job entries
statically, and manage a per cpu free entries queue in addition to the in-use
queue. This avoids corrupting memory...
|
|
|
|
No functional change.
|
|
entering ddb. No change for !MP_LOCKDEBUG kernels.
|
|
give dire kernel panics a better chance to reach the SRM.
|
|
and printing the same traceback line several times.
|
|
output.
|
|
<machine/pmap.h> where it belongs, and compensate in <uvm/uvm_extern.h>
by including <uvm/uvm_pmap.h> before <uvm/uvm_page.h>. Tested on all
MACHINE_ARCH but amd64 and i386 (and hppa64).
|
|
|
|
MULTIPROCESSOR kernels, instead of IPL_NONE; they need to be ipi-safe until
proc_trampoline_mp() runs, which will also take care of lowering the ipl
to IPL_NONE.
One less race in the MP kernel, unfortunately a few more to go...
|
|
will boot multiuser, but will deadlock under load, and I can't find my
mistake yet.
|
|
|
|
libkern srandom() API since it is not suitable for this use.
ok kettenis miod
|
|
pte protection masks, as initialized in alpha_protection_init(), set PG_FOE
by default when VM_PROT_EXECUTE is not set.
Also, change pmap_emulate_reference() to only clear PG_FOE if the affected
pte has executable permission.
This allows various pmap_pte_exec() checks (added to explicitely set PG_FOE)
to be removed.
All tests of regress/sys/kern/noexec now reliably pass on EV5. EV6 systems
still see spurious (but no longer 100% reproduceable) failures of the `catch
a signal' tests, which is likely caused by the effect of mprotect() removing
execute permission not taking effect correctly, despite PAL IMB being issued
(and no, this is not caused by the previous pmap_changebit() change), to be
investigated.
|
|
only have to sync the I-stream when the mapping is removed or changed,
and since the I-stream is fetch-only, changing protection bits does
not constitute changing the mapping (the VA->PA translation is still
the same).
From NetBSD
|
|
adapted from a long gone FreeBSD.
|
|
|