Commit Graph

1626 Commits

Author SHA1 Message Date
thorpej e8b92fa131 Oops, back out previous. I need to attack that problem differently. 1998-08-01 01:20:43 +00:00
perry 730baa7431 fix sizeofs so they comply with the KNF style guide. yes, it is pedantic. 1998-07-31 22:50:48 +00:00
thorpej 17e88cf50e Initialize the mbuf allocator _before_ autoconfiguration; it might be
called when devices attach.
1998-07-31 21:59:55 +00:00
thorpej fe7696eacb Un-static pool_head; vmstat wants to find it. 1998-07-31 21:55:09 +00:00
kleink 17de9df6c1 Reject an iovcnt argument of 0 to readv(), writev(), preadv() and pwritev()
as invalid.  This has been stated by the respective manual pages at least
since Net/2, and is the behaviour specified by XSH5.
1998-07-31 15:38:58 +00:00
mycroft f53fedba63 Regen. 1998-07-30 00:46:27 +00:00
mycroft d588e17601 __Namespace__ __protection__. 1998-07-30 00:46:01 +00:00
thorpej 4b039671de When checking for overflow in the residual count, test against SSIZE_MAX.
The read/write system calls return ssize_t because -1 is used to indicate
error, therefore the transfer size MUST be limited to SSIZE_MAX, otherwise
garbage can be returned to the user.

There is NO change from existing behavior here, only a more precise
definition of that the semantics are, except in the Alpha case, where
the full SSIZE_MAX transfer size can now be realized (ssize_t is 64-bit
on the Alpha).
1998-07-29 02:07:19 +00:00
thorpej 6326c90134 Change the "aresid" argument of vn_rdwr() from an int * to a size_t *,
to match the new uio_resid type.
1998-07-28 18:37:47 +00:00
thorpej e95c22ee96 Don't cast the null residual pointer passed to vn_rdwr(). 1998-07-28 18:17:34 +00:00
thorpej 80e25bcca0 Don't cast the null residual pointer passed to vn_rdwr(). 1998-07-28 18:11:39 +00:00
thorpej 939279f988 When checking for overflow in the residual count, test against SSIZE_MAX.
The read/write system calls return ssize_t because -1 is used to indicate
error, therefore the transfer size MUST be limited to SSIZE_MAX, otherwise
garbage can be returned to the user.

There is NO change from existing behavior here, only a more precise
definition of that the semantics are, except in the Alpha case, where
the full SSIZE_MAX transfer size can now be realized (ssize_t is 64-bit
on the Alpha).
1998-07-28 17:58:29 +00:00
thorpej bf51a1d137 uvm_deallocate() takes an address and a size, not an address range. From
ITOH Yasufumi <yasufu-i@is.aist-nara.ac.jp>, PR #5834.
1998-07-24 20:47:59 +00:00
thorpej fc4828b0b4 A few small changes to how pool pages are allocated/freed:
- If either an alloc or release function is provided, make sure both are
  provided, otherwise panic, as this is a fatal error.
- If using the default allocator, default the pool pagesz to PAGE_SIZE,
  since that is the granularity of the default allocator's mechanism.
- In the default allocator, use new functions:
	uvm_km_alloc_poolpage()/uvm_km_free_poolpage(), or
	kmem_alloc_poolpage()/kmem_free_poolpage()
  rather than doing it here.  These functions may use pmap hooks to
  provide alternate methods of mapping pool pages.
