Commit Graph

2331 Commits

Author SHA1 Message Date
jdolecek 78b866e95a change the type of *syscallnames[] array to 'const char * const foo[]' 2000-11-13 21:32:15 +00:00
jdolecek ab8c5177be use SIGACTION() macro to get on appropriate sigaction
structure
2000-11-12 18:17:56 +00:00
eeh df87630144 Add console magic sequence framework. 2000-11-08 22:41:58 +00:00
ad 642267bcc7 Update for hashinit() change. 2000-11-08 14:28:12 +00:00
ad 5fcf59fd7c Allow for creation of both LIST and TAILQ based hashes by adding a `hash
type' argument to hashinit().
2000-11-08 14:25:23 +00:00
chs ff1e758c8c use round_page(...) instead of roundup(..., NBPG). 2000-11-08 05:53:10 +00:00
chs a74393b970 remove unneeded includes. 2000-11-08 05:47:56 +00:00
chs a284236c04 in fork1(), only add make the new proc visible (by giving it a pid
and adding it to allproc) after it's fully initialized.
this prevents the scheduler from coming in via a clock interrupt
and tripping over a partially-initialized proc.
2000-11-08 05:16:23 +00:00
jdolecek 7d8eefdffc add void *p_emuldata into struct proc - this can be used to hold per-process
emulation-specific data
add process exit, exec and fork function hooks into struct emul:
* e_proc_fork() - called in fork1() after the new forked process is setup
* e_proc_exec() - called in sys_execve() after the executed process is setup
* e_proc_exit() - called in exit1() after all the other process cleanups are
  done, right before machine-dependant switch to new context; also called
  for "old" emulation from sys_execve() if emulation of executed program and
  the original process is different

This was discussed on tech-kern.
2000-11-07 12:41:52 +00:00
jdolecek 75823fcfc2 write KTR_EMUL entry on end of fork1() - primarily usable when the new
process never does execve(2), such as when creating a thread
2000-11-07 12:31:17 +00:00
tv c6a1ef4f70 8 spaces -> tab 2000-11-05 22:41:35 +00:00
jdolecek e8e4da6b87 add new function sigismasked(), which checks whether passed signal
is ignored or masked by the process, and use it appropriately
instead of directly checking p->p_sigmask and p->p_sigignore
2000-11-05 15:37:09 +00:00
enami 08810e4e74 Make this file compile again. 2000-11-02 06:57:01 +00:00
eeh d85adca51f Make line disciplines modular so they can be added or removed dynamically. 2000-11-01 23:51:38 +00:00
he a08889417a Use an rlim_t to store "available memory", so we don't needlessly
overflow and/or sign extend.
2000-10-29 18:38:47 +00:00
christos 0628f0a87e knf [from charles] 2000-10-17 23:38:55 +00:00
christos 23c15f1578 Don't set P_SUGID if the calls to set{e,}{u,g}id(), setreuid(),
setgroups() did not result in actual changes. This has the nice
side effect that we don't needlesly allocate new credential and
resource limit data structures.

This is so that non setuid programs that call seteuid(getuid()),
don't end up setting P_SUGID, resulting in broken behavior [i.e.
non setuid ssh, doesn't read ~/.hostaliases...].

This is a good candidate for a pullup, if someone reviews it.
2000-10-17 20:53:45 +00:00
itojun da566268df attach ARP domain only if INET is compiled into the kernel. 2000-10-02 04:27:21 +00:00
ad 50cf734d26 (*minphys)() musn't return zero. 2000-09-29 13:27:12 +00:00
eeh 1ecf6779be Add support for variable end of user stacks needed to support COMPAT_NETBSD32:
`struct vmspace' has a new field `vm_minsaddr' which is the user TOS.

	PS_STRINGS is deprecated in favor of curproc->p_pstr which is derived
	from `vm_minsaddr'.

	Bump the kernel version number.
2000-09-28 19:05:06 +00:00
enami 656bf989ab Factor out common code to manupilate file flags into separate function
like others do.
2000-09-28 06:43:20 +00:00
thorpej 69d28474b7 PHOLD/PRELE around uvm_io() to user address space is unnecessary. There
is nothing in the U-area that we need.
2000-09-26 23:59:23 +00:00
erh 3392996d23 Prevent ptrace on system processes. Avoids panic when attempting to ptrace pid 0, which has no parent. 2000-09-24 07:31:28 +00:00
bjh21 cf9703617a Conditionalise the declaration of sysctl_pty() so that we don't get a
compiler warning in the NPTY==0 case.
2000-09-23 11:33:05 +00:00
enami 6cf8248614 Stop runnable but swapped out user processes also in suspendsched(). 2000-09-23 01:00:35 +00:00
enami 25ea453471 Pathname of length 1023 (MAXPATHLEN - 1) should be valid as corename. 2000-09-23 00:48:29 +00:00
eeh ef06aa4d68 Fix unbalanced #endif. 2000-09-22 01:37:27 +00:00
eeh 3ec2906321 The files "kbd.h" and "ms.h" are defined in sys/dev/sun/files.sun. Only
include them for ports that are likely to use the Sun line disciplines.
2000-09-22 01:24:07 +00:00
eeh 9220a0cf6b Sun Keyboard/Mouse line discipline support. 2000-09-21 23:31:14 +00:00
bjh21 1f4240a461 Extend NFS_V2_ONLY to remove NQNFS lease support as well. Saves another 10k. 2000-09-19 23:26:25 +00:00
fvdl a6a5e6cca7 Adapt for VOP_FSYNC parameter change.
Small optimization to shutdown code: only take the syncer lock if
the FS actually used it.
2000-09-19 22:01:41 +00:00
fvdl 8c28d7e864 Adapt for VOP_FSYNC parameter change. 2000-09-19 22:00:01 +00:00
fvdl 9d8dbdad9a Regen. 2000-09-19 21:58:01 +00:00
fvdl bf60f8be2e Add start and end parameters to the fsync VOP, giving a range of the
file to write out. If both are 0, the whole file is synced. A filesystem
that is not able to sync out a range of a file may elect to sync
the whole file anyway.
2000-09-19 21:57:14 +00:00
enami 48b7bc7f16 The struct prochd isn't a proc. Start scaning from prochd.ph_link instead
of &prochd.
2000-09-15 06:36:25 +00:00
thorpej 03810b147f Make sure to lock the proclist when we're traversing allproc. 2000-09-14 19:13:29 +00:00
thorpej e3d2277d32 Regen: VNODE_OP_NOINLINE vs. LKM. 2000-09-13 16:09:52 +00:00
thorpej 7f3e4b0331 If building an LKM, always cause it to use the non-inline version
of the vnode ops, and if LKM support is included in the kernel,
always include the non-inline stubs regardless of whether or not
they're being used in the static kernel iamge.
2000-09-13 16:09:27 +00:00
thorpej 5d879e9012 Regen for VNODE_OP_NOINLINE. 2000-09-13 15:51:19 +00:00
thorpej 9d482308b1 Allow the VOP_*() calls to be un-inlined with the VNODE_OP_NOINLINE
kernel option.  Saves 36k of kernel text on an i386 GENERIC.  Useful
for install media kernels, small memory systems, embedded systems.
2000-09-13 15:50:26 +00:00
thorpej 72a24b4eae Add an align argument to uvm_map() and some callers of that
routine.  Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
2000-09-13 15:00:15 +00:00
thorpej e0797e1775 Fix 0 vs. NULL confusion. 2000-09-11 18:45:29 +00:00
pk 13275642e0 make compile #if LOCKDEBUG is on. 2000-09-11 13:51:29 +00:00
jdolecek ae3a3247bb handle KERN_MAXPTYS via new sysctl_pty(), which uses pty_maxptys() provided
by tty_pty.c
2000-09-10 17:29:50 +00:00
jdolecek 9bdbbbc834 change DEFAULT_MAXPTYS to 256
make all local variables static
use simplelocks - we really need only mutexes, full locks are not necessary
update couple of comments to be more accurate

add function pty_maxptys(), which provides a safe way to get&set maxptys - this
	also supports setting maxptys to lower than current value, if the
	value is lower or equal current number of ptys
2000-09-10 17:26:45 +00:00
jdolecek 1ef0c139f9 allocate pty kernel structures on demand at run-time - this allows
to support arbitrary number of ptys without need of kernel recompile
(the extra device special files in /dev/ still need to be created, of course)

upper limit of supported ptys is controlled via new sysctl variable
kern.maxptys (KERN_MAXPTYS), which is raise-only and defaults to 512.
2000-09-09 16:42:04 +00:00
sommerfeld c9febd72cb Lock scheduler before putting new proc on run queues. 2000-09-06 14:06:42 +00:00
bouyer ca5824ec3b Implement suspendsched() by putting all sleeping and runnable processes
in SSTOP state, execpt P_SYSTEM and curproc processes. We have to way to
find the original state of the process so we can't restart scheduling,
so this can only be used at shutdown time.

XXX suspendsched() should also deal with processes running on other CPUs.
I don't know how to do that, and as long as we have a kernel big lock,
this shouldn't be a problem.
2000-09-05 16:27:51 +00:00
bouyer aacf1f7a6a Back out the suspendsched()/resumesched() thing, per request of Jason Thorpe &
Bill Sommerfeld. suspendsched() will be implemented in a different way.
2000-09-05 16:20:27 +00:00
enami 445cbcb8c1 Accquire vnode interlock while playing with flags to see if there
is someone waiting this vnode.
2000-09-05 05:13:43 +00:00