bug on ppc (and potentially other arches) in setgroups.c
Mike Frysinger
vapier at gentoo.org
Fri Jul 3 05:10:15 UTC 2009
On Thursday 02 July 2009 09:28:48 Phil Estes wrote:
> On 07/02/2009 12:57 AM, Mike Frysinger wrote:
> > On Wednesday 01 July 2009 22:44:58 Phil Estes wrote:
> >> In the case of uClibc on the ppc architecture, this means that the code
> >> flows through the setgroups "wrapper" in setgroups.c which tries to copy
> >> the passed-in group array to an array of allocated kernel_gid_t
> >> structs. In tracing back through why this might be, it seems to be
> >> that this code would be for the compat syscall for 16-bit UIDs
> >> (implemented in the kernel in uid16.c); and therefore the kernel gid_t
> >> might not match the userspace gid_t; hence the copying. It tries to
> >> only use this wrapper if __NR_setgroups32 isn't defined, which it is not
> >> for ppc. But, on ppc, there is no 16-bit version or compat version of
> >> the setgroups syscall; therefore, there should also be no logic to
> >> attempt to perform the copying, which is really not useful on ppc (and
> >> potentially other architectures which don't have this setgroups vs.
> >> setgroups32 syscall issue).
> >
> > are you sure that this is the case ? or are you assuming "no
> > __NR_setgroups32 means setgroups has always been 32bit" ? if you can get
> > verification from LKML, then we can look at changing uClibc. this isnt a
> > ppc32 specific issue as i see avr32, mips32, parisc32, and xtensa are in
> > a similar boat.
>
> I walked through this path with the ppc 4xx maintainer yesterday..
> definitely __NR_setgroups on ppc is wired to the standard 32-bit UIDs
> syscall..there is no support for the old uid16.c implementations on ppc
> today.
ok, then we'll have to re-arch things to account for all of these ports.
these two functions arent the only ones with a problem ... there are ~19 in
total (chown and [gu]id ones).
please try the following patch
-mike
--- a/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h
@@ -44,4 +44,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#define __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
@@ -48,4 +48,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h
@@ -45,4 +45,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#define __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h
@@ -45,4 +45,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/common/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_arch_features.h
@@ -47,4 +47,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/common/chown.c
+++ b/libc/sysdeps/linux/common/chown.c
@@ -13,7 +13,7 @@
/* libc_hidden_proto(chown) */
-#if (__WORDSIZE == 32 && defined(__NR_chown32)) || __WORDSIZE == 64
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_chown32)
# ifdef __NR_chown32
# undef __NR_chown
# define __NR_chown __NR_chown32
--- a/libc/sysdeps/linux/common/fchown.c
+++ b/libc/sysdeps/linux/common/fchown.c
@@ -11,7 +11,7 @@
#include <unistd.h>
#include <bits/wordsize.h>
-#if (__WORDSIZE == 32 && defined(__NR_fchown32)) || __WORDSIZE == 64
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_fchown32)
# ifdef __NR_fchown32
# undef __NR_fchown
# define __NR_fchown __NR_fchown32
--- a/libc/sysdeps/linux/common/getegid.c
+++ b/libc/sysdeps/linux/common/getegid.c
@@ -12,9 +12,12 @@
/* libc_hidden_proto(getegid) */
-#if defined(__NR_getegid32)
-# undef __NR_getegid
-# define __NR_getegid __NR_getegid32
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_getegid32)
+# ifdef __NR_getegid32
+# undef __NR_getegid
+# define __NR_getegid __NR_getegid32
+# endif
+
_syscall0(gid_t, getegid)
#elif defined(__NR_getegid)
@@ -24,12 +27,13 @@ gid_t getegid(void)
{
return (__syscall_getegid());
}
+
#else
/* libc_hidden_proto(getgid) */
-
gid_t getegid(void)
{
return (getgid());
}
#endif
+
libc_hidden_def(getegid)
--- a/libc/sysdeps/linux/common/geteuid.c
+++ b/libc/sysdeps/linux/common/geteuid.c
@@ -12,9 +12,12 @@
/* libc_hidden_proto(geteuid) */
-#if defined(__NR_geteuid32)
-# undef __NR_geteuid
-# define __NR_geteuid __NR_geteuid32
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_geteuid32)
+# ifdef __NR_geteuid32
+# undef __NR_geteuid
+# define __NR_geteuid __NR_geteuid32
+# endif
+
_syscall0(uid_t, geteuid)
#elif defined(__NR_geteuid)
--- a/libc/sysdeps/linux/common/getgroups.c
+++ b/libc/sysdeps/linux/common/getgroups.c
@@ -14,12 +14,12 @@
/* libc_hidden_proto(getgroups) */
-#if defined(__NR_getgroups32)
-# undef __NR_getgroups
-# define __NR_getgroups __NR_getgroups32
-_syscall2(int, getgroups, int, size, gid_t *, list)
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_getgroups32)
+# ifdef __NR_getgroups32
+# undef __NR_getgroups
+# define __NR_getgroups __NR_getgroups32
+# endif
-#elif __WORDSIZE == 64
_syscall2(int, getgroups, int, size, gid_t *, list)
#else
--- a/libc/sysdeps/linux/common/getresgid.c
+++ b/libc/sysdeps/linux/common/getresgid.c
@@ -11,9 +11,12 @@
#ifdef __USE_GNU
#include <unistd.h>
-#if defined(__NR_getresgid32)
-# undef __NR_getresgid
-# define __NR_getresgid __NR_getresgid32
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_getresgid32)
+# ifdef __NR_getresgid32
+# undef __NR_getresgid
+# define __NR_getresgid __NR_getresgid32
+# endif
+
_syscall3(int, getresgid, gid_t *, rgid, gid_t *, egid, gid_t *, sgid)
#elif defined(__NR_getresgid)
--- a/libc/sysdeps/linux/common/getresuid.c
+++ b/libc/sysdeps/linux/common/getresuid.c
@@ -11,9 +11,12 @@
#ifdef __USE_GNU
#include <unistd.h>
-#if defined(__NR_getresuid32)
-# undef __NR_getresuid
-# define __NR_getresuid __NR_getresuid32
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_getresuid32)
+# ifdef __NR_getresuid32
+# undef __NR_getresuid
+# define __NR_getresuid __NR_getresuid32
+# endif
+
_syscall3(int, getresuid, uid_t *, ruid, uid_t *, euid, uid_t *, suid)
#elif defined(__NR_getresuid)
--- a/libc/sysdeps/linux/common/lchown.c
+++ b/libc/sysdeps/linux/common/lchown.c
@@ -11,7 +11,7 @@
#include <unistd.h>
#include <bits/wordsize.h>
-#if (__WORDSIZE == 32 && defined(__NR_lchown32)) || __WORDSIZE == 64
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_lchown32)
# ifdef __NR_lchown32
# undef __NR_lchown
# define __NR_lchown __NR_lchown32
--- a/libc/sysdeps/linux/common/setfsgid.c
+++ b/libc/sysdeps/linux/common/setfsgid.c
@@ -11,7 +11,7 @@
#include <sys/fsuid.h>
#include <bits/wordsize.h>
-#if (__WORDSIZE == 32 && defined(__NR_setfsgid32)) || __WORDSIZE == 64
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_setfsgid32)
# ifdef __NR_setfsgid32
# undef __NR_setfsgid
# define __NR_setfsgid __NR_setfsgid32
--- a/libc/sysdeps/linux/common/setfsuid.c
+++ b/libc/sysdeps/linux/common/setfsuid.c
@@ -11,7 +11,7 @@
#include <sys/fsuid.h>
#include <bits/wordsize.h>
-#if (__WORDSIZE == 32 && defined(__NR_setfsuid32)) || __WORDSIZE == 64
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_setfsuid32)
# ifdef __NR_setfsuid32
# undef __NR_setfsuid
# define __NR_setfsuid __NR_setfsuid32
--- a/libc/sysdeps/linux/common/setgid.c
+++ b/libc/sysdeps/linux/common/setgid.c
@@ -11,7 +11,7 @@
#include <unistd.h>
#include <bits/wordsize.h>
-#if (__WORDSIZE == 32 && defined(__NR_setgid32)) || __WORDSIZE == 64
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_setgid32)
# ifdef __NR_setgid32
# undef __NR_setgid
# define __NR_setgid __NR_setgid32
--- a/libc/sysdeps/linux/common/setgroups.c
+++ b/libc/sysdeps/linux/common/setgroups.c
@@ -16,12 +16,12 @@
/* libc_hidden_proto(setgroups) */
-#if defined(__NR_setgroups32)
-# undef __NR_setgroups
-# define __NR_setgroups __NR_setgroups32
-_syscall2(int, setgroups, size_t, size, const gid_t *, list)
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_setgroups32)
+# ifdef __NR_setgroups32
+# undef __NR_setgroups
+# define __NR_setgroups __NR_setgroups32
+# endif
-#elif __WORDSIZE == 64
_syscall2(int, setgroups, size_t, size, const gid_t *, list)
#else
--- a/libc/sysdeps/linux/common/setregid.c
+++ b/libc/sysdeps/linux/common/setregid.c
@@ -13,7 +13,7 @@
/* libc_hidden_proto(setregid) */
-#if (__WORDSIZE == 32 && defined(__NR_setregid32)) || __WORDSIZE == 64
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_setregid32)
# ifdef __NR_setregid32
# undef __NR_setregid
# define __NR_setregid __NR_setregid32
--- a/libc/sysdeps/linux/common/setresgid.c
+++ b/libc/sysdeps/linux/common/setresgid.c
@@ -11,9 +11,11 @@
#ifdef __USE_GNU
#include <unistd.h>
-#if defined(__NR_setresgid32)
-# undef __NR_setresgid
-# define __NR_setresgid __NR_setresgid32
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_setresgid32)
+# ifdef __NR_setresgid32
+# undef __NR_setresgid
+# define __NR_setresgid __NR_setresgid32
+# endif
/* libc_hidden_proto(setresgid) */
_syscall3(int, setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
--- a/libc/sysdeps/linux/common/setresuid.c
+++ b/libc/sysdeps/linux/common/setresuid.c
@@ -11,9 +11,11 @@
#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
#include <unistd.h>
-#if defined(__NR_setresuid32)
-# undef __NR_setresuid
-# define __NR_setresuid __NR_setresuid32
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_setresuid32)
+# ifdef __NR_setresuid32
+# undef __NR_setresuid
+# define __NR_setresuid __NR_setresuid32
+# endif
/* libc_hidden_proto(setresuid) */
_syscall3(int, setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
--- a/libc/sysdeps/linux/common/setreuid.c
+++ b/libc/sysdeps/linux/common/setreuid.c
@@ -13,7 +13,7 @@
/* libc_hidden_proto(setreuid) */
-#if (__WORDSIZE == 32 && defined(__NR_setreuid32)) || __WORDSIZE == 64
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_setreuid32)
# ifdef __NR_setreuid32
# undef __NR_setreuid
# define __NR_setreuid __NR_setreuid32
--- a/libc/sysdeps/linux/common/setuid.c
+++ b/libc/sysdeps/linux/common/setuid.c
@@ -11,7 +11,7 @@
#include <unistd.h>
#include <bits/wordsize.h>
-#if (__WORDSIZE == 32 && defined(__NR_setuid32)) || __WORDSIZE == 64
+#if defined(__UCLIBC_PURE_32BIT_UID_SYSCALLS__) || defined(__NR_setuid32)
# ifdef __NR_setuid32
# undef __NR_setuid
# define __NR_setuid __NR_setuid32
--- a/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h
@@ -45,4 +45,10 @@
/* only weird assemblers generally need this */
#define __UCLIBC_ASM_LINE_SEP__ @
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h
@@ -45,4 +45,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h
@@ -45,4 +45,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h
@@ -45,4 +45,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h
@@ -44,4 +44,10 @@
/* the default ; is a comment on hppa */
#define __UCLIBC_ASM_LINE_SEP__ !
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#define __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h
@@ -45,6 +45,12 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#if defined _LIBC
#define internal_function __attribute__ ((regparm (3), stdcall))
#endif
--- a/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h
@@ -45,4 +45,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h
@@ -44,4 +44,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#define __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h
@@ -48,4 +48,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h
@@ -45,4 +45,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h
@@ -44,4 +44,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#define __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h
@@ -45,4 +45,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h
@@ -45,4 +45,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h
@@ -44,4 +44,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#define __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h
@@ -48,4 +48,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h
@@ -44,4 +44,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#define __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h
@@ -44,4 +44,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h
@@ -45,4 +45,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h
@@ -44,4 +44,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#undef __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h
@@ -44,4 +44,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#define __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
--- a/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h
@@ -44,4 +44,10 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+/* is the getgroup (and related) syscalls always 32bits ? 64bit systems are
+ * always yes while 32bit systems are maybe. if your port has __NR_lchown32
+ * then undef here.
+ */
+#define __UCLIBC_PURE_32BIT_UID_SYSCALLS__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20090703/3b45f5fd/attachment-0001.pgp>
More information about the uClibc
mailing list