diff options
| author | christos <christos@NetBSD.org> | 2012-05-10 19:40:46 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2012-05-10 19:40:46 +0000 |
| commit | 1d1f148ae28b1eb614e975d40bb7257cfd8353cb (patch) | |
| tree | 28ee51e835a8312b529b289206286532765f2a4c /sys/compat/linux32 | |
| parent | 979debe45c5fcdc3fe98fd57538f941d15c4c917 (diff) | |
Fix rt_sigtimedwait():
It is wishful thinking that:
1. declaring a 32 bit syscall with 64 bit pointers
2. passing a struct with 32 bit pointers to a 64 bit function
is going to work.
Diffstat (limited to 'sys/compat/linux32')
| -rw-r--r-- | sys/compat/linux32/arch/amd64/syscalls.master | 8 | ||||
| -rw-r--r-- | sys/compat/linux32/common/linux32_signal.c | 11 |
2 files changed, 12 insertions, 7 deletions
diff --git a/sys/compat/linux32/arch/amd64/syscalls.master b/sys/compat/linux32/arch/amd64/syscalls.master index c2f0dc17f7e..eba4e9bab99 100644 --- a/sys/compat/linux32/arch/amd64/syscalls.master +++ b/sys/compat/linux32/arch/amd64/syscalls.master @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.60 2011/11/18 04:08:56 christos Exp $ + $NetBSD: syscalls.master,v 1.61 2012/05/10 19:40:46 christos Exp $ ; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file. ; (See syscalls.conf to see what it is processed into.) @@ -318,9 +318,9 @@ 176 STD { int|linux32_sys||rt_sigpending(linux32_sigsetp_t set, \ netbsd32_size_t sigsetsize); } 177 STD { int|linux32_sys||rt_sigtimedwait( \ - const linux32_sigset_t *set, \ - linux32_siginfo_t *info, \ - const struct linux_timespec32 *timeout); } + const linux32_sigsetp_t set, \ + linux32_siginfop_t info, \ + const linux32_timespecp_t timeout); } 178 STD { int|linux32_sys||rt_queueinfo(int pid, int sig, \ linux32_siginfop_t uinfo); } 179 STD { int|linux32_sys||rt_sigsuspend(linux32_sigsetp_t unewset, \ diff --git a/sys/compat/linux32/common/linux32_signal.c b/sys/compat/linux32/common/linux32_signal.c index 3e46f329d54..c2620e69d19 100644 --- a/sys/compat/linux32/common/linux32_signal.c +++ b/sys/compat/linux32/common/linux32_signal.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_signal.c,v 1.15 2011/11/18 15:46:29 christos Exp $ */ +/* $NetBSD: linux32_signal.c,v 1.16 2012/05/10 19:40:46 christos Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.15 2011/11/18 15:46:29 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.16 2012/05/10 19:40:46 christos Exp $"); #include <sys/param.h> #include <sys/ucred.h> @@ -484,8 +484,13 @@ linux32_sys_rt_sigtimedwait(struct lwp *l, syscallarg(linux32_siginfo_t *) info); syscallarg(const struct linux32_timespec *) timeout; } */ + struct sys_____sigtimedwait50_args ap; - return sigtimedwait1(l, (const struct sys_____sigtimedwait50_args *)uap, + SCARG(&ap, set) = SCARG_P32(uap, set); + SCARG(&ap, info) = SCARG_P32(uap, info); + SCARG(&ap, timeout) = SCARG_P32(uap, timeout); + + return sigtimedwait1(l, &ap, retval, fetchss, storeinfo, fetchts, fakestorets); } |
