Age | Commit message (Collapse) | Author |
|
ok deraadt@ millert@
|
|
testing for quite some time by brad + otto
|
|
|
|
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@
|
|
|
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
it to properly init filedescs for proc0.
|
|
|
|
|
|
|
|
decriptor -> descriptor
authentciated -> authenticated
transmition -> transmission
|
|
|
|
|
|
|
|
pointed out by der Mouse <mouse@Rodents.Montreal.QC.CA>
|
|
functions in sys/compat are left.
|
|
|
|
|
|
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.
|
|
|
|
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)).
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
|
|
(Look ma, I might have broken the tree)
|
|
|
|
any anyone. Every caller of falloc matures the fd when it's usable.
- Since every lookup in the fd table must now check this flag and all of
them do the same thing, move all the necessary checks into a function -
fd_getfile.
|
|
would have to grow the table and fdexpand that grows the table. Since
fdexpand can sleep we have to restart all operations if we have to call
it.
- dup2 changed so that finishdup frees the destination descriptor.
- unp_externalize is a completly rewritten version from NetBSD.
Changes mostly inspired by NetBSD.
|
|
|
|
|
|
so has fdp->fd_cdir = NULL.
From Tertou <TDeval@PrimeOBJ.COM>
|
|
when root filesystem isn't configured yet and some kernel variables can't
be initialized.
From Thierry Deval <TDeval@PrimeOBJ.COM>
|
|
compliant to specification.
costa@ ok.
|
|
|
|
|
|
|
|
Just return EOPNOTSUPP.
|
|
|
|
|
|
|
|
as soo_stat and pipe_stat.
|
|
|
|
|
|
okay art@, millert@
|
|
allocations; art@ ok
|
|
|
|
slightly different fix than in the bug report by
Rob Pickering <rob@syntonet.co.uk>
|
|
http://www.usenix.org/publications/library/proceedings/usenix98/banga.html
|