Age | Commit message (Collapse) | Author |
|
ok and improvements jmc@
|
|
- file descriptor table becomes the owner of the lock instead of the proc.
- When grabbing the lock, we check if the fd hasn't changed under our
feet, this is more or less impossible to solve without a hack like
this. I've banged my head against the wall, I figured out a solution,
but implementing it correctly would cost me 12 gray hairs. Screw it,
this is ugly, but it works.
- Wait until usecount drains before releasing the posix lock in closef.
- Add missing FREF/FRELE to sys_flock
- keep the pid in the flock struct instead of abusing the fact that we
used to use the proc as the lock owner.
Pointed out by and discussed with Al Viro, big thanks.
miod@ ok
|
|
ok blambert@
|
|
malloc flag, does the same thing.
use it in a few places.
OK tedu@, "then go ahead. and don't forget the manpage (-:" miod@
|
|
replace an hard coded value with M_WAITOK
ok krw@
|
|
it's a good idea to use atomic.h operations on it. This mechanic
change updates all bit operations on p_flag to atomic_{set,clear}bits_int.
Only exception is that P_OWEUPC is set by MI code before calling
need_proftick and it's automatically cleared by ADDUPC. There's
no reason for MD handling of that flag since everyone handles it the
same way.
kettenis@ ok
|
|
kern_descrip.c change ok deraadt
|
|
without breaking into ddb. doubles the size of rwlock [1], but moving
forward this really helps. ok/tested pedro fgsch millert krw
[1 - next person to add a field to this struct gets whipped with a wet noodle]
|
|
ok deraadt
|
|
setuid-script and are attempting to dup is the specific setuid-script
fd via such a pathname; ok tedu pedro millert
|
|
'go for it' deraadt@
|
|
comment entry describes. requires that sys_fpathconf()
lock its vnode.
lots of testing by jolan and myself, ok pedro
|
|
|
|
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.
|
|
|
|
|