Commit Graph

37 Commits

Author SHA1 Message Date
rmind
ad12c77015 Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
2012-02-19 21:05:51 +00:00
christos
d8bca0f24f add a copyin function for sigset so that we can use sigtimedwait1 from
emulations.
2011-11-18 03:34:13 +00:00
joerg
13011308e4 Explicitly initialize ucontext before calling getmcontext. 2011-02-03 21:45:31 +00:00
rmind
d00df28408 Replace M_IOV and some malloc(9)s with kmem(9), and while there:
- Fix invalid free (M_TEMP vs M_IOV) in do_sys_recvmsg(), spotted by jakllsch@.
  Also, same fix in osf1_sys_sendmsg_xopen().
- Fix attempt to free non-allocated memory in error path in netbsd32___getfh30().
- Plug a memory leak in compat_43_netbsd32_orecvmsg().
2010-04-23 15:19:19 +00:00
pooka
b25b016609 A few more instances of __sigtimedwait1 -> sigtimedwait1 2010-01-19 23:15:50 +00:00
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
wrstuden
fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
mrg
c2b95373bf remove clause #3 from my license where there are no other
copyright holders involved.
2008-05-29 14:51:25 +00:00
ad
284c2b9aef Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
2008-04-24 18:39:20 +00:00
dsl
7e2790cf6f Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
2007-12-20 23:02:38 +00:00
dsl
28bae79b27 ANSIfy most of the function definitions in sys/compat (but not ndis).
All by the magic of sed ...
2007-12-08 18:35:53 +00:00
ad
62fdbc4b9a LOCK_ASSERT -> KASSERT 2007-10-08 18:07:24 +00:00
dsl
ec918d6dc6 Modify the (recently added) compat_sigaltstack() #define to take the
values of the SS_ONSTACK and SS_DISABLE constants.
Use it to shorten the source files when this action is replicated.
Actually, given the monstrous complexity of sigaltstack1() there is
probably a much better way to do this...
2007-06-16 20:04:27 +00:00
christos
c61eed39a8 rename si_sigval -> si_value to match POSIX RTS. 2007-05-21 15:35:47 +00:00
dsl
d364d308c7 Change all the NETBSD32PTR64(SCARG(uap, xxx))) to SCARG_P32(uap, xxx). 2007-03-18 21:38:32 +00:00
dsl
a065e51621 remove all the double (and triple) casts used to convert 32bit userspace
pointers to and from 64bit kernel pointers.  Instead use the defines
NETBSD32PTR64(p32) to read a 32bit pointer and (the new) NETBSD32PTR32(p32,p64)
to write a 32bit pointer throughout.
The 32bit pointer is now a struct to enforce the above.
amd64 (with linux emul) and sparc64 will both compile (when the arch stuff
goes in soon), and amd64 still runs some i386 binaries.
2007-03-16 22:21:40 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
cube
0ff7d99ddb Make netbsd32_{get,set}ucontext and associated functions
{get,set}ucontext32 look like their native counterparts again after
newlock2 merge.  This avoids entering sigprocmask1 without the proc mutex
held...
2007-02-19 14:39:43 +00:00
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
drochner
b1af2cb9b9 -SUS says that a successful call to setcontext(2) does not return. This
implies that _UC_CPU must be set in the context passed. Check for this
 and return EINVAL if not; this gives a cheap test for corrupted
 ucontexts eg on a signal handler stack which would go unnoticed otherwise.
-Don't ckeck for NULL ucontext pointers explicitely. This is an error,
 except in the swapcontext() case where it can be easily caught in
 userland.
2006-11-08 20:18:32 +00:00
cube
37b7f4fbd8 SA introduce a new case of siginfo structure. Be ready for it when the
time comes to support SA in COMPAT_NETBSD32 (which is soon).
2006-03-15 09:09:47 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
chs
94be8205d7 make this compile again. 2005-09-27 14:37:06 +00:00
christos
91e84b20b0 make the siginfo converters static and comment out the one that is not used. 2005-09-24 21:34:18 +00:00
christos
dd40a9f6f6 include new compat siginfo header. 2005-09-24 17:29:47 +00:00
christos
58b392c018 make this compile again. 2005-09-13 03:23:09 +00:00
christos
b041fac92d Fix lossage I created with the 64 bit ino_t change. 2005-08-19 04:24:38 +00:00
cube
73fe747f11 Implement __sigtimedwait(2). 2005-07-23 22:03:45 +00:00
drochner
bce73c1519 in siginfo conversion functions, declare the source operand as "const" 2005-06-02 10:27:43 +00:00
perry
477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
fvdl
ff376b0763 Implement 32bit get/setcontext entry points. 2003-10-13 18:55:30 +00:00
thorpej
6acc60d22d Merge the nathanw_sa branch. 2003-01-18 08:28:25 +00:00
atatat
7caa308c63 Complete the rename: s/sa_/<compat>_sa_/g
Also tweak the darwin siginfo stuff to avoid the same type of collision.
2002-11-27 16:44:01 +00:00
scw
cb52115837 In preparation for COMPAT_NETBSD32 on SH-5:
- The MD netbsd32_machdep.h header now defines the 32-bit pointer type
   instead of using u_int32_t everywhere,
 - The MD netbsd32_machdep.h header now defines a macro (at least on
   current implementations) which converts a 32-bit pointer to its 64-bit
   equivalent,
 - Change the MI code to utilise the above two items in all the right places,
 - Implement netbsd32___sigaction_sigtramp().

Tested on Sparc64 by Matt Green.
2002-10-23 13:16:38 +00:00
thorpej
011d4d5f44 Add kernel support for having userland provide the signal trampoline:
* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.
2002-07-04 23:32:02 +00:00
lukem
dab6ef8b56 add RCSIDs (including regeneration of files as appropriate) 2001-11-13 02:07:52 +00:00
mrg
da9e4bd3a1 split up netbsd32_netbsd.c into 9 new files, leaving only those syscalls that
have no special interpretations besides simple syscall args conversion.
2001-02-08 13:19:33 +00:00