Commit Graph

337 Commits

Author SHA1 Message Date
kleink 12a866151b Recognize _PC_SYNC_IO. 1998-08-03 14:19:57 +00:00
lukem 786b86d71b use AF_LOCAL instead of AF_UNIX 1998-07-18 05:04:35 +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
thorpej 961f0708b1 - Rename nqnfs_vop_lease_check() to genfs_lease_check(). If NFSSERVER is
not in the kernel, genfs_lease_check() is simply a no-op.  This allows
  LKM'd file systems to be exported (previously did not work properly
  due to a compile-time decision based on -DNFSSERVER).
- defopt NFSSERVER
1998-06-25 22:15:28 +00:00
sommerfe 7ba7fbbb23 Always include fifos; "not an option any more". 1998-06-24 20:58:44 +00:00
sommerfe becaafeea0 defopt for options FIFO 1998-06-22 22:00:59 +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
kleink 382743ada3 Convert fsync vnode operator implementations and usage from the old `waitfor'
argument and MNT_WAIT/MNT_NOWAIT to `flags' and FSYNC_WAIT.
1998-06-05 19:53:00 +00:00
kleink a32a338757 * Convert fsync vnode operator implementations and usage from the old
waitfor argument and MNT_WAIT/MNT_NOWAIT to flags and FSYNC_WAIT.
* In genfs_fsync(), honor the FSYNC_NODATA flag.
1998-06-05 19:52:59 +00:00
fvdl 8ccdc78ffc Since the interlock has been unlocked, also clear LK_INTERLOCK from
a_flags in order to not confuse the layer that is called through
the following VCALL.
1998-05-18 16:47:37 +00:00
pk 097731676e dead_lock() must unlock `v_interlock'. 1998-05-18 14:36:46 +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
veego dd9d3a3015 Fix an error introduced in rev 1.39 where jason fixed kern/5271:
s/vp/ap->a_vp/ in line 715.
1998-04-11 08:51:12 +00:00
thorpej 13eebaf27e Fix two problems in union_link():
(1) Fix a typo that caused a NULL pointer deref.
(2) union_copyup() locks the vnode, so unlock it before calling relookup().
PR #5272, MINOURA, Makoto <minoura@kw.netlaputa.ne.jp>.
1998-04-10 01:43:54 +00:00
thorpej 181995d5f7 Fix possible stray pointer deref in union_access, per PR #5271,
submitted by MINOURA, Makoto <minoura@kw.netlaputa.ne.jp>.
1998-04-10 01:39:45 +00:00
marc efbd14c45d mounting a union causes VOP_WHITEOUT to be called on the upper root
vn, with a 0 component.  If the upper fs was a unionfs,
union_whiteout() would deref compnent to get a struct proc, and panic.
struct proc was only being passed to FIXUP, which never used it.  It
turns out this happened a lot.  I ripped most of the unneeded code
out, and left in the few places that really did need the proc handle.
1998-03-17 08:36:57 +00:00
fvdl f75b1046d4 Fix flags mess-up in vget. LK_EXCLUSIVE -> 0 (even indicated in the
comment, d'oh!)
1998-03-11 15:52:02 +00:00
mrg c6dd5cbefd standardise options header includes. 1998-03-08 14:04:14 +00:00
fvdl 7ba6a2daac Remove extraneous files from Lite2 merge. 1998-03-01 13:45:28 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
fvdl e8d05f0741 Import 4.4BSD-Lite2 1998-03-01 02:12:49 +00:00
thorpej 62cb255d14 Place a pointer to an array of our vnodeopv_desc *'s in our vfsops
structure, for use by vfs_attach().
1998-02-18 07:26:57 +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
thorpej 44ed0e5b79 Don't include option headers if building an LKM. 1998-02-12 20:38:45 +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
chs f64abc7b4c add flags arg to hashinit(), to pass to malloc(). 1998-02-07 02:44: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
perry 1a80fd799d RCSID Police. 1998-01-05 19:19:41 +00:00
fvdl 766487d941 Too many vnode ops were marked as bad op, but could happen in practice.
Change them to genfs_eopnotsupp.
1997-11-27 20:36:05 +00:00
mycroft d24c4d31e1 Make the curproc link executable. 1997-10-30 09:14:07 +00:00
christos 4071635fa6 Add missing cast to dev_t 1997-10-16 23:57:51 +00:00
fvdl ce56587f15 Bump last argument to VOP_READDIR to off_t (from u_long). 1997-10-10 02:01:05 +00:00
fvdl ebffddb531 Bump last argument to VOP_READDIR to off_t (from u_long). 1997-10-10 02:01:02 +00:00
fvdl ab940dcf06 Bump last argument to VOP_READDIR to off_t (from u_long). 1997-10-10 02:00:56 +00:00
mycroft 4383ea0b92 Make openstr[] const. 1997-10-09 13:12:01 +00:00
mycroft 64d080efe0 Make various standard wmesg strings const. 1997-10-09 12:59:50 +00:00
thorpej c9efd0562e Make the vfs ops and vnodeop_opv symbols match the name of the
file-system option used to configure the file system into the kernel.
1997-10-06 09:32:31 +00:00
leo e0f973ee3b Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
1997-09-19 19:14:20 +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
drochner aa015962db Since there is a "%qx" printf format, don't truncate to long for
debug output.
1997-07-04 19:22:48 +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
thorpej a149ed59e4 Eliminate use of dtom() in the handing of UNIX domain sockets. Add an
"unp_addrlen" member to the unpcb, and use it when copying the socket
name.  This eliminates that last uses of dtom() in the system.
1997-06-24 19:12:53 +00:00
kleink a1c6b08386 When reading from an empty FIFO no process has opened for writing, and
O_NONBLOCK is set, return 0.
1997-05-18 12:19:29 +00:00
pk 80bb266e0e NULL => 0 (Arne Juul; PR#3629) 1997-05-17 20:31:15 +00:00
pk 420dea1e9a Move `struct kern_target' definition into kernfs.h 1997-05-10 22:04:13 +00:00
mycroft 3be66b88fe Update for lookup() changes. 1997-05-09 04:05:01 +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 0f09f99ae1 Need stat.h. 1997-05-05 07:19:05 +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
fvdl aadf9a1d0f fdesc_seek -> genfs_seek, not genfs_badop 1997-04-16 22:43:41 +00:00
kleink 9c16cd8a46 Implement a POSIX compliant genfs VOP_SEEK() and use it in the appropriate
places; by Chris G. Demetriou and myself.
1997-04-11 21:52:00 +00:00
cgd 89a4d9a733 don't try to use __builtin_return_address() on the Alpha. (It's never
worked as far as I can tell, and apparently crashes the kernel when
invoked here.)  From Ross Harvey, PR#3471.
1997-04-10 05:35:08 +00:00
kleink 8c04785710 Remove superfluous (uio_resid == 0) check. 1997-04-02 17:14:32 +00:00
kleink c1779f82c3 added advisory record locking support 1997-04-02 17:09:47 +00:00
mikel bd1ca0f680 this is umapfs, not lofs 1997-03-11 03:55:04 +00:00
mikel 812eb1fae4 this is nullfs, not lofs 1997-03-11 03:54:29 +00:00
mikel be4f5a32c1 use the proper entry count; from Yasufumi Itoh in PR kern/3175. 1997-02-20 05:04:05 +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
pk 3127b0c5e2 Fix short malloc & memory leak in union_relookup() (per Naofumi Honda; PR#3000). 1996-12-07 11:02:47 +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 605403ce1e portal_fsync -> genfs_nullop 1996-09-25 03:01:41 +00:00
mycroft 2bc736661a Implement poll(2). 1996-09-07 12:40:22 +00:00
thorpej 2c02b8ec56 Remove some unused variables. 1996-09-05 09:26:14 +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
mrg 2a0f025a41 use VATTR_NULL macro. 1996-06-14 09:27:23 +00:00
mycroft 95f26583aa Add a missing PHOLD()/PRELE() pair. 1996-06-11 01:49:38 +00:00
cgd f7f3f4299d print pointers with %p, rather than by printing with %x and casting to
(unsigned int).
1996-05-23 23:34:14 +00:00
mycroft ea64155398 Mirror changes in uipc_usrreq.c. 1996-05-23 18:45:14 +00:00
gwr 316f45753f Allow the DIAGNOSTIC to compile with old versions of gcc. 1996-05-17 20:53:11 +00:00
mrg d0f2ced7d2 use %p not %x for pointers 1996-05-13 07:13:23 +00:00
jtk 6ddae4d140 Implement proper `..' locking in lookup code to avoid many potential
deadlocks.

copy up properly when adding a link to lower-layer only file.
(I believe there are still more deadlocks remaining.)
1996-05-10 22:57:49 +00:00
jtk c9c8daaf7c Add locking code to avoid deadlocks on vnode reclaim, which means the
addition of null_lookup, null_lock, null_unlock, null_islocked.
1996-05-10 22:50:45 +00:00
christos 4ef330b934 remove include of <sys/cpu.h> 1996-04-22 01:38:12 +00:00
cgd 7e4d04910d fix screw-up in the prototyping changes: print pointers with %p, NOT
by casting them to (unsigned int) then printing with %x.
1996-04-13 01:34:06 +00:00
mrg 2a0a8867ae fix long-time bug in fdesc -- /dev/tty was a named pipe rather than a
mirror image of the real /dev/tty, a char dev.  make it a char dev.
1996-04-11 11:24:29 +00:00
christos da749d6e09 Fix printf format follies. 1996-03-16 23:52:42 +00:00
thorpej c685105f07 Don't deref a bad ucred pointer, from Dave Carrel <carrel@cisco.com>,
PR #1699.
1996-03-05 02:35:39 +00:00
mycroft 183aec8fa8 GC *_nullop(). Minor nits. 1996-02-13 13:12:48 +00:00
mycroft 5953a056eb GC dead_nullop(). 1996-02-13 13:02:40 +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
jtc 299e1fe9df Rename struct timespec fields to conform to POSIX.1b 1996-02-01 00:31:05 +00:00
mycroft 5f8d113e8a Don't include free blocks from the lower layer in statistics. 1996-01-30 16:45:10 +00:00
mycroft 2d1739cbe1 Implement VOP_BWRITE() using vn_bwrite(), per r_friedl@informatik.uni-kl.de. 1995-10-15 05:18:12 +00:00
mycroft 3dc2e10405 Fix the inode calculation in kernfs_getattr(). 1995-10-09 14:25:02 +00:00
mycroft 1e583dfb19 /dev/std* are of type DT_LNK. 1995-10-09 14:20:04 +00:00