Age | Commit message (Collapse) | Author | |
---|---|---|---|
2002-02-11 | Big fixup of fd passing. It now works, even on sparc64. | Artur Grabowski | |
Some parts from NetBSD, but with big modifications. | |||
2002-02-11 | In {send,recv}msg allow zero sized message. We can have control data. | Artur Grabowski | |
2002-02-09 | Protect the whole sys_fnctl with one big FREF/FRELE pair. | Artur Grabowski | |
2002-02-08 | Require a FREFd file in dofilewrite{,v}. | Artur Grabowski | |
2002-02-08 | require a FREFd fp in dofilereadv. Fix some comments. | Artur Grabowski | |
2002-02-08 | simplify sys_pread a bit. | Artur Grabowski | |
2002-02-08 | Add a comment about an obscure behavior in dup2(2). | Artur Grabowski | |
2002-02-08 | Add a slightly redundant arg to finishdup that's the struct file * | Artur Grabowski | |
present on the 'old' descriptor. It's not really necessary because we can easily find it with 'fp = p->p_fd->fd_ofiles[old];', but this allows us to require that the fp is FREFed without violating all rules of good taste and all callers have to do fd_getfile on it anyway (to detect larval and closing files. FREF the fp in all callers. | |||
2002-02-08 | No more need for ffree. Since it's hard to use it safely, remove it. | Artur Grabowski | |
2002-02-08 | - Rename FILE_{,UN}USE to FREF and FRELE. USE is a bad verb and we don't have | Artur Grabowski | |
the same semantics as NetBSD anyway, so it's good to avoid name collissions. - Always fdremove before freeing the file, not the other way around. - falloc FREFs the file. - have FILE_SET_MATURE FRELE the file (It feels like a good ortogonality to falloc FREFing the file). - Use closef as much as possible instead of ffree in error paths of falloc:ing functions. closef is much more careful with the fd and can deal with the fd being forcibly closed by dup2. Also try to avoid manually calling *fo_close when closef can do that for us (this makes some error paths mroe complicated (sys_socketpair and sys_pipe), but others become simpler (sys_open)). | |||
2002-02-05 | Zero-ize ext even if it has a free method defined. | Angelos D. Keromytis | |
2002-02-05 | Do range check on SO_LINGER, closes pr#2375. art@ ok | Thomas Nordin | |
2002-02-05 | panic if a read-only mbuf is given to m_zero() --- from art@openbsd.org | Angelos D. Keromytis | |
2002-02-05 | Fix m_zero() yet again -- yesterday's fix wasn't sufficient. | Angelos D. Keromytis | |
2002-02-05 | Add counting of temporary references to a struct file (as opposed to references | Artur Grabowski | |
from fd tables and other long-lived objects). This is to avoid races between using a file descriptor and having another process (with shared fd table) close it. We use a separate refence count so that error values from close(2) will be correctly returned to the caller of close(2). The macros for those reference counts are FILE_USE(fp) and FILE_UNUSE(fp). Make sure that the cases where closef can be called "incorrectly" (most notably dup2(2)) are handled. Right now only callers of closef (and {,p}read) use FILE_{,UN}USE correctly, more fixes incoming soon. | |||
2002-02-05 | Workaround for VM_MAXUSER_ADDRESS not being page aligned on sparc64. | Artur Grabowski | |
2002-02-04 | Also, cleanup any external buffers first (paranoid). | Angelos D. Keromytis | |
2002-02-04 | Revision 1.37 was borked... This time, fix the casts and address the | Jason Wright | |
void * arithmetic problem correctly in m_zero() | |||
2002-02-04 | Cleanup mountroot-related definitions. | Miod Vallat | |
2002-02-04 | Add some comments documenting why we use fd_ofiles instead | Artur Grabowski | |
of fd_getfile in some places. Also, get rid of the check for old == new in dupfdopen and document why the semantics of fd_getfile make it unnecessary. | |||
2002-02-04 | Don't ffree the newly allocated file before calling dupfdopen. | Artur Grabowski | |
In some cases that could cause dupfdopen->fd_getfile to access freed memory setting fd_ofiles[fd] to NULL is not a solution because that would cause a race condition. Free the new file after dupfdopen and use closef (because it will be necessary in the future. XXX - consider more cleanup of the code around dupfdopen. | |||
2002-02-02 | Reorganize sys_fcntl to make future changes easier. | Artur Grabowski | |
2002-02-02 | Be more consistent about using fd_getfile where it matters. | Artur Grabowski | |
2002-02-01 | Don't MALLOC/FREE with variable size. | Artur Grabowski | |
2002-02-01 | Allocate kqueues with pool. | Artur Grabowski | |
2002-02-01 | Don't MALLOC with variable size. | Artur Grabowski | |
2002-01-31 | Ignore signals if/when we are exiting. | Tobias Weingartner | |
Prevents a hang in the NFS code when dumping core and pressing ^C, etc. ok art@ | |||
2002-01-30 | Move SET/CLR/ISSET macros to param.h. fgsch@ and millert@ ok | Thomas Nordin | |
2002-01-30 | Add proc0 to the PIDHASH table. art@ ok | Thomas Nordin | |
2002-01-29 | Honor the printf-like function argument in pool_printit(), instead of | Miod Vallat | |
using printf(). Makes ddb sessions more fruitful. | |||
2002-01-28 | GC PR_STATIC and PR_MALLOCOK. | Artur Grabowski | |
PR_MALLOC wasn't used at all in the code and PR_STATIC was missing pieces and should be solved with allocators. | |||
2002-01-25 | Add a drain hook to each pool. This hook is called in three cases. | Artur Grabowski | |
1. When a pool hit the hard limit. Just before bailing out/sleeping. 2. When an allocator fails to allocate memory (with PR_NOWAIT). 3. Just before trying to reclaim some page in pool_reclaim. The function called form the hook should try to free some items to the pool if possible. Convert m_reclaim hooks that were embedded in MCLGET, MGET and MGETHDR into a pool drain hook (making the code much cleaner). | |||
2002-01-25 | poolify pcreds. | Artur Grabowski | |
2002-01-25 | Convert plimit allocations to pool. | Artur Grabowski | |
2002-01-25 | kernel printfs triggerable by a simple mistake in userland are just wrong. | Artur Grabowski | |
2002-01-23 | move mb_map allocation to mbinit() | Artur Grabowski | |
2002-01-23 | move definition of mb_map from zillions of machdep.c to uipc_mbuf.c | Artur Grabowski | |
2002-01-23 | Allocate rusage, pgrp, ucred and session with pool. | Artur Grabowski | |
2002-01-23 | Kill PR_FREEHEADER, not used anymore and confusing. | Artur Grabowski | |
2002-01-23 | Pool deals fairly well with physical memory shortage, but it doesn't deal | Artur Grabowski | |
well (not at all) with shortages of the vm_map where the pages are mapped (usually kmem_map). Try to deal with it: - group all information the backend allocator for a pool in a separate struct. The pool will only have a pointer to that struct. - change the pool_init API to reflect that. - link all pools allocating from the same allocator on a linked list. - Since an allocator is responsible to wait for physical memory it will only fail (waitok) when it runs out of its backing vm_map, carefully drain pools using the same allocator so that va space is freed. (see comments in code for caveats and details). - change pool_reclaim to return if it actually succeeded to free some memory, use that information to make draining easier and more efficient. - get rid of PR_URGENT, noone uses it. | |||
2002-01-21 | Mount points must fit in MNAMELEN, not MAXPATHLEN so use copyinstr() | Todd C. Miller | |
to detect whether the path passed in from userland is too long. Based on a patch from peterw AT ifost.org.au. | |||
2002-01-20 | When a process is exec:ing mark it with a flag. Check that flag in ptrace | Artur Grabowski | |
and procfs (and possibly more places in the future) and simply refuse to fiddle with the execing process. This is an ugly hack, but this far we haven't been successful in creating a race-free exec. | |||
2002-01-19 | If handler for SIGCHLD is SIG_IGN, reset to SIG_DLF. This is consistent | Todd C. Miller | |
with our handling of SA_NOCLDWAIT as well as other operating systems. From FreeBSD. | |||
2002-01-18 | Resource map code is not used anymore. Long live the extent code! | Miod Vallat | |
2002-01-18 | record ctime for the mountpoint, mount time or last mount update; art@ ok | Michael Shalayeff | |
2002-01-16 | Don't include <sys/map.h> when you don't need what's in it. | Miod Vallat | |
2002-01-12 | Don't cast return value from splx to (void) because splx doesn't return ↵ | Artur Grabowski | |
anything. | |||
2002-01-10 | Fix a locking error in pool_drain. Misc cleanup. | Artur Grabowski | |
From NetBSD. | |||
2002-01-10 | - unbreak POOL_DIAGNOSTIC. | Artur Grabowski | |
- use ltsleep instead of simple_unlock ; tsleep | |||
2002-01-10 | No more need for local define of LOCK_ASSERT. | Artur Grabowski | |