From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0NQy-00066h-Qu for qemu-devel@nongnu.org; Wed, 12 Nov 2008 16:39:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0NQx-00066S-JY for qemu-devel@nongnu.org; Wed, 12 Nov 2008 16:39:31 -0500 Received: from [199.232.76.173] (port=48381 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0NQx-00066P-B5 for qemu-devel@nongnu.org; Wed, 12 Nov 2008 16:39:31 -0500 Received: from csl.cornell.edu ([128.84.224.10]:2599 helo=vlsi.csl.cornell.edu) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0NQw-00084Z-SM for qemu-devel@nongnu.org; Wed, 12 Nov 2008 16:39:31 -0500 Received: from cacao.csl.cornell.edu (cacao.csl.cornell.edu [128.84.224.47]) by vlsi.csl.cornell.edu (8.13.4/8.13.4) with ESMTP id mACLdEZq023917 for ; Wed, 12 Nov 2008 16:39:19 -0500 (EST) Date: Wed, 12 Nov 2008 16:39:14 -0500 (EST) From: Vince Weaver Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [Qemu-devel] [patch] implement alpha getxuid and getxgid syscalls Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello this patch implemented the setxuid and setxgid syscalls for Alpha. These syscalls return two values, both uid/euid and gid/egid. In addition to returning the first value in $v0, the additional value is returned in the $a4 register. The syscalls are used instead of the separate syscalls for those values used on other architectures (this is probably because Alpha Linux started out syscall compatible with DEC/OSF/Tru64). With this patch, the perlbmk benchmarks from Spec2000 run properly. Vince Index: linux-user/syscall.c =================================================================== --- linux-user/syscall.c (revision 5663) +++ linux-user/syscall.c (working copy) @@ -5529,6 +5529,30 @@ ret = get_errno(getuid()); break; #endif + +#if defined(TARGET_NR_getxuid) && defined(TARGET_ALPHA) + /* Alpha specific */ + case TARGET_NR_getxuid: + { + uid_t euid; + euid=geteuid(); + ((CPUAlphaState *)cpu_env)->ir[IR_A4]=euid; + } + ret = get_errno(getuid()); + break; +#endif +#if defined(TARGET_NR_getxgid) && defined(TARGET_ALPHA) + /* Alpha specific */ + case TARGET_NR_getxgid: + { + uid_t egid; + egid=getegid(); + ((CPUAlphaState *)cpu_env)->ir[IR_A4]=egid; + } + ret = get_errno(getgid()); + break; +#endif + #ifdef TARGET_NR_getgid32 case TARGET_NR_getgid32: ret = get_errno(getgid());