simonb
c475865f39
Just use the "time" variable in the *_getattr functions instead of a call
...
to (the potentially expensive) microtime().
2002-08-03 04:52:44 +00:00
thorpej
f1f51aa2b8
Move code shared by procfs and the kernel proper out of procfs and
...
into the kernel proper (renaming functions from procfs_* to process_*).
2002-05-09 15:44:44 +00:00
christos
5ff60a19d9
Don't hide the real return code with EPERM.
2002-01-12 18:51:56 +00:00
chs
5a690c92a1
add a VOP_PUTPAGES method for all the filesystems that don't have pages,
...
just unlock the interlock.
2001-12-06 04:27:40 +00:00
thorpej
03efee5585
* Allow machine-dependent code to specify hooks for ptrace(2)
...
(__HAVE_PTRACE_MACHDEP) and procfs (__HAVE_PROCFS_MACHDEP).
These changes will allow platforms like x86 (XMM) and PowerPC
(AltiVec) to export extended register sets in a sane manner.
* Use __HAVE_PTRACE_MACHDEP to export x86 XMM registers (standard
FP + SSE/SSE2) using PT_{GET,SET}XMMREGS (in the machdep
ptrace request space).
* Use __HAVE_PROCFS_MACHDEP to export x86 XMM registers via
/proc/N/xmmregs in procfs.
2001-12-05 00:58:05 +00:00
lukem
e4b00f433c
add RCSIDs
2001-11-10 13:33:40 +00:00
simonb
cf63a6b052
Remove some variables that are set but never used.
2001-11-06 07:20:37 +00:00
chs
94d6f3ee95
map files are zero-length.
2001-08-31 04:56:26 +00:00
chs
6e2828061f
procfs_bmap() should never be called, make it a "bad op".
...
let procfs_mmap() use the default error method.
2001-06-03 02:21:35 +00:00
kleink
79283614b3
In procfs_readdir(), give /proc/# directories DT_DIR (rather than DT_REG).
2001-04-14 13:25:46 +00:00
fvdl
49b162566a
Bump va_blocksize for the map files some more, so that programs with
...
quite a few mappings have a chance of being handled correctly if
st_blksize is looked at.
2001-03-30 20:25:11 +00:00
fvdl
2e64bebd3b
For -o linux mounts, add some code to emulate /proc/#/maps.
...
Needs NAMECACHE_ENTER_REVERSE to include filenames.
2001-03-29 22:41:52 +00:00
jdolecek
522f569810
make some more constant arrays 'const'
2001-02-21 21:39:52 +00:00
jdolecek
d9466585b7
make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const
2001-01-22 12:17:35 +00:00
fvdl
4e000b75b2
Add a few linux-style files, only enabled when -o linux is specified
...
for the mount. Currently these are /proc/cpuinfo and /proc/meminfo.
The former only does something on i386 right now.
2001-01-17 00:09:07 +00:00
chs
b0ec16cc38
remove dead code and other misc cleanup.
2000-11-24 18:58:37 +00:00
tv
10d08cc9f2
Only show the "exe" entry to Linux processes, suggested by christos.
...
Since there are actually three struct emul's for linux, use the e_name
field to determine eligibility with strcmp().
2000-08-09 23:30:49 +00:00
tv
ae4dea1dc4
Some versions of Linux libc look for /proc/.../exe instead of /proc/../file.
...
Add an entry for "exe" that is the same as "file", provided only if
COMPAT_LINUX is set.
2000-08-09 21:08:11 +00:00
thorpej
b94e29816f
MALLOC()/FREE() are not to be used for variable sized allocations.
2000-08-03 03:39:52 +00:00
mrg
20515f2854
<vm/vm.h> -> <uvm/uvm_extern.h>
2000-06-28 02:44:06 +00:00
simonb
92701d715c
Delete duplicate declaration of atopid().
2000-03-30 02:20:14 +00:00
thorpej
8772062270
Make /proc/self a symlink to /proc/curproc. I've observed Linux programs
...
that expect /proc/self/cmdline to exist.
1999-09-02 23:33:45 +00:00
sommerfeld
197579af47
Change variable used for directory offset from "int" to "off_t".
...
Overkill, but avoids a host of truncation problems.
1999-08-25 14:42:35 +00:00
sommerfeld
2e649e46d3
Fix PR8270:
...
Problem turned out to be due to improper handling of reads beyond EOF:
they should just return without error with the uio unchanged, and the
caller will recognize this as a zero-byte return (EOF).
The previous fix to protect directory reads against bogus uio_offset
values returned EINVAL, which broke mount -o union, which only
union'ed in the lower directory if the upper directory cleanly
returned EOF.
While we're here, protect kernfs as well.
1999-08-24 23:29:08 +00:00
christos
582a6def8b
protect against large uio_offset
1999-08-14 02:20:19 +00:00
wrstuden
3bf14d81e9
Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
...
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().
Reviewed by: thorpej
Tested by: wrstuden
1999-08-03 20:19:16 +00:00
thorpej
fc04cf9982
Add calls to lock the proclist as appropriate.
1999-07-25 18:33:47 +00:00
thorpej
f9b0db3013
Fix a paste-o in procfs_lookup() introduced with the vnode locking changes.
...
Fixes PR #7961 , Mario Kemper <magick@bundy.lip.owl.de>.
1999-07-14 23:52:22 +00:00
wrstuden
9fc36d6807
Bump osrelease to 1.4E. Add layerfs files, remove null_subr.c.
...
Update coda to new struct lock in struct vnode.
make fdescfs, kernfs, portalfs, and procfs actually lock their vnodes.
It's not that hard.
Make unionfs set v_vnlock = NULL so any overlayed fs will call its
VOP_LOCK.
1999-07-08 01:26:21 +00:00
christos
8aa2fc5ab8
PR/7143: Jaromir Docelek: Add procfs/cmdline from Linux emulation
1999-03-12 18:45:40 +00:00
msaitoh
ea669760d6
Add /proc/#/map. From FreeBSD.
1999-01-25 02:20:08 +00:00
thorpej
970e60efb8
- Use proclists[], rather than checking allproc and zombproc explicitly.
...
- Add some comments about locking.
1998-09-08 23:50:13 +00:00
kleink
5350df2953
Per POSIX, fail with EINVAL if advisory locking is attempted on a file type
...
that doesn't support it, rather than using a homegrown EBADF or EOPNOTSUPP.
1998-08-13 10:06:31 +00:00
matthias
574106c52b
create miscfs/genfs/genfs_vnops.c:genfs_enoioctl and make all the other
...
filesystems use it instead of a private version.
1998-08-10 08:11:10 +00:00
perry
4522c799a1
bzero->memset, bcopy->memcpy, bcmp->memcmp
1998-08-09 20:51:08 +00:00
kleink
12a866151b
Recognize _PC_SYNC_IO.
1998-08-03 14:19:57 +00:00
fvdl
811dba68c1
procfs_readdir: in case of error, check if cookies actually have
...
been allocated before freeing them. From Wolfgang Solfrank.
1998-04-21 16:36:37 +00:00
fvdl
e5bc90f40c
Merge with Lite2 + local changes
1998-03-01 02:20:01 +00:00
fvdl
ce56587f15
Bump last argument to VOP_READDIR to off_t (from u_long).
1997-10-10 02:01:05 +00:00
thorpej
a79a3ca472
Fix a reversed argument which caused procfs_checkioperm() to always return
...
"OK". Add a few comments to avoid further confusion.
1997-08-27 08:52:51 +00:00
thorpej
f9777e4a1c
Fix the procfs hole described on current-users, similar to a fix for
...
FreeBSD by Sean Eric Fagan, but a bit different. This makes the checks
in the same places as sef's FreeBSD patch, but does not hardcode the
"kmem" group into the kernel, and also does a check identical to the
(3) and (4) checks in the NetBSD ptrace(2):
(1) it's not owned by you, or is set-id on exec (unless
you're root), or
(2) it's init, which controls the security level of the
entire system, and the system was not compiled with
permanently insecure mode turned on.
1997-08-12 22:47:18 +00:00
mycroft
e3f99a9397
Pass the vnode type to vaccess(), and use it when checking VEXEC. Make sure
...
that the mode bits passed to vaccess() and returned by foo_getattr() contain
only permission bits.
1997-05-08 16:19:43 +00:00
mycroft
4d213ec5e7
Need stat.h.
1997-05-05 07:34:09 +00:00
mycroft
1e3c14a909
Eliminate bogus uses of V{READ,WRITE,EXEC}. Use S_I[RWX]{USR,GRP,OTH} where
...
appropriate.
1997-05-05 07:13:57 +00:00
mycroft
8a33a13c65
Minor code cleanup.
1997-04-28 03:49:57 +00:00
cgd
a67c0b16b8
define path name string variables that we should not (and, thankfully, do
...
not) modify as 'const char *' rather 'char *'.
1996-10-25 21:57:58 +00:00
christos
92a808f167
backout previous kprintf changes
1996-10-13 02:21:25 +00:00
christos
60d201973e
printf -> kprintf, sprintf -> ksprintf
1996-10-10 22:46:11 +00:00
mycroft
2bc736661a
Implement poll(2).
1996-09-07 12:40:22 +00:00
mycroft
c52352c819
Add a set of generic file system operations that most file systems use.
...
Also, fix some time stamp bogosities.
1996-09-01 23:47:48 +00:00