Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/mach When sending exception with identity, includ...
details: https://anonhg.NetBSD.org/src/rev/423159ed6cd2
branches: trunk
changeset: 555717:423159ed6cd2
user: manu <manu%NetBSD.org@localhost>
date: Tue Nov 25 23:17:40 2003 +0000
description:
When sending exception with identity, include right names in the
receiver name space, not the sender one.
diffstat:
sys/compat/mach/mach_notify.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diffs (55 lines):
diff -r ecfcf2945047 -r 423159ed6cd2 sys/compat/mach/mach_notify.c
--- a/sys/compat/mach/mach_notify.c Tue Nov 25 23:14:48 2003 +0000
+++ b/sys/compat/mach/mach_notify.c Tue Nov 25 23:17:40 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mach_notify.c,v 1.8 2003/11/25 17:09:24 manu Exp $ */
+/* $NetBSD: mach_notify.c,v 1.9 2003/11/25 23:17:40 manu Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mach_notify.c,v 1.8 2003/11/25 17:09:24 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mach_notify.c,v 1.9 2003/11/25 23:17:40 manu Exp $");
#include "opt_ktrace.h"
#include "opt_compat_mach.h" /* For COMPAT_MACH in <sys/ktrace.h> */
@@ -256,6 +256,7 @@
size_t msglen;
struct mach_right *exc_mr;
struct mach_emuldata *med;
+ struct mach_emuldata *catcher_med;
struct mach_right *kernel_mr;
struct lwp *catcher_lwp;
struct mach_right *task;
@@ -267,10 +268,6 @@
if ((exc_port = med->med_exc[exc]) == NULL)
return EINVAL;
- /* XXX Thread and task should have different ports */
- task = mach_right_get(med->med_kernel, l, MACH_PORT_TYPE_SEND, 0);
- thread = mach_right_get(med->med_kernel, l, MACH_PORT_TYPE_SEND, 0);
-
#ifdef DIAGNOSTIC
if (exc_port->mp_datatype != MACH_MP_EXC_FLAGS)
printf("mach_exception: unexpected datatype");
@@ -283,9 +280,15 @@
* the process with receive right for exc_port.
*/
catcher_lwp = exc_port->mp_recv->mr_lwp;
- med = catcher_lwp->l_proc->p_emuldata;
+ catcher_med = catcher_lwp->l_proc->p_emuldata;
exc_mr = mach_right_get(exc_port, catcher_lwp, MACH_PORT_TYPE_SEND, 0);
- kernel_mr = mach_right_get(med->med_kernel,
+ kernel_mr = mach_right_get(catcher_med->med_kernel,
+ catcher_lwp, MACH_PORT_TYPE_SEND, 0);
+
+ /* XXX Thread and task should have different ports */
+ task = mach_right_get(med->med_kernel,
+ catcher_lwp, MACH_PORT_TYPE_SEND, 0);
+ thread = mach_right_get(med->med_kernel,
catcher_lwp, MACH_PORT_TYPE_SEND, 0);
switch (behavior) {
Home |
Main Index |
Thread Index |
Old Index