Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/linux32/common Make linux32 msgsnd/msgrcv use the...
details: https://anonhg.NetBSD.org/src/rev/f0e086e2d7d4
branches: trunk
changeset: 749119:f0e086e2d7d4
user: njoly <njoly%NetBSD.org@localhost>
date: Wed Nov 18 12:27:58 2009 +0000
description:
Make linux32 msgsnd/msgrcv use the netbsd32 syscalls instead of native
ones, to ensure that msgbuf mtype member will be of the right type.
diffstat:
sys/compat/linux32/common/linux32_ipccall.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diffs (68 lines):
diff -r c87f69d8778f -r f0e086e2d7d4 sys/compat/linux32/common/linux32_ipccall.c
--- a/sys/compat/linux32/common/linux32_ipccall.c Wed Nov 18 12:26:22 2009 +0000
+++ b/sys/compat/linux32/common/linux32_ipccall.c Wed Nov 18 12:27:58 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_ipccall.c,v 1.7 2009/11/18 12:01:25 njoly Exp $ */
+/* $NetBSD: linux32_ipccall.c,v 1.8 2009/11/18 12:27:58 njoly Exp $ */
/*
* Copyright (c) 2008 Nicolas Joly
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.7 2009/11/18 12:01:25 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.8 2009/11/18 12:27:58 njoly Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@@ -42,6 +42,7 @@
#include <sys/syscallargs.h>
#include <compat/netbsd32/netbsd32.h>
+#include <compat/netbsd32/netbsd32_syscallargs.h>
#include <compat/linux/common/linux_types.h>
#include <compat/linux32/common/linux32_types.h>
@@ -369,14 +370,14 @@
static int
linux32_msgsnd(struct lwp *l, const struct linux32_sys_ipc_args *uap, register_t *retval)
{
- struct sys_msgsnd_args bma;
+ struct netbsd32_msgsnd_args bma;
SCARG(&bma, msqid) = SCARG(uap, a1);
- SCARG(&bma, msgp) = SCARG_P32(uap, ptr);
+ SCARG(&bma, msgp) = SCARG(uap, ptr);
SCARG(&bma, msgsz) = SCARG(uap, a2);
SCARG(&bma, msgflg) = SCARG(uap, a3);
- return sys_msgsnd(l, &bma, retval);
+ return netbsd32_msgsnd(l, &bma, retval);
}
/*
@@ -391,7 +392,7 @@
static int
linux32_msgrcv(struct lwp *l, const struct linux32_sys_ipc_args *uap, register_t *retval)
{
- struct sys_msgrcv_args bma;
+ struct netbsd32_msgrcv_args bma;
struct linux32_msgrcv_msgarg kluge;
int error;
@@ -399,12 +400,12 @@
return error;
SCARG(&bma, msqid) = SCARG(uap, a1);
- SCARG(&bma, msgp) = NETBSD32PTR64(kluge.msg);
+ SCARG(&bma, msgp) = kluge.msg;
SCARG(&bma, msgsz) = SCARG(uap, a2);
SCARG(&bma, msgtyp) = kluge.type;
SCARG(&bma, msgflg) = SCARG(uap, a3);
- return sys_msgrcv(l, &bma, retval);
+ return netbsd32_msgrcv(l, &bma, retval);
}
static int
Home |
Main Index |
Thread Index |
Old Index