NetBSD/sys/kern
sommerfe 098b6f8e8a Disallow descriptor-passing of descriptors which are open on
directories which aren't under the recipient's root.

Clean up of many error conditions involving descriptor passing, to
eliminate infinite loops, panics, premature garbage collection of
sockets, and descriptor leaks:
 - Avoid letting unp_gc() see descriptors with a refcount of zero by
removing them from the socket's queue before releasing them.
 - Avoid socket leak in PRU_ABORT (this will also gc descriptors queued
on a not-yet accepted socket when the accepting socket goes away).
 - Put in block comment explaining how unp_gc() should work.
 - Correctly manage unp_defer count so we don't get stuck in an infinite
loop with nothing to do.
 - Don't tie MARK and DEFER bits so closely together.
 - Mark descriptors queued on not-yet-accepted sockets as well.
 - Don't call sorflush on non-socket, it doesn't work very well.
 - Deal with discard of NULL file pointer.
 - Hopefully cause GC to converge faster by only deferring sockets in
unp_mark().
1999-03-22 17:54:38 +00:00
..
exec_aout.c
exec_conf.c Defopt COMPAT_M68K4K. 1999-03-09 21:02:38 +00:00
exec_ecoff.c
exec_elf32.c Use of casts as lvalues is a GNU C extension; rearrange slightly. 1999-02-10 17:03:26 +00:00
exec_elf64.c
exec_elf_common.c update for linux file move. 1998-10-03 20:39:32 +00:00
exec_script.c Modify VOP_CLOSE vnode op to always take a locked vnode. Change vn_close 1999-02-26 23:38:55 +00:00
exec_subr.c
genassym.awk Allow pattern matching for symbol string to handle GCC's output for mips, 1998-11-25 06:10:19 +00:00
genassym.sh
init_main.c This is sort of gratuitous, but... 1999-03-05 07:26:21 +00:00
init_sysent.c Regen files based on changes to syscalls.master, vnode_if.src (latter 1999-03-22 17:13:34 +00:00
kern_acct.c
kern_clock.c schedclk() -> schedclock(), for consistency with hardclock(), statclock(), ... 1999-02-28 18:14:57 +00:00
kern_descrip.c bug fix to fdavail: be consistent about taking per-process descriptor 1999-03-22 17:39:44 +00:00
kern_exec.c Modify VOP_CLOSE vnode op to always take a locked vnode. Change vn_close 1999-02-26 23:38:55 +00:00
kern_exit.c Replace the recent scheduler mods with calls to scheduler_{fork,wait}_hook(), 1999-02-23 02:57:18 +00:00
kern_fork.c Replace the recent scheduler mods with calls to scheduler_{fork,wait}_hook(), 1999-02-23 02:57:18 +00:00
kern_fthread.c
kern_kthread.c #ifdef __STDC__ -> #if __STDC__ 1998-12-22 21:21:36 +00:00
kern_ktrace.c
kern_lkm.c Fix format mismatch which only turns up when building with DEBUG 1999-01-15 22:02:59 +00:00
kern_lock.c Recursive locks were previously only available with LK_CANRECURSE. This 1999-02-28 14:09:15 +00:00
kern_malloc.c avoid math on void *. 1999-01-22 07:55:49 +00:00
kern_ntptime.c
kern_physio.c Use of casts as lvalues is a GNU C extension; rearrange slightly. 1999-02-10 17:03:26 +00:00
kern_proc.c
kern_prot.c COMPAT_xxx option review: add missing opt_compat_linux.h 1998-12-18 14:10:06 +00:00
kern_resource.c
kern_sig.c Don't forget to lower the spl in the error case of sigprocmask 1999-02-13 15:25:51 +00:00
kern_subr.c Use of casts as lvalues is a GNU C extension; rearrange slightly. 1999-02-10 17:03:26 +00:00
kern_synch.c schedclk() -> schedclock(), for consistency with hardclock(), statclock(), ... 1999-02-28 18:14:57 +00:00
kern_sysctl.c Defopt SYSVMSG, SYSVSEM and SYSVSHM. 1998-10-19 22:19:26 +00:00
kern_time.c
kern_xxx.c
kgdb_stub.c
Make.tags.inc Protect the COMM variable with an '.ifmake tags' to stop the long delay 1999-02-12 19:52:30 +00:00
Makefile (mostly) fix kernel tags support. from Frederick Bruckman in pr-6445. 1998-11-15 20:36:30 +00:00
makesyscalls.sh Now that shell has been fixed so that ". filename" does not look at . if . 1999-02-17 18:17:10 +00:00
subr_autoconf.c Enable `device_register()' for the sparc. 1998-12-03 23:50:11 +00:00
subr_disk.c PR kern/7033 (Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>): use 1999-02-22 16:00:01 +00:00
subr_extent.c Fix a thinko in the previous. 1999-02-18 18:52:29 +00:00
subr_log.c
subr_pool.c Make this compile with POOL_DIAGNOSTIC, and add a POOL_LOGSIZE option. 1998-12-27 21:13:43 +00:00
subr_prf.c Fix some printf format problems on Alpha. 1999-02-12 00:46:11 +00:00
subr_prof.c
subr_rmap.c
subr_xxx.c
sys_generic.c
sys_process.c
sys_socket.c
syscalls.c Regen files based on changes to syscalls.master, vnode_if.src (latter 1999-03-22 17:13:34 +00:00
syscalls.conf
syscalls.master Change namei cache to record vnode->(parent,name) entries (for directories). 1999-03-22 17:01:55 +00:00
sysv_ipc.c
sysv_msg.c No need to get definition of "SYSV..." from "opt_sysv.h" because they 1998-10-21 22:24:28 +00:00
sysv_sem.c No need to get definition of "SYSV..." from "opt_sysv.h" because they 1998-10-21 22:24:28 +00:00
sysv_shm.c No need to get definition of "SYSV..." from "opt_sysv.h" because they 1998-10-21 22:24:28 +00:00
tty_conf.c defopt COMPAT_43 1998-12-10 15:07:01 +00:00
tty_pty.c
tty_subr.c
tty_tb.c
tty_tty.c
tty.c
uipc_domain.c Garbage-collect some straggling netimp stuff. 1999-01-14 01:14:01 +00:00
uipc_mbuf.c Garbage-collect `mbutl'. 1999-01-09 22:10:12 +00:00
uipc_proto.c
uipc_socket2.c Do not remove sockets from the accept(2) queue on close. 1999-01-20 09:15:41 +00:00
uipc_socket.c Do remove sockets on so_q0, since select(2) and accept(2) do not (currently?) 1999-01-21 22:09:10 +00:00
uipc_syscalls.c * Due to addition and use of socklen_t, make the socket option and address 1999-02-10 18:02:28 +00:00
uipc_usrreq.c Disallow descriptor-passing of descriptors which are open on 1999-03-22 17:54:38 +00:00
vfs_bio.c GC the B_CACHE bit. 1998-11-09 01:18:34 +00:00
vfs_cache.c Change namei cache to record vnode->(parent,name) entries (for directories). 1999-03-22 17:01:55 +00:00
vfs_cluster.c Rework cluster_rbuild() to use buffers with the file system block size. 1998-11-08 18:18:31 +00:00
vfs_getcwd.c Change namei cache to record vnode->(parent,name) entries (for directories). 1999-03-22 17:01:55 +00:00
vfs_init.c
vfs_lockf.c
vfs_lookup.c
vfs_subr.c vinvalbuf, called from vclean, could cause a locking-against-self 1999-03-22 17:24:19 +00:00
vfs_syscalls.c Regen files based on changes to syscalls.master, vnode_if.src (latter 1999-03-22 17:13:34 +00:00
vfs_vnops.c Modify VOP_CLOSE vnode op to always take a locked vnode. Change vn_close 1999-02-26 23:38:55 +00:00
vnode_if.c Regen files based on changes to syscalls.master, vnode_if.src (latter 1999-03-22 17:13:34 +00:00
vnode_if.sh
vnode_if.src Include some comments with more details on the VOP_LOOKUP locking protocol 1999-03-22 16:57:37 +00:00