From owner-p4-projects@FreeBSD.ORG Tue May 10 13:37:54 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DF5BC16A4D0; Tue, 10 May 2005 13:37:53 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 89B7416A4D2 for ; Tue, 10 May 2005 13:37:53 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CBF343D41 for ; Tue, 10 May 2005 13:37:53 +0000 (GMT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4ADbrLO073460 for ; Tue, 10 May 2005 13:37:53 GMT (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4ADbrmL073457 for perforce@freebsd.org; Tue, 10 May 2005 13:37:53 GMT (envelope-from areisse@nailabs.com) Date: Tue, 10 May 2005 13:37:53 GMT Message-Id: <200505101337.j4ADbrmL073457@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 76783 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2005 13:37:54 -0000 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; } }