summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs
Commit message (Collapse)AuthorAgeFilesLines
* KNFize rev.1.31.bde1997-10-271-4/+6
|
* Removed unused #includes. The need for most of them went away withbde1997-10-271-2/+1
| | | | recent changes (docluster* and vfs improvements).
* VFS interior redecoration.phk1997-10-261-2/+2
| | | | | | | | | | | | | Rename vn_default_error to vop_defaultop all over the place. Move vn_bwrite from vfs_bio.c to vfs_default.c and call it vop_stdbwrite. Use vop_null instead of nullop. Move vop_nopoll from vfs_subr.c to vfs_default.c Move vop_sharedlock from vfs_subr.c to vfs_default.c Move vop_nolock from vfs_subr.c to vfs_default.c Move vop_nounlock from vfs_subr.c to vfs_default.c Move vop_noislocked from vfs_subr.c to vfs_default.c Use vop_ebadf instead of *_ebadf. Add vop_defaultop for getpages on master vnode in MFS.
* VFS clean up "hekto commit"phk1997-10-161-4/+1
| | | | | | | | | | 1. Add defaults for more VOPs VOP_LOCK vop_nolock VOP_ISLOCKED vop_noislocked VOP_UNLOCK vop_nounlock and remove direct reference in filesystems. 2. Rename the nfsv2 vnop tables to improve sorting order.
* Another VFS cleanup "kilo commit"phk1997-10-161-63/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Remove VOP_UPDATE, it is (also) an UFS/{FFS,LFS,EXT2FS,MFS} intereface function, and now lives in the ufsmount structure. 2. Remove VOP_SEEK, it was unused. 3. Add mode default vops: VOP_ADVLOCK vop_einval VOP_CLOSE vop_null VOP_FSYNC vop_null VOP_IOCTL vop_enotty VOP_MMAP vop_einval VOP_OPEN vop_null VOP_PATHCONF vop_einval VOP_READLINK vop_einval VOP_REALLOCBLKS vop_eopnotsupp And remove identical functionality from filesystems 4. Add vop_stdpathconf, which returns the canonical stuff. Use it in the filesystems. (XXX: It's probably wrong that specfs and fifofs sets this vop, shouldn't it come from the "host" filesystem, for instance ufs or cd9660 ?) 5. Try to make system wide VOP functions have vop_* names. 6. Initialize the um_* vectors in LFS. (Recompile your LKMS!!!)
* VFS mega cleanup commit (x/N)phk1997-10-161-53/+18
| | | | | | | | | | | | | | | | | | | | | | | 1. Add new file "sys/kern/vfs_default.c" where default actions for VOPs go. Implement proper defaults for ABORTOP, BWRITE, LEASE, POLL, REVOKE and STRATEGY. Various stuff spread over the entire tree belongs here. 2. Change VOP_BLKATOFF to a normal function in cd9660. 3. Kill VOP_BLKATOFF, VOP_TRUNCATE, VOP_VFREE, VOP_VALLOC. These are private interface functions between UFS and the underlying storage manager layer (FFS/LFS/MFS/EXT2FS). The functions now live in struct ufsmount instead. 4. Remove a kludge of VOP_ functions in all filesystems, that did nothing but obscure the simplicity and break the expandability. If a filesystem doesn't implement VOP_FOO, it shouldn't have an entry for it in its vnops table. The system will try to DTRT if it is not implemented. There are still some cruft left, but the bulk of it is done. 5. Fix another VCALL in vfs_cache.c (thanks Bruce!)
* Hmm, realign the vnops into two columns.phk1997-10-151-8/+8
|
* Stylistic overhaul of vnops tables.phk1997-10-151-49/+42
| | | | | | | 1. Remove comment stating the blatantly obvious. 2. Align in two columns. 3. Sort all but the default element alphabetically. 4. Remove XXX comments pointing out entries not needed.
* Change the M_NAMEI allocations to use the zone allocator. This changedyson1997-09-211-2/+2
| | | | | | | | plus the previous changes to use the zone allocator decrease the useage of malloc by half. The Zone allocator will be upgradeable to be able to use per CPU-pools, and has more intelligent usage of SPLs. Additionally, it has reasonable stats gathering capabilities, while making most calls inline.
* Convert select -> poll.peter1997-09-141-3/+10
| | | | | Delete 'always succeed' select/poll handlers, replaced with generic call. Flag missing vnode op table entries.
* Some staticized variables were still declared to be extern.bde1997-09-071-2/+1
|
* Fix all areas of the system (or at least all those in LINT) to avoid storingwollman1997-08-161-2/+2
| | | | | | | | socket addresses in mbufs. (Socket buffers are the one exception.) A number of kernel APIs needed to get fixed in order to make this happen. Also, fix three protocol families which kept PCBs in mbufs to not malloc them instead. Delete some old compatibility cruft while we're at it, and add some new routines in the in_cksum family.
* Check permissions for fp regs as well as normal regs.sef1997-08-121-1/+3
|
* Fix procfs security hole -- check permissions on meaningful I/Os (namely,sef1997-08-124-8/+43
| | | | | | | reading/writing of mem and regs). Also have to check for the requesting process being group KMEM -- this is a bit of a hack, but ps et al need it. Reviewed by: davidg
* Removed unused #includes.bde1997-08-0211-61/+11
|
* Style fix my previous commit.alex1997-06-261-2/+2
|
* Block all write operations to /proc/1/* when securelevel > 0.alex1997-06-211-1/+3
| | | | | | | The additional check in procfs_ctl.c could be backed out, but I'm leaving it in for good measure. Reviewed by: Theo de Raadt <deraadt@OpenBSD.org>
* Removed bogon from previous commit: doubly included sys/systm.h.alex1997-04-271-2/+1
|
* Prevent debugger attachment to init when securelevel > 0.alex1997-04-271-1/+6
| | | | Noticed by: Brian Buchanan <brian@wasteland.calbbs.com>
* Fix both a problem with accessing backing objects, and also releasedyson1997-04-201-1/+14
| | | | | | the process map on nonexistant pages. PR: kern/3327 Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no>
* Fix the gdb executable modify problem. Thanks to the detective workdyson1997-04-061-80/+47
| | | | | | | | | | | | by Alan Cox <alc@cs.rice.edu>, and his description of the problem. The bug was primarily in procfs_mem, but the mistake likely happened due to the lack of vm system support for the operation. I added better support for selective marking of page dirty flags so that vm_map_pageable(wiring) will not cause this problem again. The code in procfs_mem is now less bogus (but maybe still a little so.)
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-244-8/+4
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Fixed missing initialisation of vp->v_type for types Pfile and Pmembde1997-03-081-1/+2
| | | | | | | in procfs_allocvp(). This fixes at least stat() of /proc/*/mem. stat() of /proc/*/file already worked. I think procfs_allocvp() isn't actually called for type Pfile.
* Fixed procfs's locking vops. They were missed in the Lite2 merge,bde1997-02-241-5/+5
| | | | | | | | | partly because the #define's for them were moved to a different file. At least the null VOP_LOCK() no longer works, since vclean() expects VOP_LOCK( ..., LK_DRAIN | LK_INTERLOCK, ...) to clear the interlock. This probably only matters when simple_lock() is not null, i.e., when there are multiple CPUs or SIMPLELOCK_DEBUG is defined.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-2213-13/+13
| | | | ready for it yet.
* Add function prototypes for most of the new Lite2 functions.mpp1997-02-122-2/+7
| | | | | | Also made a few of the miscfs routines static to be consistent. Some modules simply required some additional #includes to remove -Wall warnings.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-1010-345/+382
| | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
* Change the map entry flags from bitfields to bitmasks. Allowsdyson1997-01-161-2/+2
| | | | for some code simplification.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-1413-13/+13
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fix a potential deadlock from the previous commit.dyson1996-10-301-2/+4
|
* Fix the /proc/???/map file so that it is possible to read an arbitrarilydyson1996-10-301-18/+23
| | | | | large process map. Another commit will follow to fix a problem just found during this one... Sorry!!! :-(.
* Fix setting breakpoints in shared regions.dyson1996-10-241-7/+4
|
* Eliminated nested include of <sys/unistd.h> in <sys/file.h> in the kernel.bde1996-09-031-2/+3
| | | | | | | Include it directly in the few places where it is used. Reduced some #includes of <sys/file.h> to #includes of <sys/fcntl.h> or nothing.
* Fixed the easy cases of const poisoning in the kernel. Cosmetic.bde1996-08-311-2/+2
|
* Modify slightly the output from the map file in /proc. Now thedyson1996-07-271-2/+4
| | | | executable bit is shown.
* Under certain circumstances, reading the /proc/*/map file candyson1996-07-271-2/+5
| | | | crash the system. Nonexistant objects were not handled correctly.
* Implement locking for pfs nodes, when at the leaf. Concurrent accessdyson1996-07-022-11/+31
| | | | | | | to information from a single process causes hangs. Specifically, this fixes problems (hangs) with concurrent ps commands, when the system is under heavy memory load. Reviewed by: davidg
* Fix a serious problem, with a window where an object lock is needed,dyson1996-07-021-57/+97
| | | | | | but not there. The extent of the object lock is expanded to be over the range that it is needed. Additionally, clean up the code so that it conforms to better coding style.
* Add procfs_type.c to the repository.dyson1996-06-181-0/+91
|
* Clean-up the new VM map procfs code, and also add support for executabledyson1996-06-184-6/+24
| | | | | format file "etype". It contains a description of the binary type for a process.
* This file is the "meat" of the process address space capability. If youdyson1996-06-171-0/+169
| | | | would like other things added, just ask!!! It might be pretty easy to add.
* Add a feature to procfs to allow display of the process address mapdyson1996-06-173-4/+11
| | | | | | | with multiple entries as follows: start address, end address, resident pages in range, private pages in range, RW/RO, COW or not, (vnode/device/swap/default).
* Moved the fsnode MALLOC to before the call to getnewvnode() so that thedg1996-06-121-6/+12
| | | | | | | | process won't possibly block before filling in the fsnode pointer (v_data) which might be dereferenced during a sync since the vnode is put on the mnt_vnodelist by getnewvnode. Pointed out by Matt Day <mday@artisoft.com>
* Properly lock the vm space when accessing the memory in a process. Thisdyson1996-06-111-2/+14
| | | | | fix could solve some "interesting" problems that could happen during process rundown.
* For Lite2: proc LIST changes.hsu1996-03-111-6/+4
| | | | Reviewed by: davidg & bde
* add ruid and rgid to file 'status'wosch1996-02-021-4/+12
|
* This time, really make the procfs work when reading stuff from the UPAGES.peter1996-01-251-15/+34
| | | | | | | | | | | | This is a really ugly bandaid on the problem, but it works well enough for 'ps -u' to start working again. The problem was caused by the user address space shrinking by a little bit and the UPAGES being "cast off" to become a seperate entity rather than being at the top of the process's vmspace. That optimization was part of John's most recent VM speedups. Now, rather than decoding the VM space, it merely ensures the pages are in core and accesses them the same way the ptrace(PT_READ_U..) code does, ie: off the p->p_addr pointer.
* Major fixes for procfs..peter1996-01-246-22/+88
| | | | | | | | | | | | | | | | Implement a "variable" directory structure. Files that do not make sense for the given process do not "appear" and cannot be opened. For example, "system" processes do not have "file", "regs" or "fpregs", because they do not have a user area. "attempt" to fill in the user area of a given process when it is being accessed via /proc/pid/mem (the user struct is just after VM_MAXUSER_ADDRESS in the process address space.) Dont do IO to the U area while it's swapped, hold it in place if possible. Lock off access to the "ctl" file if it's done a setuid like the other pseudo-files in there.
* Eliminated many redundant vm_map_lookup operations for vm_mmap.dyson1996-01-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish overhead for merged cache. Efficiency improvement for vfs_cluster. It used to do alot of redundant calls to cluster_rbuild. Correct the ordering for vrele of .text and release of credentials. Use the selective tlb update for 486/586/P6. Numerous fixes to the size of objects allocated for files. Additionally, fixes in the various pagers. Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs. Fixes in the swap pager for exhausted resources. The pageout code will not as readily thrash. Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE), thereby improving efficiency of several routines. Eliminate even more unnecessary vm_page_protect operations. Significantly speed up process forks. Make vm_object_page_clean more efficient, thereby eliminating the pause that happens every 30seconds. Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the case of filesystems mounted async. Fix a panic with busy pages when write clustering is done for non-VMIO buffers.
* Fixed 1TB filesize changes. Some pindexes had bogus names and typesbde1995-12-171-5/+5
| | | | but worked because vm_pindex_t is indistinuishable from vm_offset_t.
OpenPOWER on IntegriCloud