From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29513 invoked by alias); 23 Sep 2004 22:52:44 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 29458 invoked from network); 23 Sep 2004 22:52:40 -0000 Received: from unknown (HELO r-rr.iij4u.or.jp) (210.130.0.76) by sourceware.org with SMTP; 23 Sep 2004 22:52:40 -0000 Received: from localhost (frgw.3in.ne.jp [210.251.121.226]) by r-rr.iij4u.or.jp (8.11.6+IIJ/8.11.6) with ESMTP id i8NMqc607454 for ; Fri, 24 Sep 2004 07:52:38 +0900 (JST) Date: Thu, 23 Sep 2004 22:52:00 -0000 Message-Id: <20040924.075227.35012688.kkojima@rr.iij4u.or.jp> To: libc-hacker@sources.redhat.com Subject: Re: [PATCH] INTERNAL_SYSCALL_NCS for SH From: Kaz Kojima In-Reply-To: <20040924.074241.28395313.kkojima@rr.iij4u.or.jp> References: <20040924.074241.28395313.kkojima@rr.iij4u.or.jp> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg00089.txt.bz2 > BTW, SH port has a few problems with setXid changes. I'll report > them in the next mail. SH uses the old-fashioned 16-bit id's. It causes a few problems with setXid changes. The first problem is that seteuid.c and setegid.c may call __setre*[ug]id and causes undefined references. It seems pthread cases should use pthread_setre*[ug]id_np instead of __setre*[ug]id. The second one is that the variable __libc_missing_32bit_uids is defined in getuid.c but we don't have pthread_getuid. I've added an SH specific pthread_getuid as a workaround. I'd like to append a patch I'm using for comments. Regards, kaz -- [nptl/ChangeLog] 2004-09-23 Kaz Kojima * pthread_setegid.c (__setregid): Set to the pthread version. (__setresgid): Likewise. * pthread_seteuid.c (__setreuid, __setresuid): Likewise. * sysdeps/unix/sysv/linux/sh/Makefile: New file. * sysdeps/unix/sysv/linux/sh/pthread_getuid.c: New file. diff -u3prN ORIG/libc/nptl/pthread_setegid.c LOCAL/libc/nptl/pthread_setegid.c --- ORIG/libc/nptl/pthread_setegid.c Mon Sep 20 09:05:06 2004 +++ LOCAL/libc/nptl/pthread_setegid.c Mon Sep 20 13:23:00 2004 @@ -1,3 +1,5 @@ #define SINGLE_THREAD #define setegid pthread_setegid_np +#define __setregid pthread_setregid_np +#define __setresgid pthread_setresgid_np #include diff -u3prN ORIG/libc/nptl/pthread_seteuid.c LOCAL/libc/nptl/pthread_seteuid.c --- ORIG/libc/nptl/pthread_seteuid.c Mon Sep 20 09:05:38 2004 +++ LOCAL/libc/nptl/pthread_seteuid.c Thu Sep 23 17:04:43 2004 @@ -1,3 +1,5 @@ #define SINGLE_THREAD #define seteuid pthread_seteuid_np +#define __setreuid pthread_setreuid_np +#define __setresuid pthread_setresuid_np #include diff -u3prN ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/Makefile LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/Makefile --- ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/Makefile Thu Jan 1 09:00:00 1970 +++ LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/Makefile Thu Sep 23 21:31:04 2004 @@ -0,0 +1,2 @@ +# to get __libc_missing_32bit_uids +libpthread-routines += pthread_getuid diff -u3prN ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_getuid.c LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_getuid.c --- ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_getuid.c Thu Jan 1 09:00:00 1970 +++ LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_getuid.c Thu Sep 23 21:32:14 2004 @@ -0,0 +1,3 @@ +#define SINGLE_THREAD +#define __getuid pthread_getuid_np +#include