Module Name:    src
Committed By:   christos
Date:           Thu May 10 19:40:46 UTC 2012

Modified Files:
        src/sys/compat/linux32/arch/amd64: syscalls.master
        src/sys/compat/linux32/common: linux32_signal.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/compat/linux32/arch/amd64/syscalls.master
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/linux32/common/linux32_signal.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux32/arch/amd64/syscalls.master
diff -u src/sys/compat/linux32/arch/amd64/syscalls.master:1.60 src/sys/compat/linux32/arch/amd64/syscalls.master:1.61
--- src/sys/compat/linux32/arch/amd64/syscalls.master:1.60	Thu Nov 17 23:08:56 2011
+++ src/sys/compat/linux32/arch/amd64/syscalls.master	Thu May 10 15:40:46 2012
@@ -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, \

Index: src/sys/compat/linux32/common/linux32_signal.c
diff -u src/sys/compat/linux32/common/linux32_signal.c:1.15 src/sys/compat/linux32/common/linux32_signal.c:1.16
--- src/sys/compat/linux32/common/linux32_signal.c:1.15	Fri Nov 18 10:46:29 2011
+++ src/sys/compat/linux32/common/linux32_signal.c	Thu May 10 15:40:46 2012
@@ -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 *
 		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);
 }
 

Reply via email to