Age | Commit message (Collapse) | Author |
|
machdep.lidaction=0 # do nothing
machdep.lidaction=1 # suspend
machdep.lidaction=2 # hibernate
lidsuspend is just an alias for lidaction, so if you change one, the
other one will have the same value. The plan is to remove
machdep.lidsuspend eventually when people have upgraded their
/ets/sysctl.conf.
discussed with deraadt, who came up with the new MIB name
no objections mlarkin
ok stsp halex jcs
|
|
|
|
- FORK_THREAD handling is a totally separate function, thread_fork(),
that is only used by sys___tfork() and which loses the flags, func,
arg, and newprocp parameters and gains tcb parameter to guarantee
the new thread's TCB is set before the creating thread returns
- fork1() loses its stack and tidptr parameters
Common bits factor out:
- struct proc allocation and initialization moves to thread_new()
- maxthread handling moves to fork_check_maxthread()
- setting the new thread running moves to fork_thread_start()
The MD cpu_fork() function swaps its unused stacksize parameter for
a tcb parameter.
luna88k testing by aoyama@, alpha testing by dlg@
ok mpi@
|
|
leaving out the size, so that
ELFNAME2(exec,makecmds)
becomes
exec_elf_makecmds
instead of
exec_elf{32,64}_makecmds
and then delete the ELFNAME2() and ELFNAMEEND() macros.
Move the prototypes for functions local to exec_elf.c to there from
exec_elf.h.
Simplify the SMALL_KERNEL conditionals around the ELF coredump code.
Change exec_conf.c to use the size-generic names and macros
Remove exec_elf{32,64}.c and just build exec_elf.c; delete the
_KERN_DO_ELF and _KERN_DO_ELF64 #defines.
ok jca@, encouragement from deraadt@ and tom@
|
|
OK deraadt@ phessler@ mpi@
|
|
struct proc to struct process.
ok deraadt@ kettenis@
|
|
has a proper pmap_collect() implementation, and the current
uvm_swapout_threads() code does not need other MD interfaces.
OK miod@
|
|
|
|
|
|
the page dirty. This lets the system avoid an extra TLB modify fault
because the TLB mapping now allows writes immediately.
Noticed by miod@
|
|
|
|
by adding another level to page directories. This improves ASLR and
complements W^X added earlier on some systems, giving a notable update
to the architecture's security. Besides, there is now more room for
running tasks that hog memory.
Testing help from deraadt@ and fcambus@.
Platforms tested: loongson, octeon, sgi/IP27 and sgi/IP30
(IP30 also with 4KB pages).
|
|
Tested on EdgeRouter Pro, and Shasta.
OK mpi@
|
|
add CN70xx/CN71xx.
|
|
OK visa@
|
|
|
|
|
|
register on Loongson 2. This causes a boot failure on LS2 because
the CPU does not implement the register. Disable the code on LS2
similarly to mips64 pte.h.
Yeelong boot hang reported and fix tested by matthieu@
|
|
Feedback from miod@
|
|
without it.
|
|
that percpu data areas get allocated properly on mips64 platforms. It is
too late to set the value during launch of secondary CPUs.
ok jasper@ kettenis@ dlg@
|
|
powerpc: rename second argument of pmap_proc_iflush() to match other archs
ok kettenis@
|
|
ok kettenis@
|
|
kernel has to learn a new trick in order to use TLB RI/XI on 3A2000.
|
|
Build testing assistance from deraadt@
|
|
Add sysctl kern.allowkmem (default 0) which controls the ability to open
/dev/mem or /dev/kmem at securelevel > 0. Over 15 years we converted 99%
of utilities in the tree to operate on sysctl-nodes (either by themselves
or via code hiding in the guts of -lkvm).
pstat -d and -v & procmap are affected and continued use of them will
require kern.allowkmem=1 in /etc/sysctl.conf. acpidump (and it's
buddy sendbug) are affected, but we'll work out a solution soon.
There will be some impact in ports.
ok kettenis guenther
|
|
|
|
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
|
|
loads on all systems as the TLB code does not need sign extension.
|
|
on a guess how much memory a typical machine has. If the value is
too high, users may run out of kernel memory. Then we will have
to adjust this again.
OK claudio@ deraadt@
|
|
from PMON2000 and has not been enabled on OpenBSD.
Suggested by and ok miod@ (after seeing a quad_t cleanup patch of mine)
|
|
that support the Execute-Inhibit exception. This makes user space W^X
effective on Octeon Plus and later Octeon versions.
Feedback from miod@, thanks!
No objection from deraadt@
|
|
|
|
|
|
sigtramp page, so that it will generate a nice kernel fault if touched.
While here, move most of the sigtramps to the .rodata segment, because
they are not executed in the kernel.
Also some preparation for sliding the actual sigtramp forward (will need
some gdb changes)
ok mlarkin kettenis
|
|
ok guenther kettenis
|
|
pmap_enter(9), pmap_remove(9) and pmap_page_protect(9) should be
safe to use without the kernel lock.
No objection from deraadt@
|
|
inside the sigcontext. sigreturn(2) checks syscall entry was from the
exact PC addr in the (per-process ASLR) sigtramp, verifies the cookie,
and clears it to prevent sigcontext reuse.
not yet tested on landisk, sparc, *88k, socppc.
ok kettenis
|
|
|
|
the local TLB and add pmap_shootdown_page() for invalidating remote
TLBs. Where the code previously updated a remote TLB entry, the code now
issues a remote invalidation, like in architectures with a
hardware-managed TLB. This eases work in the MP land because
invalidations do not need to strictly follow the order of page table
updates.
Almost as a side effect, pmap_emulate_modify() no longer touches remote
TLBs. It is no use to force a TLB D bit on other CPUs because they might
not need it. Moreover, a shootdown IPI probably has a higher overhead
than a local TLBModified exception.
|
|
|
|
making a page executable. This prevents some icache inconsistencies that
could arise when a process modifies its code pages and begins executing
them while switching between CPUs. These inconsistencies caused process
crashes on multiprocessor IP27/IP30 systems under load.
Crashes reported by deraadt@
Feedback from Miod, thanks!
|
|
all the local ones to ``nticks''.
ok stefan@, deraadt@
|
|
For coherency with other archs and in order to use it in MI code.
ok visa@, tobiasu@
|
|
from Michal Mazurek, ok deraadt@
|
|
|
|
The goal is to include it in the list of functions that must not be
instrumented. All ddb(8) functions should be in this list and have
their names start with 'db_'.
ok visa@, deraadt@
|
|
|
|
|
|
non-PMAP_DIRECT systems due to lock recursion.
|