This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: New setre*id functions broken on alpha
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Mariusz Mazur <mmazur at kernel dot pl>
- Cc: libc-alpha at sources dot redhat dot com, qboosh at pld-linux dot org
- Date: Mon, 1 Nov 2004 08:02:39 +0100
- Subject: Re: New setre*id functions broken on alpha
- References: <200410310002.03356.mmazur@kernel.pl>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Oct 31, 2004 at 12:02:03AM +0200, Mariusz Mazur wrote:
> Stub functions aren't used any more, now C compiler has controll of the what's
> going on. Those functions take gid_t or uid_t as arguments and those types
> are defines as unsigned int (32 bit). Later they are casted to type long to
> put them into appropriate registers before making a syscall. The problem is
> that although those are unsigned ints we're using, the kernel expects to get
> a '-1' value in some cases (ask the designers what where they thinking). Now
> according to "Calling Standard for Alpha Systems"* when passing a 32bit
> signed to a function (that is putting it into a 64bit register) the signed
But uid_t is unsigned int on Alpha:
asm-alpha/posix_types.h:typedef unsigned int __kernel_uid_t;
asm-alpha/posix_types.h:typedef __kernel_uid_t __kernel_uid32_t;
linux/types.h:typedef __kernel_uid32_t uid_t;
asmlinkage long sys_setreuid(uid_t ruid, uid_t euid)
...
if (ruid != (uid_t) -1) {
...
if (euid != (uid_t) -1) {
Jakub