qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [patch] implement alpha getxuid and getxgid syscalls
@ 2008-11-12 21:39 Vince Weaver
  2008-11-14 17:21 ` Aurelien Jarno
  0 siblings, 1 reply; 2+ messages in thread
From: Vince Weaver @ 2008-11-12 21:39 UTC (permalink / raw)
  To: qemu-devel

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());

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [patch] implement alpha getxuid and getxgid syscalls
  2008-11-12 21:39 [Qemu-devel] [patch] implement alpha getxuid and getxgid syscalls Vince Weaver
@ 2008-11-14 17:21 ` Aurelien Jarno
  0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2008-11-14 17:21 UTC (permalink / raw)
  To: Vince Weaver; +Cc: qemu-devel

On Wed, Nov 12, 2008 at 04:39:14PM -0500, Vince Weaver wrote:
> 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.

Applied, thanks.

> 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());
> 
> 
> 
> 

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-14 17:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-12 21:39 [Qemu-devel] [patch] implement alpha getxuid and getxgid syscalls Vince Weaver
2008-11-14 17:21 ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).