summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* pseudofs.h:des2001-09-302-37/+54
| | | | | | | | | | | | | | | | - Rearrange the flag constants a little to simplify specifying and testing for readability and writeability. pseudofs_vnops.c: - Track the aforementioned change. - Add checks to pfs_open() to prevent opening read-only files for writing or vice versa (pfs_{read,write} would block the actual reads and writes, but it's still a bug to allow the open() to succeed). Also, return EOPNOTSUPP if the caller attempts to lock the file. - Add more trace points.
* The behaviour of whiteout'ing symlinks were too confusing, insteadphk2001-09-301-1/+8
| | | | remove them when asked to.
* Pseudofs take 2:des2001-09-293-54/+170
| | | | | | | | | | | | | | | | | | | | | | | | | - Remove hardcoded uid, gid, mode from struct pfs_node; make pfs_getattr() smart enough to get it right most of the time, and allow for callbacks to handle the remaining cases. Rework the definition macros to match. - Add lots of (conditional) debugging output. - Fix a long-standing bug inherited from procfs: don't pretend to be a read-only file system. Instead, return EOPNOTSUPP for operations we truly can't support and allow others to fail silently. In particular, pfs_lookup() now treats CREATE as LOOKUP. This may need more work. - In pfs_lookup(), if the parent node is process-dependent, check that the process in question still exists. - Implement pfs_open() - its only current function is to check that the process opening the file can see the process it belongs to. - Finish adding support for writeable nodes. - Bump module version number. - Introduce lots of new bugs.
* The previous commit introduced some references to "curproc" which should havedes2001-09-281-2/+2
| | | | been references to "curthread". Correct this.
* o Modify generic specfs device open access control checks to userwatson2001-09-261-4/+8
| | | | | | securelevel_ge() instead of direct securelevel variable checks. Obtained from: TrustedBSD Project
* Fix (typo? pasteo?): panic("ffs_mountroot..." -> panic("ntfs_mountroot...")fenner2001-09-261-1/+1
|
* Clean up my source tree to avoid getting hit too badly by the next KSE ordes2001-09-252-6/+67
| | | | | whatever mega-commit. This goes some way towards adding support for writeable files (needed by procfs).
* A process name may contain whitespace and unprintable characters,mike2001-09-251-5/+11
| | | | | | | | so convert those characters to octal notation. Also convert backslashes to octal notation to avoid confusion. Reviewed by: des MFC after: 1 week
* Use the passed in thread to selrecord() instead of curthread.jhb2001-09-211-1/+1
|
* o Remove redundant securelevel/pid1 check in procfs_rw() -- thisrwatson2001-09-181-2/+0
| | | | | | | protection is enforced at the invidual method layer using p_candebug(). Obtained from: TrustedBSD Project
* fix typojulian2001-09-131-3/+0
| | | | pointed out by: jhb
* Restore these files to being portable:jhb2001-09-122-61/+73
| | | | | | | | | | - Use some simple #define's at the top of the files for proc -> thread changes instead of having lots of needless #ifdef's in the code. - Don't try to use struct thread in !FreeBSD code. - Don't use a few struct lwp's in some of the NetBSD code since it isn't in their HEAD. The new diff relative to before KSE is now signficantly smaller and easier to maintain.
* KSE Milestone 2julian2001-09-1268-1212/+1233
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Fix some signed/unsigned integer confusion, and add bounds checking ofkris2001-09-101-0/+6
| | | | | | | | arguments to some functions. Obtained from: NetBSD Reviewed by: peter MFC after: 2 weeks
* Stole unicode translation table from mount_msdos. Add kernel codesemenu2001-09-086-18/+137
| | | | | | to support this translation. MFC after: 2 weeks
* Fix opening particular file's attributes (as described in man page).semenu2001-09-081-9/+14
| | | | | | This is useful for debug purposes. MFC after: 2 weeks
* Reference devvp on ntnode creation and dereference on removal. Previoussemenu2001-09-083-22/+17
| | | | | | | code lead to page faults becouse i_devvp went zero after VOP_RECLAIM, but ntnode was reused (not reclaimed). MFC after: 2 weeks
* Fix errors and warnings when compiling with NTFS_DEBUG > 1semenu2001-09-082-6/+4
| | | | MFC after: 2 weeks
* smbfs_advlock: simplify overflow checks (copy from kern_lockf.c)ache2001-08-291-7/+10
| | | | minor formatting issues to minimize differences
* Cosmetique & style fixes from bdeache2001-08-261-5/+2
|
* Copy from kern_lockf.c: remove extra checkache2001-08-241-2/+0
|
* Copy yet one check for SEEK_END overflowache2001-08-231-1/+2
|
* Copy my newly introduced l_len<0 'oops' fix from kern_lockf.cache2001-08-231-2/+4
|
* Copy POSIX l_len<0 handling from kern_lockf.cache2001-08-231-3/+6
|
* Cosmetique: correct English in commentsache2001-08-231-2/+3
| | | | non-cosmetique: add missing break; - original code was broken here
* Move <machine/*> after <sys/*>ache2001-08-231-1/+2
| | | | Pointed by: bde
* adv. lock:ache2001-08-231-2/+14
| | | | | copy EOVERFLOW handling code from main variant fix type of 'size' arg
* Use proper endian conversion.bp2001-08-211-1/+1
| | | | | Obtained from: Mac OS X MFC after: 1 week
* Return proper length of _PC_NAME_MAX value if long names support is enabled.bp2001-08-211-1/+1
| | | | | Obtained from: Mac OS X MFC after: 1 week
* linux ls fails on DEVFS /dev because linux_getdents fails becausephk2001-08-141-4/+22
| | | | | | | | | | linux_getdents uses VOP_READDIR( ..., &ncookies, &cookies ) instead of VOP_READDIR( ..., NULL, NULL ) because it seems to need the offsets for linux_dirent and sizeof(dirent) != sizeof(linux_dirent)... PR: 29467 Submitted by: Michael Reifenberger <root@nihil.plaut.de> Reviewed by: phk
* Remove dangling prototype for the now defunct procfs_kmemaccess()rwatson2001-08-031-3/+0
| | | | | | call. Obtained from: TrustedBSD Project
* Collapse a Pmem case in with the other debugging files case for procfs,rwatson2001-08-031-5/+2
| | | | | | | | as there are now "unusual" protection properties to Pmem that differ from the other files. While I'm at it, introduce proc locking for the other files, which was previously present only in the Pmem case. Obtained from: TrustedBSD Project
* Remove read permission for group on the /proc/*/mem file, since kmemrwatson2001-08-031-2/+1
| | | | | | | no longer requires access. Reviewed by: tmm Obtained from: TrustedBSD Project
* Prior to support for almost all ps activity via sysctl, ps used procfs,rwatson2001-08-033-42/+9
| | | | | | | | | | | | | | | | | | | | and so special-casing was introduced to provide extra procfs privilege to the kmem group. With the advent of non-setgid kmem ps, this code is no longer required, and in fact, can is potentially harmful as it allocates privilege to a gid that is increasingly less meaningful. Knowledge of specific gid's in kernel is also generally bad precedent, as the kernel security policy doesn't distinguish gid's specifically, only uid 0. This commit removes reference to kmem in procfs, both in terms of access control decisions, and the applying of gid kmem to the /proc/*/mem file, simplifying the associated code considerably. Processes are still permitted to access the mem file based on the debugging policy, so ps -e still works fine for normal processes and use. Reviewed by: tmm Obtained from: TrustedBSD Project
* remove support for creating files and directories from msdosfs_mknodassar2001-07-191-14/+1
|
* Grab the process lock around psignal().jhb2001-07-181-0/+2
| | | | Noticed by: tanimura
* o Replace calls to p_can(..., P_CAN_xxx) with calls to p_canxxx().rwatson2001-07-057-15/+15
| | | | | | | | | | | | | | | | | | | | | The p_can(...) construct was a premature (and, it turns out, awkward) abstraction. The individual calls to p_canxxx() better reflect differences between the inter-process authorization checks, such as differing checks based on the type of signal. This has a side effect of improving code readability. o Replace direct credential authorization checks in ktrace() with invocation of p_candebug(), while maintaining the special case check of KTR_ROOT. This allows ktrace() to "play more nicely" with new mandatory access control schemes, as well as making its authorization checks consistent with other "debugging class" checks. o Eliminate "privused" construct for p_can*() calls which allowed the caller to determine if privilege was required for successful evaluation of the access control check. This primitive is currently unused, and as such, serves only to complicate the API. Approved by: ({procfs,linprocfs} changes) des Obtained from: TrustedBSD Project
* - Update the vmmeter statistics for vnode pageins and pageouts injhb2001-07-041-2/+7
| | | | | | getpages/putpages. - Use vm_page_undirty() instead of messing with pages' dirty fields directly.
* With Alfred's permission, remove vm_mtx in favor of a fine-grained approachdillon2001-07-043-17/+7
| | | | | | | | | (this commit is just the first stage). Also add various GIANT_ macros to formalize the removal of Giant, making it easy to test in a more piecemeal fashion. These macros will allow us to test fine-grained locks to a degree before removing Giant, and also after, and to remove Giant in a piecemeal fashion via sysctl's on those subsystems which the authors believe can operate without Giant.
* Fix a mntvnode and vnode interlock reversal.jhb2001-06-281-2/+3
|
* Protect the mnt_vnode list with the mntvnode lock.jhb2001-06-282-4/+19
|
* #if 0 out pfs_null() to silence the warning about it not being referenced.des2001-06-151-0/+2
|
* Fix warning: 568: warning: `portal_badop' defined but not usedpeter2001-06-151-13/+0
|
* Fix warning (exposed NetBSD code):peter2001-06-151-1/+1
| | | | 94: warning: `ntfs_bmap' declared `static' but never defined
* Fix warnings (mostly harmless, due to struct bio being embedded in buf):peter2001-06-151-2/+2
| | | | | 738: warning: passing arg 1 of `biodone' from incompatible pointer type 745: warning: passing arg 1 of `biodone' from incompatible pointer type
* Fix warning: 552: warning: `fdesc_badop' defined but not usedpeter2001-06-151-12/+0
|
* Warning fix: coda_fbsd.c:113: warning: unused variable `ret'peter2001-06-151-1/+0
|
* Coda do not call vop_defaultop(), so add nesessary calls for VM objects.bp2001-06-141-0/+3
| | | | | Submitted by: Greg Troxel <gdt@ir.bbn.com> MFC after: 2 days
* the last argument to copyinstr is of t ype size_t, not u_intmjacob2001-06-131-3/+3
|
* With this commit, I hereby pronounce gensetdefs past its use-by date.peter2001-06-134-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind
OpenPOWER on IntegriCloud