Age | Commit message (Collapse) | Author |
|
|
|
- uvm_km_alloc_poolpage1 has its own spl protection, no need to add
additional layer around it.
|
|
|
|
|
|
- Make sure that extent_register is not called more than once on an extent.
|
|
- show timeout_todo in the ddb command.
|
|
|
|
This can happen when debug_malloc_init calls pool_init which calls
malloc (because the kernel is built with POOL_DIAGNOSTIC) which in turn
calls debug_malloc and debug_malloc just happens to trigger on all memory
allocations.
This allows us to run a kernel debugging _all_ allocations.
|
|
|
|
|
|
(see http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/32827).
itojun@ ok
|
|
should not be required, and may be violated soon. With two fixes art
pointed out. ok art@
|
|
|
|
it to properly init filedescs for proc0.
|
|
|
|
|
|
|
|
The inheritace is implemented by setting the default vnodeop to a
bypass op that repeats the operation on the spec/fifo vnodeop vector.
The overhead of one extra indirect function call is worth the cleanup
and improved correctness.
This actually solves a few bugs where some vnode ops were missing from
some vectors (like kqfilter or revoke). (and even more on the ubc
branch).
Inspired by the same thing done in FreeBSD.
|
|
Also uvm_map returns KERN_* codes that are directly mapped to
errnos, so we can return them instead of doing some attempt to
translation.
drahn@ "I see no problem" pval@ "makes sense"
|
|
been fully initialized. Otherwise the scheduler and other things can
accidentally stumble into semi-initialized processes and strange things
can happen. This also requires us to do systrace attachment a bit later.
Debugging help from fgs@
|
|
|
|
partly on the Linux emul code and FreeBSD versions.
We need these for Linux, FreeBSD, and HP-UX emulation.
Also change sys_setreuid() and sys_setregid() to use uid_t and gid_t
respectively.
|
|
uvm_unmap, uvm_deallocate and a few other functions.
Simplifies some code and reduces diff to the UBC branch.
|
|
That gives us the advantage of not being the active address space when
freeing the mappings in the pmap, which can lead to expensive TLB
flushes on some architectures.
plus some minor cleaning.
|
|
One relevant change: round up pool element size to the alignment.
VS: ----------------------------------------------------------------------
|
|
|
|
|
|
First we check for running out of processes (nprocs variable) before we
continue with the fork, then we do various calls that might sleep (and
allow other forks to start and pass that check), then we increase that
variable. This could allow processes to be created past the limit.
Second is that we don't decrease the the process count for this uid
if the stack allocation fails. So a user could run out of processes
he's allowed to run without actually having them.
miod@ ok
|
|
|
|
|
|
gcc has the nice feature of optimizing various common constructs into
more optimal ones, inlining various calls, etc. The problem with that
is that it assumes that we have a proper libc backing us. We really
don't want to loose all those features by defining -ffreestanding and
right now there is no way to just disable some of them, so we have to
make the kernel more libc-like in some aspects to make it work with
newer gcc.
rename putchar to kputchar because it was nothing like libc putchar (and
only internal to this function). Implement dummy putchar and puts (not
prototyped outside this file).
|
|
give us pages. PR_NOWAIT most likely means "hey, we're coming from an
interrupt, don't mess with stuff that doesn't have proper protection".
- pool_allocator_free is called in too many places so I don't feel
comfortable without that added protection from splvm (and besides,
pool_allocator_free is rarely called anyway, so the extra spl will be
unnoticeable). It shouldn't matter when fiddling with those flags, but
you never know.
- Remove a wakeup without a matching tsleep. It's a left-over from
some other code path that I've been investigating when reworking the
pool a while ago and it should have been removed before that commit.
deraadt@ ok
|
|
|
|
Diff generated by Chris Kuethe.
|
|
|
|
the order doesn't matter at this moment but could be problematic
if 2 tags of the same type are ever added.
ok jason@, dhartmei@, angelos@
|
|
It triggers on ppc and while the check itself is correct, it's better to
fix the bug before breaking peoples systems.
|
|
|
|
|
|
|
|
ok deraadt@ and art@
|
|
|
|
Prevent two localhost crashes with proc filters.
- don't send NOTE_SIGNAL to exiting processes.
- null dereference on error condition.
from Peter Werner <peterw at ifost.org.au>
deraadt@ ok
|
|
- don't send NOTE_SIGNAL to exiting processes.
- null dereference on error condition.
from Peter Werner <peterw at ifost.org.au>
deraadt@ ok
|
|
|
|
You mark one section with VMCMD_BASE and the rest are marked RELATIVE.
Use that to load ELF interpreter correctly in all cases.
Inspired by NetBSD. Great debugging help from drahn@
deraadt@ ok
|
|
ok deraadt@ art@
|
|
Make sure that we don't free random memory when that happens.
From <j at pureftpd.org>
deraadt@ ok
|
|
noted by tdeval@
|
|
|