summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2002-12-12can now get _ttylist via sysctl; millert okTheo de Raadt
2002-12-11 - Call uvm_km_alloc_poolpage1 directly, no need to go through the macro.Artur Grabowski
- uvm_km_alloc_poolpage1 has its own spl protection, no need to add additional layer around it.
2002-12-11descructive -> destructiveMiod Vallat
2002-12-08compile non-DIAGNOSTIC kernelsTheo de Raadt
2002-12-08 - Use LIST_ macros.Artur Grabowski
- Make sure that extent_register is not called more than once on an extent.
2002-12-08 - Lock the timeout wheel after the diagnostic checks.Artur Grabowski
- show timeout_todo in the ddb command.
2002-12-05Hmm.. I don't think we want the default to be to debug every allocation.Artur Grabowski
2002-12-05Do not use debug_malloc if it hasn't been initialized.Artur Grabowski
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.
2002-12-04No need to exit the process twice. exit1() can't fail.Artur Grabowski
2002-11-27Avoid possible wraparound when checking timeout size; mickey@ OKTodd C. Miller
2002-11-27fix an underflow in socket timeout calculations.Michael Shalayeff
(see http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/32827). itojun@ ok
2002-11-22Allow more than two load sections on ELF executables, this limitDale Rahn
should not be required, and may be violated soon. With two fixes art pointed out. ok art@
2002-11-22Instead of statically allocating filedescs for proc0, use fdinit.Artur Grabowski
2002-11-22Allow fdinit to be called with p == NULL so that we can useArtur Grabowski
it to properly init filedescs for proc0.
2002-11-22repair proc0 rlimit setup for >2GB machinesTheo de Raadt
2002-11-09fix a commentMichael Shalayeff
2002-11-08finishdup: Avoid reference count leak in error case by reordering some code.Artur Grabowski
2002-11-08Implement simple vnodeop inheritance for specfs and fifofs.Artur Grabowski
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.
2002-11-06Eliminate the use of KERN_SUCCESS outside of uvm/Artur Grabowski
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"
2002-10-31Defer pid allocation and making the new process visible until after it'sArtur Grabowski
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@
2002-10-30regen due to addition of [gs]etres[ug]id(2)Todd C. Miller
2002-10-30Implement setresuid(2), getresuid(2), setresgid(2), getresgid(2), basedTodd C. Miller
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.
2002-10-29Since memory deallocation can't fail, remove the error return fromArtur Grabowski
uvm_unmap, uvm_deallocate and a few other functions. Simplifies some code and reduces diff to the UBC branch.
2002-10-29No need to free the address space in exit1(), we'll do that in the reaper.Artur Grabowski
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.
2002-10-27Reduce diff to NetBSD.Artur Grabowski
One relevant change: round up pool element size to the alignment. VS: ----------------------------------------------------------------------
2002-10-22Remove a part that did sneak in that wasn't meant to be commited yet.Artur Grabowski
2002-10-21ANSIArtur Grabowski
2002-10-21Two problems.Artur Grabowski
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
2002-10-15Protect p_priority with splstatclock.Artur Grabowski
2002-10-15Match reality by changing (u_int) -> (int) in comments.Thomas Nordin
2002-10-14Stuff needed for gcc 3.X.Artur Grabowski
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).
2002-10-14- Do not try to drain other pools if PR_NOWAIT and the allocator can'tArtur Grabowski
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
2002-10-13Remove more '\n's from panic() statements. From Chris Kuethe.Kenneth R Westerback
2002-10-12Remove more '\n's from panic() statements. Both trailing and leading.Kenneth R Westerback
Diff generated by Chris Kuethe.
2002-10-10constify a few strings. various@ okArtur Grabowski
2002-10-10preserve the m_tag order in m_tag_copy_chain() as originally intended.Kenjiro Cho
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@
2002-10-07Remove a diagnostic check that I added when reorganizing the code.Artur Grabowski
It triggers on ppc and while the check itself is correct, it's better to fix the bug before breaking peoples systems.
2002-10-06Remove some '#if 0' cruft.Artur Grabowski
2002-10-06Move out the execution of vmcmds into a separate function.Artur Grabowski
2002-10-02make it compile w/ DEBUG by syncing w/ exec.h; deraadt@ okMichael Shalayeff
2002-10-02Check for negative values. Inspiration from tedu <grendel@zeitbombe.org>.Thomas Nordin
ok deraadt@ and art@
2002-10-02which is int not u_int so check for negative values. ok deraadt@, art@Thomas Nordin
2002-10-01Oppsie. Missing part from this commit:Artur Grabowski
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
2002-10-01Prevent two localhost crashes with proc filters.Artur Grabowski
- don't send NOTE_SIGNAL to exiting processes. - null dereference on error condition. from Peter Werner <peterw at ifost.org.au> deraadt@ ok
2002-09-24Restore pentium_microtime, testing by henning@, millert@. ok deraadt@Thomas Nordin
2002-09-23Add support for vmcmds that load sections relative to a base section.Artur Grabowski
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
2002-09-18Mark ELF ld.so as VTEXT to prevent the file from being overwritten.Dale Rahn
ok deraadt@ art@
2002-09-18We can jump to the fail: label before shellargp is initialized.Artur Grabowski
Make sure that we don't free random memory when that happens. From <j at pureftpd.org> deraadt@ ok
2002-09-01Oppsie. Remove my debugging code.Artur Grabowski
noted by tdeval@
2002-08-27call ktrnamei() later, after cnp->cn_pnbuf has been made proper; art@ okMichael Shalayeff