Commit Graph

365 Commits

Author SHA1 Message Date
jdolecek bb8ceadfcc Adapt to struct fileops, soo_stat() changes.
Pointed out by Bernd Ernesti in private mail.
2001-04-07 17:37:09 +00:00
chs ac3bc537bd eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>
2001-03-15 06:10:32 +00:00
eeh a72ee87980 Add support for 64-bit SVR4 (Solaris 8) binaries. 2001-02-21 23:53:00 +00:00
jdolecek 522f569810 make some more constant arrays 'const' 2001-02-21 21:39:52 +00:00
eeh fb46d1eed4 Export bits needed by COMPAT_SVR4_32. 2001-02-11 01:16:42 +00:00
eeh c2a7dae9d2 Fix getuid() and getgid() to work like the Solaris ones. 2001-02-11 01:14:25 +00:00
eeh 7fd4c88055 Fix getuid() and getgid() calls to return both e[ug]id and r[ug]id. 2001-02-11 01:13:01 +00:00
thorpej 00d798f276 getpid(2) is MP-safe. 2001-01-27 07:59:58 +00:00
thorpej 1b6a66420e Regen; add sy_flags. 2001-01-27 07:23:06 +00:00
jdolecek e9e91a0fb5 split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.
2000-12-22 22:58:52 +00:00
mycroft f495cd9dc6 Introduce 2 new flags in types.h:
* __HAVE_SYSCALL_INTERN.  If this is defined, e_syscall is replaced by
  e_syscall_intern, which is called at key places in the kernel.  This can be
  used to set a MD syscall handler pointer.  This obsoletes and replaces the
  *_HAS_SEPARATED_SYSCALL flags.
* __HAVE_MINIMAL_EMUL.  If this is defined, certain (deprecated) elements in
  struct emul are omitted.
2000-12-11 05:28:59 +00:00
jdolecek 8f9b01eba1 prototype svr4_syscall() (only) in compat/svr4/svr4_exec.c 2000-12-09 12:44:26 +00:00
jdolecek a6ca890142 always fill in e_syscall in respective emul_*; if the emulation doesn't
have it's own separated *_syscall() function, use syscall()
2000-12-09 12:38:23 +00:00
mycroft 77b46f5749 Oops; missed a critical #include. 2000-12-09 06:25:03 +00:00
mycroft 95bdfed457 Add hook for a separate svr4_syscall(). 2000-12-09 06:20:17 +00:00
mycroft 51e3b887d7 Regen. 2000-12-09 06:19:40 +00:00
mycroft e2743f72a9 Round up the sysent table size. 2000-12-09 06:15:42 +00:00
mycroft f348afacb9 Regen. 2000-12-09 05:37:01 +00:00
mycroft 9682cf0b09 Add the %% separators. 2000-12-09 05:27:28 +00:00
jdolecek 2ff42428df put elf32 specific code from svr4_exec.c to separate file svr4_exec_elf32.c 2000-12-01 19:26:26 +00:00
jdolecek 01040d97a2 add e_path (emulation path) to struct emul, which replaces emulation-specific
*_emul_path variables

change macros CHECK_ALT_{CREAT|EXIST} to use that, 'root' doesn't need
to be passed explicitly any more and *_CHECK_ALT_{CREAT|EXIST} are removed
change explicit emul_find() calls in probe functions to get the emulation
path from the checked exec switch entry's emulation

remove no longer needed header files

add e_flags and e_syscall to struct emul; these are unsed and empty for now
2000-12-01 12:28:30 +00:00
jdolecek 6626f506b3 LKMify 2000-11-30 19:05:26 +00:00
jdolecek 73f3cd8c7e LKMify 2000-11-29 21:51:49 +00:00
jdolecek baae0324b9 restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
  provide single struct emul per emulation
* elf:
  - kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
    per emulation and contains pointer to respective probe function
  - interp is allocated via MALLOC() rather than on stack
  - elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
  to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
  emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
  part of appropriate execsw[] entry
* constify couple of structures
2000-11-21 00:37:49 +00:00
jdolecek 78b866e95a change the type of *syscallnames[] array to 'const char * const foo[]' 2000-11-13 21:32:15 +00:00
jdolecek a777f280d1 fix obvious bug in svr4_sys_resolvepath():
since we have not requested locked vnode (LOCKLEAF is not used for namei()
call), the vnode is returned unlocked, so we need to use vrele(), not vput()

