Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 May 2005 13:37:53 GMT
From:      Andrew Reisse <areisse@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 76783 for review
Message-ID:  <200505101337.j4ADbrmL073457@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=76783

Change 76783 by areisse@areisse_ibook on 2005/05/10 13:37:42

	Support for returning values from mac_syscall. On FreeBSD, the
	implementation of mpo_syscall would store the return value directly
	into the thread structure. On Darwin, the syscall handlers have 
	an explicit storage for the return value.

Affected files ...

.. //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/bsd/sys/mac_policy.h#5 edit
.. //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/security/mac_base.c#3 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/bsd/sys/mac_policy.h#5 (text+ko) ====

@@ -82,7 +82,8 @@
 	 * may implement new services without reserving explicit
 	 * system call numbers.
 	 */
-	int	(*mpo_syscall)(struct proc *p, int call, void *arg);
+	int	(*mpo_syscall)(struct proc *p, int call, void *arg,
+		    int *retv);
 
 	/*
 	 * Label operations.

==== //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/security/mac_base.c#3 (text+ko) ====

@@ -1140,7 +1140,7 @@
 		if (strcmp(mpc->mpc_name, target) == 0 &&
 		    mpc->mpc_ops->mpo_syscall != NULL) {
 			error = mpc->mpc_ops->mpo_syscall(p,
-			    uap->call, uap->arg);
+			    uap->call, uap->arg, retv);
 			goto out;
 		}
 	}
@@ -1150,7 +1150,7 @@
 			if (strcmp(mpc->mpc_name, target) == 0 &&
 			    mpc->mpc_ops->mpo_syscall != NULL) {
 				error = mpc->mpc_ops->mpo_syscall(p,
-				    uap->call, uap->arg);
+				    uap->call, uap->arg, retv);
 				break;
 			}
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505101337.j4ADbrmL073457>