From ff4eb01a424875d6ff9183c4f4f42d17743fee77 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 8 Dec 2004 10:52:16 +0000 Subject: [PATCH] Updated to fedora-glibc-20041208T1024 --- ChangeLog | 19 +++++++++++++++- fedora/branch.mk | 4 ++-- fedora/glibc.spec.in | 10 ++++++++- nptl/ChangeLog | 6 ++++- nptl/sysdeps/unix/sysv/linux/sh/clone.S | 2 ++ rt/tst-timer5.c | 26 +++++++++++++++++++++- sysdeps/posix/sysconf.c | 9 ++++++++ sysdeps/unix/sysv/linux/ia64/clone2.S | 11 ++++++---- sysdeps/unix/sysv/linux/sh/clone.S | 39 ++++++++++++++++++++++++++++++--- 9 files changed, 113 insertions(+), 13 deletions(-) create mode 100644 nptl/sysdeps/unix/sysv/linux/sh/clone.S diff --git a/ChangeLog b/ChangeLog index b6da86d3b5..17b59283ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,25 @@ 2004-12-07 Jakub Jelinek + * sysdeps/posix/sysconf.c (__sysconf_check_spec): Only define + if it will be actually used. + +2004-12-07 Roland McGrath + + * rt/tst-timer5.c (setup_test): New function. + (TEST_CLOCK_MISSING): Use it to punt test if timer_create does not + support CLOCK_MONOTONIC. + +2004-12-07 Jakub Jelinek + * sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Add support for NPTL where the PID is stored at userlevel and needs to be reset when - CLONE_THREAD is not used. + CLONE_THREAD is not used. Restore gp before calling _exit. + +2004-12-07 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/clone.S: Clear the frame pointer when + starting a new thread. Add support for NPTL where the PID is stored + at userlevel and needs to be reset when CLONE_THREAD is not used. 2004-12-01 Jakub Jelinek diff --git a/fedora/branch.mk b/fedora/branch.mk index b747e0074b..e493d062a6 100644 --- a/fedora/branch.mk +++ b/fedora/branch.mk @@ -1,5 +1,5 @@ # This file is updated automatically by Makefile. glibc-branch := fedora glibc-base := HEAD -fedora-sync-date := 2004-12-07 13:31 UTC -fedora-sync-tag := fedora-glibc-20041207T1331 +fedora-sync-date := 2004-12-08 10:24 UTC +fedora-sync-tag := fedora-glibc-20041208T1024 diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in index 9181ee2ca7..59711c00b1 100644 --- a/fedora/glibc.spec.in +++ b/fedora/glibc.spec.in @@ -1,4 +1,4 @@ -%define glibcrelease 88 +%define glibcrelease 89 %define auxarches i586 i686 athlon sparcv9 alphaev6 %define prelinkarches noarch %define nptlarches i386 i686 athlon x86_64 ia64 s390 s390x sparcv9 ppc ppc64 @@ -1259,6 +1259,14 @@ rm -f *.filelist* %endif %changelog +* Wed Dec 8 2004 Jakub Jelinek 2.3.3-89 +- update from CVS + - fix clone2 on ia64 + - avoid tst-timer5 failing with linuxthreads implementation +- if __libc_enable_secure, disallow mode != normal +- change ldd script to imply -r when -u is used, properly + propagate return value and handle suid binaries + * Tue Dec 7 2004 Jakub Jelinek 2.3.3-88 - update from CVS - disregard LD_SHOW_AUXV and LD_DYNAMIC_WEAK if __libc_enable_secure diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 89a98aeff0..8352c6b904 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -3,11 +3,15 @@ * sysdeps/ia64/tcb-offsets.sym (TID): Add. * sysdeps/unix/sysv/linux/ia64/clone2.S: New file. - * Makefile (tests): Add tst-getpid2.c. + * Makefile (tests): Add tst-getpid2. * tst-getpid1.c (TEST_CLONE_FLAGS): Define. (do_test): Use it. Use __clone2 instead of clone on ia64. * tst-getpid2.c: New test. +2004-12-07 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/clone.S: New file. + 2004-12-04 Ulrich Drepper * Makefile (tests): Add tst-getpid1. diff --git a/nptl/sysdeps/unix/sysv/linux/sh/clone.S b/nptl/sysdeps/unix/sysv/linux/sh/clone.S new file mode 100644 index 0000000000..62a11972d8 --- /dev/null +++ b/nptl/sysdeps/unix/sysv/linux/sh/clone.S @@ -0,0 +1,2 @@ +#define RESET_PID +#include diff --git a/rt/tst-timer5.c b/rt/tst-timer5.c index 2683021eda..6466c8efc1 100644 --- a/rt/tst-timer5.c +++ b/rt/tst-timer5.c @@ -4,10 +4,34 @@ #include #if defined CLOCK_MONOTONIC && defined _POSIX_MONOTONIC_CLOCK + # define TEST_CLOCK CLOCK_MONOTONIC # define TEST_CLOCK_MISSING(clock) \ - (sysconf (_SC_MONOTONIC_CLOCK) > 0 ? NULL : #clock) + (setup_test () ? "CLOCK_MONOTONIC" : NULL) + +# include + +static int +setup_test (void) +{ + if (sysconf (_SC_MONOTONIC_CLOCK) <= 0) + return 1; + + /* The user-level timers implementation doesn't support CLOCK_MONOTONIC, + even though sysconf claims it will. */ + timer_t t; + if (timer_create (TEST_CLOCK, NULL, &t) != 0) + { + printf ("timer_create: %m\n"); + return 1; + } + timer_delete (t); + + return 0; +} + # include "tst-timer4.c" + #else # define TEST_FUNCTION 0 # include "../test-skeleton.c" diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c index 9e5d569a81..cdd1fe9636 100644 --- a/sysdeps/posix/sysconf.c +++ b/sysdeps/posix/sysconf.c @@ -34,7 +34,14 @@ #include +#define NEED_CHECK_SPEC \ + (!defined _XBS5_ILP32_OFF32 || !defined _XBS5_ILP32_OFFBIG \ + || !defined _XBS5_LP64_OFF64 || !defined _XBS5_LPBIG_OFFBIG \ + || !defined _POSIX_V6_ILP32_OFF32 || !defined _POSIX_V6_ILP32_OFFBIG \ + || !defined _POSIX_V6_LP64_OFF64 || !defined _POSIX_V6_LPBIG_OFFBIG) +#if NEED_CHECK_SPEC static long int __sysconf_check_spec (const char *spec); +#endif /* Get the value of the system variable NAME. */ @@ -1210,6 +1217,7 @@ __sysconf (name) weak_alias (__sysconf, sysconf) libc_hidden_def (__sysconf) +#if NEED_CHECK_SPEC static long int __sysconf_check_spec (const char *spec) { @@ -1230,3 +1238,4 @@ __sysconf_check_spec (const char *spec) __set_errno (save_errno); return ret; } +#endif diff --git a/sysdeps/unix/sysv/linux/ia64/clone2.S b/sysdeps/unix/sysv/linux/ia64/clone2.S index 136bb5591a..69c9e05044 100644 --- a/sysdeps/unix/sysv/linux/ia64/clone2.S +++ b/sysdeps/unix/sysv/linux/ia64/clone2.S @@ -30,7 +30,7 @@ ENTRY(__clone2) .prologue - alloc r2=ar.pfs,8,0,6,0 + alloc r2=ar.pfs,8,1,6,0 cmp.eq p6,p0=0,in0 mov r8=EINVAL mov out0=in3 /* Flags are first syscall argument. */ @@ -63,8 +63,7 @@ ENTRY(__clone2) cmp.eq CHILD,PARENT=0,r8 /* Are we the child? */ (p6) br.cond.spnt.many __syscall_error ;; -(CHILD) ld8 out1=[in0],8 /* Retrieve code pointer. */ -(CHILD) mov out0=in4 /* Pass proper argument to fn */ +(CHILD) mov loc0=gp (PARENT) ret ;; #ifdef RESET_PID @@ -83,11 +82,15 @@ ENTRY(__clone2) st4 [r10]=r8 ;; #endif -1: ld8 gp=[in0] /* Load function gp. */ +1: ld8 out1=[in0],8 /* Retrieve code pointer. */ + mov out0=in4 /* Pass proper argument to fn */ + ;; + ld8 gp=[in0] /* Load function gp. */ mov b6=out1 br.call.dptk.many rp=b6 /* Call fn(arg) in the child */ ;; mov out0=r8 /* Argument to _exit */ + mov gp=loc0 .globl HIDDEN_JUMPTARGET(_exit) br.call.dpnt.many rp=HIDDEN_JUMPTARGET(_exit) /* call _exit with result from fn. */ diff --git a/sysdeps/unix/sysv/linux/sh/clone.S b/sysdeps/unix/sysv/linux/sh/clone.S index 713b0f9c3b..7941c6b3ad 100644 --- a/sysdeps/unix/sysv/linux/sh/clone.S +++ b/sysdeps/unix/sysv/linux/sh/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,11 +22,13 @@ #include #define _ERRNO_H 1 #include - +#ifdef RESET_PID +#include +#endif /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, pid_t *ptid, void *tls, pid_t *ctid); */ - .text + .text ENTRY(__clone) /* sanity check arguments. */ tst r4, r4 @@ -64,6 +66,31 @@ ENTRY(__clone) rts nop 2: + /* terminate the stack frame */ + mov #0, r14 +#ifdef RESET_PID + mov r4, r0 + shlr16 r0 + tst #1, r0 // CLONE_THREAD = (1 << 16) + bf/s 4f + mov r4, r0 + /* new pid */ + shlr8 r0 + tst #1, r0 // CLONE_VM = (1 << 8) + bf/s 3f + mov #-1, r0 + mov #+SYS_ify(getpid), r3 + trapa #0x15 +3: + stc gbr, r1 + mov.w .Lpidoff, r2 + add r1, r2 + mov.l r0, @r2 + mov.w .Ltidoff, r2 + add r1, r2 + mov.l r0, @r2 +4: +#endif /* thread starts */ mov.l @r15, r1 jsr @r1 @@ -94,6 +121,12 @@ ENTRY(__clone) .long _GLOBAL_OFFSET_TABLE_ .L3: .long PLTJMP(C_SYMBOL_NAME(_exit)) +#ifdef RESET_PID +.Lpidoff: + .word PID - TLS_PRE_TCB_SIZE +.Ltidoff: + .word TID - TLS_PRE_TCB_SIZE +#endif PSEUDO_END (__clone) weak_alias (__clone, clone) -- 2.11.4.GIT