This fixes kern/11044.
2000-09-21 21:24:33 +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
ad decb1dcfcf const tty{numbers,letters}, and remove PCVT hack. 2000-09-11 15:12:40 +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
bouyer 629150f864 Add the sched_suspend/sched_resume functions, as discussed on tech-kern,
with the following modifications to the initial patch:
- rename SHOLD and P_HOST to SSUSPEND and P_SUSPEND to avoid confusion with
  PHOLD()
- don't deal with SSUSPEND/P_SUSPEND in fork1(), if we come here while
  scheduler is suspended we're forking proc0, which can't have P_SUSPEND set.

sched_suspend() suspends the scheduling of users process, by removing all
processes from the run queues and changing their state from SRUN to
SSUSPEND. Also mark all user process but curproc P_SUSPEND.
When a process has to be put in SRUN and is marked P_SUSPEND, it's placed in
the SSUSPEND state instead.
sched_resume() places all SSUSPEND processes back in SRUN, clear the P_SUSPEND
flag.
2000-08-31 14:36:19 +00:00
sommerfeld 99d6bcc3e1 more range-checking.
In debug code, limit the size of malloced buffers to a reasonable amount.
2000-08-30 01:13:22 +00:00
sommerfeld 90eb61037d Range-check ioc->len 2000-08-29 15:15:13 +00:00
sommerfeld 6b88a0fc51 Emulation stackgap sanity checks, based partly on fixes from
FreeBSD-SA00:42.

Change stackgap_alloc to bounds-check the allocation vs. the stack
gap, returning NULL if there isn't room for the allocation.

Change emul_find() to check for a NULL return from stackgap_alloc()
and convert that into ENAMETOOLONG.

Reorder various emulation syscalls so that all *_CHECK_ALT_{EXIST,CREAT}
calls (which turn into emul_find() under the covers come *after* small,
fixed-size stackgap_alloc() calls.

Clean up ibcs2 {get,set}groups.
2000-08-29 14:33:25 +00:00
cgd 0199b04bef update for changed makesyscalls.master 2000-08-18 19:35:15 +00:00
cgd 3af42e5211 update for changed makesyscalls.sh 2000-08-18 19:26:56 +00:00
bjh21 24f9914cb3 Second phase of changes to remove ntp_adjtime(2) from the kernel entirely if
NTP is not defined.

Also removes sysctl_ntptime, since that's unreferenced without NTP.

ntp_gettime(2) is left alone, since it doesn't raise SIGSYS, which sys_nosys()
does.
2000-08-07 18:10:20 +00:00
bjh21 a9397f5bfc Changes to syscalls.master to exclude ntp_adjtime(2) entirely if NTP is not
defined.  Changes to other files will follow in a moment.
2000-08-07 17:59:33 +00:00
thorpej 7cc27a88c0 Convert namei pathname buffer allocation to use the pool allocator. 2000-08-03 20:41:05 +00:00
mrg 705b50bf32 fix LP64 warnings. 2000-07-27 14:00:56 +00:00
thorpej 9d069ade37 Sprinkle some const. 2000-07-14 18:26:46 +00:00
mrg 13f211c52e remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-28 15:39:24 +00:00
augustss 040884b5e6 Regen (no difference in generated files, but they were not up-to-date). 2000-06-27 20:59:23 +00:00
mrg 89d0a3e519 remove redundant vm includes. 2000-06-26 14:38:50 +00:00
soren 7a3db3e7fe Wrap line. 2000-06-06 18:07:33 +00:00
thorpej e03e9e8086 Rather than starting init and creating kthreads by forking and then
doing a cpu_set_kpc(), just pass the entry point and argument all
the way down the fork path starting with fork1().  In order to
avoid special-casing the normal fork in every cpu_fork(), MI code
passes down child_return() and the child process pointer explicitly.

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.
2000-05-28 05:48:59 +00:00
christos e3004f2598 make this compile with -DDEBUG_SVR4 [lossage because sizeof is u_long now] 2000-04-12 15:12:13 +00:00
christos aca4545896 Markus Kilbinger <kilbi@rad.rwth-aachen.de>, reported that https: does not work.
The reason is that netscape tries to do stream operations on a plain file. So
we avoid that...
2000-04-12 02:46:41 +00:00
christos e6baf1c570 Follow the unused convention. 2000-04-09 22:40:11 +00:00
christos 93f27a1a74 Print the extra bits in the SS_ flags. Somehow lwp uses 0x6f00000b0. What is
0x6fxxxxxx. Inquiring minds would like to know :-) It does not appear to be
documented.
2000-04-09 06:28:28 +00:00
christos 9813882e34 Add new sysconfig bits.
Fix the bogus numbering of the old bits.
2000-04-09 05:33:04 +00:00