christos
8aa2fc5ab8
PR/7143: Jaromir Docelek: Add procfs/cmdline from Linux emulation
1999-03-12 18:45:40 +00:00
wrstuden
862a56e88b
Modify vfsops to seperate vfs_fhtovp() into two routines. vfs_fhtovp() now
...
only handles the file handle to vnode conversion, and a new call,
vfs_checkexp(), performs the export verification.
1999-02-26 23:44:43 +00:00
is
fde637530e
Machine independent part of fix for PR 6152 (gdb doesn't work on machines
...
with UVM and seperate I&D-Cache). Mostly by Michael Hitch, but pass struct
proc * instead of the pmap. Reason: said machine will need a method to do
the syncing operation for "curproc", too; this way more code can be shared.
1999-02-25 21:54:53 +00:00
msaitoh
1f5b9b4d63
sprintf->snprintf
1999-02-03 05:05:03 +00:00
drochner
7847c0f52e
make it compile with !UVM
1999-01-28 21:18:00 +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
eeh
a2dd74ed79
Merge paddr_t changes into the main branch.
1998-08-13 02:10:37 +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
jonathan
d275e56dee
* defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
...
TODO: revisit interaction between native compat and emul compat usage.
1998-07-05 08:49:30 +00:00
cgd
651b44e211
Rework the way kernel include files are installed. In the new method,
...
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +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
thorpej
b5bf2ed6d0
Place a pointer to an array of our vnodeopv_desc *'s in our vfsops
...
structure, for use by vfs_attach().
1998-02-18 07:05:47 +00:00
thorpej
d2924ae854
Prevent the session ID from disappearing if the session leader exits
...
(thus causing s_leader to become NULL) by storing the session ID separately
in the session structure. Export the session ID to userspace in the
eproc structure.
Submitted by Tom Proett <proett@nas.nasa.gov>.
1998-02-14 00:37:26 +00:00
mrg
d90485202c
- add defopt's for UVM, UVMHIST and PMAP_NEW.
...
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +00:00
mrg
1a8c7604f4
initial import of the new virtual memory system, UVM, into -current.
...
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code. i provided some help
getting swap and paging working, and other bug fixes/ideas. chuck
silvers <chuq@chuq.com> also provided some other fixes.
this is the rest of the MI portion changes.
this will be KNF'd shortly. :-)
1998-02-05 07:59:28 +00:00
mycroft
d24c4d31e1
Make the curproc link executable.
1997-10-30 09:14:07 +00:00
fvdl
ce56587f15
Bump last argument to VOP_READDIR to off_t (from u_long).
1997-10-10 02:01:05 +00:00
enami
b4ae3706db
Use the same indentation as other two place, sys_ptrace() and
...
procfs_control().
Ok'ed by Jason R. Thorpe.
1997-09-13 04:25:35 +00:00
christos
4fb8bf7262
PR/4098: Alan Barrett: Fix diagnostic printf formatting.
1997-09-10 13:44:20 +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
explorer
945beb8d63
Move procfs_checkioperm() from procvs_subr.c to procfs_mem.c, since _subr is
...
not included in a kernel without procfs, and it seems wrong to pull
all of procfs_subr.c in for just that one function. Perhaps this
should go into a new file instead?
1997-08-13 04:01:22 +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
2ee8bc2b79
Don't allow writes to init's memory or registers while in secure mode.
1997-06-25 11:32:15 +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
701f15db33
Reinstate P_FSTRACE, with different semantics:
...
* Never send a SIGCHLD to the parent if P_FSTRACE is set.
* Do not permit mixing ptrace(2) and procfs; only permit using the one that
was attached.
1997-04-28 04:49:27 +00:00
mycroft
8a33a13c65
Minor code cleanup.
1997-04-28 03:49:57 +00:00
mycroft
217c4e14ea
Fix several deficiencies, as compared to ptrace(2):
...
* Did not check for P_SUGID on ATTACH.
* Did not check for tracing of init on ATTACH.
* Did not turn off single-step mode on RUN or DETACH.
* Might have screwed up reparenting in some cases.
* Allowed anyone to detach the process.
1997-04-28 02:28:39 +00:00
cgd
90688fce27
Change the second and third args to struct vfsops' (*vfs_mount)() to
...
'const char *', and 'void *', respectively. The second arg is taken directly
from user arguments, and is const there, so must be const in the prototypes
and functions. The third arg is also taken directly from user arguments.
It doesn't have to be changed, but since it's cleaner to keep the type
the same as the user arg's type, and I'm already making the 'const char *'
change...
1996-12-22 10:10:12 +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
cgd
eaa37ec87a
remove bogus cast of second arg to bcmp(). (nm_name is a const char*,
...
and was being unnecessarily cast to 'char *'; -Wcast-qual.)
1996-10-25 21:52:02 +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
mycroft
95f26583aa
Add a missing PHOLD()/PRELE() pair.
1996-06-11 01:49:38 +00:00
christos
da749d6e09
Fix printf format follies.
1996-03-16 23:52:42 +00:00
mycroft
183aec8fa8
GC *_nullop(). Minor nits.
1996-02-13 13:12:48 +00:00
christos
19dc07be15
close PR/2063: procfs_rw prototyped twice with different prototypes
1996-02-12 15:01:41 +00:00
christos
631ccba638
miscfs prototype changes
1996-02-09 22:39:56 +00:00
mycroft
fce3e0874f
Fix vop_link, vop_symlink, and vop_remove semantics in several ways:
...
* Change the argument names to vop_link so they actually make sense.
* Implement vop_link and vop_symlink for all file systems, so they do proper
cleanup.
* Require the file system to decide whether or not linking and unlinking of
directories is allowed, and disable it for all current file systems.
1996-02-09 18:47:48 +00:00
mycroft
53fccab940
Fix vop_link, vop_symlink, and vop_remove semantics in several ways:
...
* Change the argument names to vop_link so they actually make sense.
* Implement vop_link and vop_symlink for all file systems, so they do proper
cleanup.
* Require the file system to decide whether or not linking and unlinking of
directories is allowed, and disable it for all current file systems.
1996-02-09 14:45:36 +00:00
mycroft
d60bb4a465
Use the index number as the cookie, rather than multiplying by UIO_MX.
1995-10-09 14:03:32 +00:00
mycroft
bcaf2bca34
Add support for cookies, mostly from Greg Hudson.
1995-10-09 11:18:51 +00:00
mycroft
36a94a031a
Lock the process in core before operating on it.
1995-08-13 09:05:51 +00:00
cgd
8f62c773e8
don't assume the f_fsnamelen is nul-truncated or longer than MFSNAMELEN
1995-06-18 14:45:14 +00:00
jtc
95ded74f58
Moved egid credential from cr_groups[0] to new field cr_gid. POSIX.1
...
requires that sgid executables and the setuid() syscall *not* change
the supplemental group list.
1995-06-01 22:43:30 +00:00
cgd
13f5026553
fix timeval vs. timespec warnings
1995-04-15 01:56:43 +00:00
briggs
6efcd1b6d4
KERNEL -> _KERNEL
1995-03-29 21:57:43 +00:00
mycroft
2f805fa51b
copy*str() should use size_t.
1995-03-09 12:05:21 +00:00
mycroft
597bdad3df
Return EROFS rather than ENOENT in many cases. Also some cosmetic cleanup.
1995-02-03 16:18:46 +00:00
mycroft
e9017fd132
Clean up the code to frob mnt_stat a (tiny) bit.
1995-01-18 09:34:24 +00:00
chopps
ce22a1a443
initialize variable as pointed out by David Jones <dej@qpoint.torfree.net>
...
this should fix pr #699
1995-01-05 07:10:54 +00:00
mycroft
609063ce2b
Format police.
1994-12-27 19:05:12 +00:00
ws
2f0fb8ee09
Implement and use a common access checking routine
1994-12-24 16:44:12 +00:00
mycroft
814ba0fc30
Call foo_statfs() from a common place when mounting.
1994-12-15 20:00:14 +00:00
mycroft
7276c4ed44
Remove a_fp.
1994-12-14 18:45:21 +00:00
christos
a1dbf4aaa5
fixed struct comment
1994-11-14 06:08:21 +00:00
cgd
6ac2bbfc35
be more careful with types, also pull in headers where necessary.
1994-10-30 21:43:03 +00:00
cgd
be8c7b9d80
light clean; make sure headers are properly included, types are OK, etc.
1994-10-29 07:58:24 +00:00
cgd
6b86130410
update for new syscall args description mechanism
1994-10-20 04:22:35 +00:00
mycroft
76e0a7d0f4
Fix typo.
1994-09-15 03:47:19 +00:00
mycroft
cab4d25c24
stat the file system at mount time, for `df -n', et al.
1994-09-15 03:42:37 +00:00
mycroft
2f710a54ee
Convert process, file, and namei lists and hash tables to use queue.h.
1994-08-30 03:04:28 +00:00
cgd
cf92afd66e
New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
1994-06-29 06:29:24 +00:00
mycroft
18157b489f
Remove an unneeded test.
1994-06-16 06:01:19 +00:00
mycroft
117527f322
Minor update from JSP after merging my changes.
1994-06-15 22:54:38 +00:00
mycroft
76fe13be8e
Fix a bug pointed out by JSP.
1994-06-15 14:40:32 +00:00
mycroft
cde1d47595
Update to 4.4-Lite fs code, with local changes.
1994-06-08 11:33:09 +00:00
cgd
d9f8c89a76
setrun rename
1994-05-07 01:15:38 +00:00
cgd
a0a7429482
lots of changes: prototype migration, move lots of variables, definitions,
...
and structure elements around. kill some unnecessary type and macro
definitions. standardize clock handling. More changes than you'd want.
1994-05-05 05:35:42 +00:00
cgd
17f30a5d0b
kill obvious bug; glad to know this was tested!
1994-05-04 05:41:55 +00:00
cgd
4bbabd8e7a
Rename a lot of process flags.
1994-05-04 03:41:12 +00:00
cgd
d071d1cf05
some prototype cleanup, eliminate/replace bogus types (e.g. quad and
...
u_quad) -> use better types (e.g. quad_t & u_quad_t in inodes),
some cleanup.
1994-04-25 03:49:27 +00:00
cgd
4917d8beec
make fs types consistent over new kernels. also, some proto foo.
1994-04-23 07:54:38 +00:00
cgd
3dda0064a5
Convert mount, vnode, and buf structs to use <sys/queue.h>. Also,
...
some knf and structure frobbing to do along with it.
1994-04-21 07:47:31 +00:00
cgd
914b690745
forgot these...
1994-04-15 20:49:27 +00:00
cgd
93159ea799
fs types are names now.
1994-04-14 04:05:45 +00:00
cgd
656b05ccf6
be a bit smarter about determining if files shouldn't be seen by the user.
...
Also, DON'T allow a lookup to succeed on a file that's not visible!
1994-04-12 02:55:51 +00:00
briggs
bf860bb2b2
PG_COW -> PG_COPYONWRITE to match earlier changes in vm_page.h.
1994-03-17 04:10:32 +00:00
mycroft
349d681690
Undo last change; executables is `file', not `a.out'.
1994-02-15 13:32:39 +00:00
ws
0cb2a819b2
Rename file -> a.out
1994-02-14 19:08:36 +00:00
ws
4eab6179ba
Don't try to show a file for a process if there is none
1994-02-14 19:07:27 +00:00
ws
2df8c5f528
If you add files, be sure to have enough bits to encode an inode number!
1994-02-06 14:01:16 +00:00
cgd
89a86e618e
make a fpregs file.
1994-01-28 07:03:16 +00:00
ws
2cee3e073f
Make procfs really work for debugging.
...
Implement not & notepg files in procfs.
1994-01-20 21:22:47 +00:00
ws
5f7ef81c6f
Fix ugliness left over from my last mod
1994-01-11 18:02:06 +00:00
ws
a24f445d60
Fix sign extension bug
1994-01-10 20:47:39 +00:00
mycroft
c4f31d72f8
Add a missing break so my machine doesn't panic.
1994-01-10 04:58:14 +00:00
cgd
64aaba1a4e
fix some of my more recent botches, and clean up slightly.
1994-01-09 23:57:56 +00:00
cgd
5c3b96cd71
oops. fix that last
1994-01-09 20:17:06 +00:00
cgd
9f5ed8f1ef
minor cleanup; kill a few assignments
1994-01-09 20:10:51 +00:00
ws
6202bab2db
Bug fixes and enhancements:
...
Make NFS serving work (BUT DON'T USE "attach" TO /proc/*/ctl FOR NOW!!!)
Make `curproc' a symbolic link
Add `.' and `..' entries to the directories.
Return better guesses on the size of the files.
1994-01-09 19:44:03 +00:00
cgd
e2efe41199
reorganization of ptrace/procfs code
1994-01-08 10:47:02 +00:00