summaryrefslogtreecommitdiff
path: root/sys/miscfs
AgeCommit message (Collapse)Author
2003-04-14rename rootvp to rvp to avoid global. ok deraadt@ krw@Ted Unangst
2003-04-07sprintf elimination from rohee.Ted Unangst
2003-04-07some snprintf usage from rohee.Ted Unangst
2003-03-30Ensure that all files in /kern end with a newline (machine, model,Bruno Rohee
osrelease and ostype were not). ok tedu@
2003-03-09Disallow ptrace if P_SUGIDEXEC flag is set (we already disallow if P_SUGIDTodd C. Miller
is set). deraadt@ and tholo@ OK.
2003-02-24use M_MISCFSMNT instead of M_UFSMNT for mount dataTed Unangst
ok art@
2003-02-24correct typoTed Unangst
ok art@
2003-02-24Remove tcfs until this entire licensing mess is cleaned up. This isTheo de Raadt
ANOTHER case of a developer having ignored licenses when importing code.
2003-02-12Remove commons; inspired by netbsd.Jason Wright
2003-01-31Sigh. I comitted the wrong diff in the last vfs changes.Artur Grabowski
These are the files that were ok:ed and tested.
2003-01-31File system locking fixups, mostly from NetBSD:Artur Grabowski
- cache_lookup move common code from various fs's here always return with vnode and parent locked adjust return codes - PDIRUNLOCK - new flag set if lookup couldn't lock parent vnode - kernfs and procfs lock vnode in get_root don't unlock (again) in kernfs_freevp fix memory leak in procfs From tedu@stanford.edu deraadt@ and various other ok
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-10-27comment fixes.Brad Smith
-- From: Jean-Francois Brousseau <krapht@secureops.com>
2002-10-12Remove more '\n's from panic() statements. Both trailing and leading.Kenneth R Westerback
Last bits of diff generated by Chris Kuethe.
2002-08-23Just like getvnode, make getsock FREF the file so that we can't get awayArtur Grabowski
with not refing it. Eyeballed by lurene@daemonkitty.net, fries@, nordin@ and fries@ Some additional cleanups by nordin@
2002-08-23Cleanup change. Since almost all callers (except one) of getvnode did a FREFArtur Grabowski
on the returned file, do the FREF inside getvnode so that people can't get away with avoiding FREF and FRELE. Eyeballed by various people.
2002-06-23uid_t and gid_t are unsignedTheo de Raadt
2002-06-14spelling; from Brian Poole <raj@cerias.purdue.edu>Todd T. Fries
2002-06-08Use tsleep instead of sleep.Artur Grabowski
2002-06-04Remove unused #define. ok deraadt@Thomas Nordin
2002-05-24splbio around biodone.Artur Grabowski
2002-04-06Do not hide Pfpregs from a switch() if PT_[GS]ETFPREGS are not defined,Miod Vallat
so that this compiles with option DIAGNOSTIC; fixes PR #2528 ok fgsch@
2002-03-14remove ambiguity in version,ostype,osversion,osrelease and their constanity, ↵Michael Shalayeff
they are and declarre 'em accordingly also removing private externies of those
2002-03-14Final __P removal plus some cosmetic fixupsTodd C. Miller
2002-03-14First round of __P removal in sysTodd C. Miller
2002-03-14Turn the ptrace(2) syscall into a kernel compile option, option PTRACE inMiod Vallat
your kernel configuration file. By default, GENERIC will enable this. When PTRACE is not enabled, several ptrace-like features of the procfs filesystem will be disabled as well (namely, the ability to read and write any process' registers, as well as attching, single stepping and detaching to/from processes). This should help paranoid people build better sandboxens, and us to build smaller ramdisks.
2002-03-11Since all archs implement PT_GETREGS and PT_SETREGS, make then unoptional.Artur Grabowski
They still stay in MD code for backwards compatibility, but a check in ptrace.h checks if they are defined. Note - the same thing will be done with PT_{GET,SET}FPREGS once vax implements them and with PT_STEP when it's implemented by sparc, sparc64 and alpha.
2002-02-17Cache vnodes, don't hold on to the root vnode, some cleanups, handleArtur Grabowski
physmem and usermem correctly. kernel/2404 from peterw@ifost.org.au with some small fixups from me.
2002-02-13More FREF/FRELE on relevant places. Now, only sys_mmap and a bunch of ioctl ↵Artur Grabowski
functions in sys/compat are left.
2002-02-12More FREF/FRELE protection. This time all users of getvnode.Artur Grabowski
2002-02-12Fix all users of getsock to use FREF/FRELE properly.Artur Grabowski
2002-02-08- Rename FILE_{,UN}USE to FREF and FRELE. USE is a bad verb and we don't haveArtur 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-05Add counting of temporary references to a struct file (as opposed to referencesArtur 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-02Be more consistent about using fd_getfile where it matters.Artur Grabowski
2002-01-30Move SET/CLR/ISSET macros to param.h. fgsch@ and millert@ okThomas Nordin
2002-01-30Add proc0 to the PIDHASH table. art@ okThomas Nordin
2002-01-20When a process is exec:ing mark it with a flag. Check that flag in ptraceArtur 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.
2001-12-19UBC was a disaster. It worked very good when it worked, but on someArtur Grabowski
machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
2001-12-11Fix typo, noticed by Richard LoweTodd C. Miller
2001-12-10Big cleanup inspired by NetBSD with some parts of the code from NetBSD.Artur Grabowski
- get rid of VOP_BALLOCN and VOP_SIZE - move the generic getpages and putpages into miscfs/genfs - create a genfs_node which must be added to the top of the private portion of each vnode for filsystems that want to use genfs_{get,put}pages - rename genfs_mmap to vop_generic_mmap
2001-12-04Readd VOP_MMAP, will be used soon. Right now it's just a question toArtur Grabowski
the filesystem if we're allowed to mmap the file.
2001-11-21Use vfs_mount_foreach_vnodeConstantine Sapuntzakis
2001-11-15uvm_vnp_setsizeArtur Grabowski
2001-11-15lockmgr instead of rolling our own.Artur Grabowski
2001-11-06Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.Miod Vallat
(Look ma, I might have broken the tree)
2001-11-06redundant includes.Artur Grabowski
2001-10-26 - every new fd created by falloc() is marked as larval and should not be usedArtur Grabowski
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.
2001-09-19No need to PHOLD/PRELE here, really.Artur Grabowski
2001-09-16Add some missing lengths checks when passing data from userland toTodd C. Miller
kernel. From based on NetBSD patches.
2001-09-11Don't include <vm/vm_kern.h> if you don't need foo_map.Miod Vallat