Commit Graph

96 Commits

Author SHA1 Message Date
mycroft fb526e055c Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.
1998-09-11 12:50:05 +00:00
eeh a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
perry 275d1554aa Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)
1998-08-04 04:03:10 +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 808867c7cf defopt KTRACE 1998-06-25 21:17:15 +00:00
christos 02cecf686a New fktrace syscall from Darren Reed [with fixes from me] 1998-05-02 18:33:19 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +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
enami 74a36a05ae No longer needs to include sys/shm.h. 1998-01-01 02:43:18 +00:00
thorpej a322314f51 Split out the code that prepares a VM space for exec into a new
vmspace_exec() function.
1997-12-31 07:47:41 +00:00
mycroft 16a8787248 Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way.  (See tech-kern.)
1997-09-11 23:01:44 +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 d7f33c5e60 va_mode contains stat bits. Use S_IS[UG]ID rather than VS[UG]ID. 1997-05-08 10:19:10 +00:00
mycroft b34794e10f Do not return success when checking for execute permission by super-user and no
execute bits are set.  Also, this test is no longer needed in execve(2).
1997-04-23 20:18:16 +00:00
kleink cb9c71d716 Back out last change: just return EACCESS for any non-VREG file.
Fixes PR/3472 from Matthias Pfaller.
1997-04-10 19:45:40 +00:00
mycroft e01c3bbe05 Return EISDIR for directories, not EACCES. 1997-03-14 06:12:11 +00:00
mrg 7de1b7c8eb only set P_SUGID once. 1997-01-07 10:41:02 +00:00
cgd e7af2a8237 * catch up with system call argument type fixups/const poisoning.
* Fix arguments to various copyin()/copyout() invocations, to avoid
  gratuitous casts.
* Some KNF formatting fixes
1996-12-22 10:21:06 +00:00
cgd 3b34cba879 exec vnode locking protocol changes: in a nutshell, don't keep vnodes
locked for any longer than we have to.
1996-09-30 23:18:43 +00:00
cgd 2f42e5b8ed fix some typos and clean up some comments. 1996-09-26 23:34:46 +00:00
christos 09afd77655 More proto fixes 1996-02-09 18:59:18 +00:00
christos 8a5b1b92e2 First pass at prototyping 1996-02-04 02:15:01 +00:00
mycroft feb42498e3 If we abort, make sure to free ep_emul_arg. 1995-12-09 04:11:00 +00:00
mycroft 245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
thorpej 60024eb978 Make system calls conform to a standard prototype and bring those
prototypes into scope.
1995-09-19 21:40:36 +00:00
christos 7de0fcfd12 Add KTR_EMUL to indicate a switch between syscall emulations.
Currently this record is emitted only on exec. Maybe it should
be emitted on ktrace() attach too.
1995-07-19 15:19:08 +00:00
mycroft bfd22ffde8 Generate the new ps_strings format. 1995-05-16 14:19:03 +00:00
cgd 2581c66077 remember first error code (if any) that's different than ENOEXEC.
Not perfect, but there's no perfect solution to the "multiple interesting
error codes" problem.
1995-05-01 22:36:45 +00:00
christos 3d1b06ab09 - new copyargs routine.
- use emul_xxx
- deprecate nsysent; use constant SYS_MAXSYSCALL instead.
- deprecate ep_setup
- call sendsig and setregs indirectly.
1995-04-22 19:42:47 +00:00
mycroft c75f9f2e07 Change `fdclose' to `fdrelease', to avoid confusion with device interfaces. 1995-04-10 18:27:59 +00:00
fvdl 366ba9b889 Use sigcode fields in package structure. This seems to be the cleanest
way to deal with seperate trampoline code for emulation of other OSs,
it avoids having to clutter up kern_exec.c any further.
1995-04-07 22:33:23 +00:00
mycroft 2f805fa51b copy*str() should use size_t. 1995-03-09 12:05:21 +00:00
cgd 6782442a8c use long for argc, envc, and u_long for len. 1995-03-08 01:23:00 +00:00
cgd c7fde1470b various XXX changes that linux bins need to get their args correctly. 1995-02-28 23:09:01 +00:00
mycroft e8f67573e2 Align the stack even if envp is NULL. 1995-02-22 01:39:56 +00:00
mycroft a8dd9a66e2 Optimize differently. 1995-02-04 14:44:48 +00:00
mycroft 5561e58072 Small optimization. 1995-02-04 14:22:13 +00:00
mycroft 90ef05a32c Use common fdclose() rather than a private version. 1994-12-04 03:10:40 +00:00
deraadt dc7de949e9 change exec_setup_fcn() to be more useful (from christos) 1994-10-24 05:32:19 +00:00
cgd 6b86130410 update for new syscall args description mechanism 1994-10-20 04:22:35 +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 699bbb84b6 Update to 4.4-Lite fs code. 1994-06-08 11:28:29 +00:00
mycroft d1f36d3007 fname --> path 1994-05-27 08:44:12 +00:00
deraadt d0f39cffd9 return 0 on success 1994-05-27 07:58:37 +00:00
cgd ebcaebd335 MIN -> min, MAX -> max 1994-05-24 02:35:53 +00:00
cgd 82fabd73d5 struct execve_args now defined in exec.h 1994-05-21 07:48:10 +00:00
cgd 72db136279 kill bogus include 1994-05-07 04:17:10 +00:00
cgd 4bbabd8e7a Rename a lot of process flags. 1994-05-04 03:41:12 +00:00
cgd f50f031448 kill syscall name aliases. no user-visible changes 1994-04-29 04:41:02 +00:00