| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"refreshing" the label on the vnode before use, just get the label
right from inception. For single-label file systems, set the label
in the generic VFS getnewvnode() code; for multi-label file systems,
leave the labeling up to the file system. With UFS1/2, this means
reading the extended attribute during vfs_vget() as the inode is
pulled off disk, rather than hitting the extended attributes
frequently during operations later, improving performance. This
also corrects sematics for shared vnode locks, which were not
previously present in the system. This chances the cache
coherrency properties WRT out-of-band access to label data, but in
an acceptable form. With UFS1, there is a small race condition
during automatic extended attribute start -- this is not present
with UFS2, and occurs because EAs aren't available at vnode
inception. We'll introduce a work around for this shortly.
Approved by: re
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Notes:
svn path=/head/; revision=105988
|
| |
|
|
|
|
|
| |
Pointed out by: phk
Notes:
svn path=/head/; revision=105585
|
| |
|
|
|
|
|
|
|
| |
"command" argument to VOP_IOCTL.
Spotted by: FlexeLint.
Notes:
svn path=/head/; revision=105212
|
| |
|
|
| |
Notes:
svn path=/head/; revision=105210
|
| |
|
|
|
|
|
| |
Spotted by: FlexeLint
Notes:
svn path=/head/; revision=105209
|
| |
|
|
|
|
|
|
| |
uses of iov_base which assume its type is `char *' (in order to do
pointer arithmetic) have been updated to cast iov_base to `char *'.
Notes:
svn path=/head/; revision=104908
|
| |
|
|
| |
Notes:
svn path=/head/; revision=104653
|
| |
|
|
|
|
|
|
|
|
|
|
| |
devfs VOP symlink creation by introducing a new entry point to determine
the label of the devfs_dirent prior to allocation of a vnode for the
symlink.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Notes:
svn path=/head/; revision=104533
|
| |
|
|
| |
Notes:
svn path=/head/; revision=104278
|
| |
|
|
| |
Notes:
svn path=/head/; revision=104113
|
| |
|
|
| |
Notes:
svn path=/head/; revision=104099
|
| |
|
|
|
|
|
|
|
| |
Move lockmgr_printinfo() into vprint() for everyone's benefit.
Suggested by: bde
Notes:
svn path=/head/; revision=103559
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
v_tag is now const char * and should only be used for debugging.
Additionally:
1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK
2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which
is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP.
Suggested by: phk
Reviewed by: bde, rwatson (earlier version)
Notes:
svn path=/head/; revision=103314
|
| |
|
|
|
|
|
|
|
|
| |
these in the main filesystems. This does not change the resulting code
but makes the source a little bit more grepable.
Sponsored by: DARPA and NAI Labs.
Notes:
svn path=/head/; revision=101777
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- v_vflag is protected by the vnode lock and is used when synchronization
with VOP calls is needed.
- v_iflag is protected by interlock and is used for dealing with vnode
management issues. These flags include X/O LOCK, FREE, DOOMED, etc.
- All accesses to v_iflag and v_vflag have either been locked or marked with
mp_fixme's.
- Many ASSERT_VOP_LOCKED calls have been added where the locking was not
clear.
- Many functions in vfs_subr.c were restructured to provide for stronger
locking.
Idea stolen from: BSD/OS
Notes:
svn path=/head/; revision=101308
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
kernel access control.
Teach devfs how to respond to pathconf() _POSIX_MAC_PRESENT queries,
allowing it to indicate to user processes that individual vnode labels
are available.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
Notes:
svn path=/head/; revision=101195
|
| |
|
|
|
|
|
|
|
|
| |
devfs nodes.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
Notes:
svn path=/head/; revision=101191
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
kernel access control.
Instrument devfs to support per-dirent MAC labels. In particular,
invoke MAC framework when devfs directory entries are instantiated
due to make_dev() and related calls, and invoke the MAC framework
when vnodes are instantiated from these directory entries. Implement
vop_setlabel() for devfs, which pushes the label update into the
devfs directory entry for semi-persistant store. This permits the MAC
framework to assign labels to devices and directories as they are
instantiated, and export access control information via devfs vnodes.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
Notes:
svn path=/head/; revision=101069
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
kernel access control.
Label devfs directory entries, permitting labels to be maintained
on device nodes in devfs instances persistently despite vnode
recycling.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
Notes:
svn path=/head/; revision=100994
|
| |
|
|
| |
Notes:
svn path=/head/; revision=100804
|
| |
|
|
|
|
|
|
|
|
| |
ruleset. If we do, that means there's a ruleset loop (10 includes 20
include 30 includes 10), which will quickly cause a double fault due
to stack overflow (since "include" is implemented by recursion).
(Previously, we only checked that X didn't include X.)
Notes:
svn path=/head/; revision=100793
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
administrator to define certain properties of new devfs nodes before
they become visible to the userland. Both static (e.g., /dev/speaker)
and dynamic (e.g., /dev/bpf*, some removable devices) nodes are
supported. Each DEVFS mount may have a different ruleset assigned to
it, permitting different policies to be implemented for things like
jails.
Approved by: phk
Notes:
svn path=/head/; revision=100206
|
| |
|
|
|
|
|
|
| |
Reviewed by: jeff
MFC after: 1 week
Notes:
svn path=/head/; revision=97702
|
| |
|
|
|
|
|
|
|
|
|
|
| |
make sure it's a correct operation for devfs, do it only in the
ISLASTCN case. If we don't, we are assuming that the final file will
be in devfs, which is not true if another partition is mounted on top
of devfs or with special filenames (like /dev/net/../../foo).
Reviewed by: phk
Notes:
svn path=/head/; revision=96356
|
| |
|
|
|
|
|
| |
Reviewed by: phk
Notes:
svn path=/head/; revision=95954
|
| |
|
|
|
|
|
|
|
|
|
| |
sense for devfs vnodes, and reduce/remove potential races in the devfs
code.
Submitted by: iadowse
Approved by: phk
Notes:
svn path=/head/; revision=95750
|
| |
|
|
|
|
|
|
|
|
|
| |
This fixes warnings that should be errors in fstat.
Reminded by: alpha tinderbox
Fixed some style bugs (ones near BOF and EOF; there are many more).
Notes:
svn path=/head/; revision=95212
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setting of timestamps on devices had no effect visible to userland
because timestamps for devices were set in places that are never used.
This broke:
- update of file change time after a change of an attribute
- setting of file access and modification times.
The VA_UTIMES_NULL case did not work. Revs 1.31-1.32 were supposed to
fix this by copying correct bits from ufs, but had little or no effect
because the old checks were not removed.
Notes:
svn path=/head/; revision=93886
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
general cleanup of the API. The entire API now consists of two functions
similar to the pre-KSE API. The suser() function takes a thread pointer
as its only argument. The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0. The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.
Discussed on: smp@
Notes:
svn path=/head/; revision=93593
|
| |
|
|
| |
Notes:
svn path=/head/; revision=92727
|
| |
|
|
|
|
|
|
|
|
|
| |
for chmod(2), chown(2) and utimes(2) with respect to jail(2).
Reviewed by: rwatson, ru
Not objected by: phk
Approved by: ru
Notes:
svn path=/head/; revision=92270
|
| |
|
|
|
|
|
|
|
| |
and devices can be created anytime after that.
Print a warning if an atttempt is made to create a device too early.
Notes:
svn path=/head/; revision=89118
|
| |
|
|
|
|
|
|
|
| |
variables.
Reviewed by: phk (in principle)
Notes:
svn path=/head/; revision=89107
|
| |
|
|
|
|
|
|
|
|
|
|
| |
pathconf() variables for directories, and set st_size and st_blocks
(of struct stat) for directories as appropriate. Note that st_size is
always set to DEV_BSIZE, since the size of the directories is not
currently kept.
Reviewed by: phk, bde
Notes:
svn path=/head/; revision=86892
|
| |
|
|
| |
Notes:
svn path=/head/; revision=86040
|
| |
|
|
|
|
|
|
|
| |
Add magic stuff copied from ufs_setattr().
Instructed by: bde
Notes:
svn path=/head/; revision=85980
|
| |
|
|
|
|
|
|
|
| |
Fix some modes on directories and symlinks.
Instructed by: bde
Notes:
svn path=/head/; revision=85979
|
| |
|
|
|
|
|
|
| |
<sys/mount.h> in rev.1.106 of the latter (don't include <sys/socket.h>
just to work around bugs in <sys/mount.h>).
Notes:
svn path=/head/; revision=84873
|
| |
|
|
|
|
|
| |
remove them when asked to.
Notes:
svn path=/head/; revision=84156
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=83366
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=81620
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only tun0 -> tun32767 may now be opened as struct ifnet's if_unit
is a short.
It's now possible to open /dev/tun and get a handle back for an available
tun device (use devname to find out what you got).
The implementation uses rman by popular demand (and against my judgement)
to track opened devices and uses the new dev_depends() to ensure that
all make_dev()d devices go away before the module is unloaded.
Reviewed by: phk
Notes:
svn path=/head/; revision=77589
|
| |
|
|
|
|
|
| |
PR: 27656
Notes:
svn path=/head/; revision=77243
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dev_t. The dev_depends(dev_t, dev_t) function is for tying them
to each other.
When destroy_dev() is called on a dev_t, all dev_t's depending
on it will also be destroyed (depth first order).
Rewrite the make_dev_alias() to use this dependency facility.
kern/subr_disk.c:
Make the disk mini-layer use dependencies to make sure all
relevant dev_t's are removed when the disk disappears.
Make the disk mini-layer precreate some magic sub devices
which the disk/slice/label code expects to be there.
kern/subr_disklabel.c:
Remove some now unneeded variables.
kern/subr_diskmbr.c:
Remove some ancient, commented out code.
kern/subr_diskslice.c:
Minor cleanup. Use name from dev_t instead of dsname()
Notes:
svn path=/head/; revision=77215
|
| |
|
|
|
|
|
|
|
|
| |
This fixes a number of warnings relating to removed cloned devices.
It also makes it possible to recreate deleted devices with
mknod(2). The major/minor arguments are ignored.
Notes:
svn path=/head/; revision=77050
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the number of references on the filesystem root vnode to be both
expected and released. Many filesystems hold an extra reference on
the filesystem root vnode, which must be accounted for when
determining if the filesystem is busy and then released if it isn't
busy. The old `skipvp' approach required individual filesystem
xxx_unmount functions to re-implement much of vflush()'s logic to
deal with the root vnode.
All 9 filesystems that hold an extra reference on the root vnode
got the logic wrong in the case of forced unmounts, so `umount -f'
would always fail if there were any extra root vnode references.
Fix this issue centrally in vflush(), now that we can.
This commit also fixes a vnode reference leak in devfs, which could
result in idle devfs filesystems that refuse to unmount.
Reviewed by: phk, bp
Notes:
svn path=/head/; revision=76688
|
| |
|
|
|
|
|
|
|
|
| |
returned dev_t rather than the original name.
This allows cloning from one name to another which is useful for
/dev/tty and later for the pty's.
Notes:
svn path=/head/; revision=76571
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If for some reason DEVFS is undesired, the "NODEVFS" option is
needed now.
Pending any significant issues, DEVFS will be made mandatory in
-current on july 1st so that we can start reaping the full
benefits of having it.
Notes:
svn path=/head/; revision=76554
|
| |
|
|
|
|
|
| |
Noticed by: rwatson
Notes:
svn path=/head/; revision=76320
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
other "system" header files.
Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.
Sort sys/*.h includes where possible in affected files.
OK'ed by: bde (with reservations)
Notes:
svn path=/head/; revision=76166
|