1998-07-24 20:19:23 +00:00
sommerfe 1c2f0a15fd Don't create the extent region pool until one of our callers is of the
opinion that it's safe to call malloc.
1998-07-24 06:40:45 +00:00
pk 4e465abf3f Use a memory pool instead of malloc to allocate region descriptors. 1998-07-23 20:57:17 +00:00
pk e32923a128 Re-vamped pool manager.
* support for customized memory supplier
	* automatic page reclaim by VM system
	* time-based hysteresis
	* cache coloring (after Bonwick's "slabs")
1998-07-23 20:34:00 +00:00
lukem 786b86d71b use AF_LOCAL instead of AF_UNIX 1998-07-18 05:04:35 +00:00
thorpej 4c50a37133 Back out previous, I botched something. 1998-07-16 00:46:50 +00:00
pk 3036bcf8e5 Close a descriptor leak. This proved especially detrimental under heavy
paging.
1998-07-15 12:38:29 +00:00
thorpej b20c7bf68c For SOCK_STREAM, provide the socket credentials to the accepter as soon as
the client connects.
1998-07-10 22:15:47 +00:00
jonathan b37021c1a1 defopt NATM. 1998-07-05 22:48:05 +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
jonathan 011f2bda08 defopt NS, NSIP. 1998-07-05 06:49:00 +00:00
jonathan 5c0c5dd0b4 defopt ISO TPIP. 1998-07-05 04:37:35 +00:00
jonathan 8db0fcdbf7 defopt CCITT. 1998-07-05 02:12:22 +00:00
jonathan 3751946b97 defopt INET, NETATALK. 1998-07-05 00:51:04 +00:00
jonathan 466e784ee1 defopt DDB. 1998-07-04 22:18:13 +00:00
thorpej e5f49cece3 Regen: pad off_t args in pread/pwrite/preadv/pwritev. 1998-07-02 01:24:24 +00:00
thorpej d4e618b3a5 Argh, pad the off_t args in pread/pwrite/preadv/pwritev. System call
numbers don't change since the window of brokenness was so small (1 day).
1998-07-02 01:23:33 +00:00
thorpej bc799897fc Implement pread(2), pwrite(2), preadv(2), and pwritev(2). 1998-06-30 19:36:24 +00:00
thorpej 1f37d1d569 Regen: added pread(2), pwrite(2), preadv(2), pwritev(2). 1998-06-30 19:34:20 +00:00
thorpej f0dda0d383 Add positional read and write system calls:
- pread() (#173) and pwrite() (#174), which are defined by XPG4.2.  System
  call numbers match Solaris.
- preadv() (#289) and pwritev() (#290), which are the positional cousins
  of readv() and writev(), but not defined by any standard.
1998-06-30 19:33:11 +00:00
thorpej b6781dbaa2 Split up read/readv/write/writev into the system call front-end and
the guts that actually perform the I/O request.
1998-06-30 07:39:22 +00:00
thorpej a4a34ba74a Add two additional arguments to the fileops read and write calls, a
pointer to the offset to use, and a flags word.  Define a flag that
specifies whether or not to update the offset passed by reference.
1998-06-30 05:33:11 +00:00
nathanw 30cbf42b77 Implement short corefile name support, controlled by options SHORTCORENAME
and sysctl kern.shortcorename.

Closes PR kern/5191.
1998-06-28 21:34:58 +00:00
thorpej 816e12eac2 defopt COMPAT_SVR4 1998-06-26 00:07:06 +00:00
thorpej 37b378d836 defopt COMPAT_HPUX 1998-06-25 23:56:39 +00:00
thorpej 8aee7782f5 defopt COMPAT_SUNOS 1998-06-25 23:40:33 +00:00
thorpej 311bac3348 defopt COMPAT_IBCS2 1998-06-25 23:22:37 +00:00
thorpej c466f11939 defopt COMPAT_LINUX 1998-06-25 23:18:23 +00:00
thorpej 1a2cb1b9d4 defopt COMPAT_FREEBSD 1998-06-25 22:49:18 +00:00
thorpej 6b781d156f defopt NFSSERVER 1998-06-25 22:17:36 +00:00
thorpej 23e23646da Regen: defopt NFSSERVER 1998-06-25 22:17:21 +00:00
thorpej d87e6c2b0e defopt NFSSERVER 1998-06-25 22:16:01 +00:00
thorpej 808867c7cf defopt KTRACE 1998-06-25 21:17:15 +00:00
thorpej 5b5a9f45a5 Regen: defopt KTRACE 1998-06-25 21:16:58 +00:00
thorpej d6289815b4 defopt KTRACE 1998-06-25 21:15:35 +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
thorpej 387a1c5d41 Implement config_defer(), a generic mechanism to defer the configuration
of a device until all of its parent's children have been attached.
1998-06-09 18:46:12 +00:00
kleink 636443752e Nuke a couple of non-local prototypes which are already declared in either
<sys/buf.h>, <sys/mount.h> or <sys/vnode.h>.
1998-06-08 15:52:07 +00:00
thorpej 618c279d16 Add fine-grained locking. Still one refinement to make, which will be
done in a separate commit.
1998-06-06 02:25:46 +00:00
kleink 4648a78bba Regen: addition of fdatasync(). 1998-06-05 20:36:53 +00:00
kleink e9d6f5e996 Per IEEE Std 1003.1b-1993, implement the fdatasync() system call which is
identical to fsync() with the expecption of not being required to synchronize
file status information.
1998-06-05 20:31:36 +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 b5a587ab63 Regen: fsync argument change. 1998-06-05 19:41:21 +00:00
kleink c77a008cc2 Replace the `waitfor' argument to the fsync vnode operator with a `flags'
argument.
1998-06-05 19:38:56 +00:00
kleink 4c3bf73d01 Regen: mlock() and munlock() prototype changes. 1998-05-30 22:23:30 +00:00
kleink bb7e6a0bdd Per XSH98, const'ify the `addr' arguments to mlock() and munlock(). 1998-05-30 22:21:03 +00:00
kleink 2a4b2482f5 Permit checking the availability of the POSIX File Synchronization Option
(a/k/a fsync(2)), System V style message queues, semaphores and shared memory
at runtime by adding a sysctl variable for each.
1998-05-24 19:52:01 +00:00
matt b2c24dbcbe Add an if_drain to the ifnet structure (call when the system is low
on mbufs).  Add code to m_reclaim to call if_drain in each ifnet
that has one set.  Remove register from declarations.
1998-05-22 17:47:21 +00:00
thorpej ad7a87400a defopt LOCKDEBUG 1998-05-20 01:32:29 +00:00
pk d0e85dde99 Inline vref/vrele in vclean() because:
* we already have the vnode interlock, so vref() should not ask for it again.
* we call VOP_RECLAIM/VOP_INACTIVE(), which shouldn't be duplicated in vrele().
1998-05-18 14:59:49 +00:00
pk addb5d9572 VOP_CLOSE() takes F* flags, not IO_* flags. 1998-05-08 21:02:35 +00:00
kleink fe2d01988e Fix some arithmetics lossage on typeless pointers. 1998-05-08 18:18:55 +00:00
kleink bd6d376a49 Various SysV IPC prototype changes. 1998-05-07 18:00:49 +00:00
kleink fb27bb18d3 Regen: various SysV IPC prototype changes. 1998-05-07 17:24:30 +00:00
kleink e3611654cd Several SYSV IPC prototype changes. 1998-05-07 17:08:42 +00:00
enami 9ad895e33c Backout previous issignal() change so that gdb can trace a process
which has subprocess again; the lite2 change conflicts our local change.
1998-05-07 00:45:16 +00:00
thorpej 7f21dfafc1 Add monotonically increasing "current time" stamps for pfslowtimo() and
pffasttimo().
1998-05-06 01:11:46 +00:00
christos 1efd649b47 Regen 1998-05-02 18:34:13 +00:00
christos 02cecf686a New fktrace syscall from Darren Reed [with fixes from me] 1998-05-02 18:33:19 +00:00
thorpej 73863dd3c9 Pass vslock() and vsunlock() a proc *, rather than implicitly operating
on curproc.
1998-04-30 06:28:57 +00:00
mycroft f327fee4ca Fix KTROP_CLEARFILE so it does the same thing as KTROP_CLEAR (i.e. vrele()
rather than vn_close()).  Fixes PR 5357.
1998-04-28 22:27:22 +00:00
kleink 82eb51ee05 In soshutdown(), decouple the evaluation of the `how' argument from FREAD
and FWRITE; use SHUT_{RD,WR,RDWR} instead.
Also, return EINVAL if `how' is invalid.
1998-04-27 13:31:45 +00:00
thorpej 7a239c12c6 In vfs_unmountall(), if curproc is NULL, abort, because unmounting
puts the requesting process to sleep until the file systems buffers
have flushed, and sleeping with a NULL curproc will cause a fault.
1998-04-26 19:10:33 +00:00
thorpej cbc64bb02d Make vfs_shutdown() look a little nicer. 1998-04-26 18:58:54 +00:00
mycroft 359fa37f9a Fix a condition where we might erroneously write out a buffer with garbage
left in it.
Fixes PR 5354.
1998-04-26 14:45:23 +00:00
matthias 818f5df269 new command "config" to set type (for c), constraint and printmodifier. 1998-04-25 19:48:27 +00:00
matt 754c43dcfc Hook for 0-copy (or other optimized) sends and receives 1998-04-25 17:35:18 +00:00
jonathan 6c0abe64fc defopt NTP and PPS_SYNC, in preparation for adding PPS support. 1998-04-22 07:08:11 +00:00
thorpej 2018d40811 Allocate kernel virtual address space for the U-area before allocating
the new proc structure when performing a fork.  This makes it much
easier to abort a fork operation and return an error if we run out
of KVA space.

The U-area pages are still wired down in {,u}vm_fork(), as before.
1998-04-09 00:23:38 +00:00
mycroft ca63148e3d Oops; forgot to update prototype. 1998-03-30 06:18:05 +00:00
mycroft f1ed6cae04 Argument to main() is no longer used. 1998-03-30 06:15:44 +00:00
mrg af54a244f4 add missing int to typedef 1998-03-30 02:32:38 +00:00
mrg f0fc5e8ca7 remove register from decl. 1998-03-29 05:19:43 +00:00
kleink 5d9a1f3207 Regen: syscalls.master changed. 1998-03-27 13:09:52 +00:00
kleink 3a1500efe9 Per X/Open CAE Spec Issue 5 Version 2, change the buffer size argument of
readlink() from type `int' to type `size_t'.  This isn't an ABI change, since
the calling convention of our only LP64 platform (the Alpha) already promotes
this argument to a `long'.

This may not be the final action on this matter; readlink() still returns
an `int', which may change in a future revision of the standard.
1998-03-27 13:02:20 +00:00
thorpej b436157e65 Make proc0 use the statically-allocate vmspace0 again, and make it use
the kernel's pmap, since proc0 (and other that share its address space)
are kernel-only processes, and should never contain userspace mappings.

This makes it easier to detect errors, like entering user mappings
for kernel processes, in pmap modules, and makes some sense, considering
that kernel processes are really just "thread contexts" for the kernel.
1998-03-27 01:52:01 +00:00
thorpej 272d8a4a38 Process 2 (the pagedaemon) always runs in kernel space, so share VM
space with proc0.
1998-03-22 18:22:07 +00:00
mycroft 2bb5067e13 Move the code to wait for carrier on a tty into a common function, since it
depends only on device-independent state bits.
Implement SunOS-style `dialout' devices.
1998-03-22 00:55:37 +00:00
mycroft 2ada4b4af1 Replace TS_WOPEN with t_wopen, per mail on tech-kern. 1998-03-21 04:02:47 +00:00
kleink 071ab13ebb Move the permission check in change_owner() back to ufs_vnops::ufs_chown()
again - the facility required in this context would be a filesystem-specific
super-user determination, which is not available yet.  Also, add some
clarification to a comment.
1998-03-10 11:49:33 +00:00
fvdl 1d02bb10d8 Clarify vget() comment a bit. 1998-03-04 09:13:48 +00:00
thorpej 9ebbb62608 Export spechash_slock; it's used outside of vfs_subr.c 1998-03-03 02:22:00 +00:00
thorpej 0080eaa0f5 Don't panic if DIAGNOSTIC in cluster_rbuild() if we aren't able to shed
memory in a buffer returned by geteblk().  Instrument the number of
occurrences.
1998-03-02 19:28:07 +00:00
ross 94ae870894 Compile post-lite2 with #ifndef DIAGNOSTIC 1998-03-01 09:51:29 +00:00
fvdl 78447a3cfd Regen. 1998-03-01 02:29:59 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00