Hello community, here is the log from the commit of package glibc for openSUSE:Factory checked in at 2014-03-27 09:28:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/glibc (Old) and /work/SRC/openSUSE:Factory/.glibc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "glibc" Changes: -------- --- /work/SRC/openSUSE:Factory/glibc/glibc-testsuite.changes 2014-03-22 07:49:52.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.glibc.new/glibc-testsuite.changes 2014-03-27 09:28:40.000000000 +0100 @@ -1,0 +2,30 @@ +Tue Mar 25 09:26:44 UTC 2014 - [email protected] + +- abort-no-flush.patch: Don't close or flush stdio streams on abort (BZ + #15436) +- fix-locking-in-_IO_cleanup.patch: always do locking when accessing + streams (bnc#796982, BZ #15142) +- resolv-dont-ignore-second-answer.patch: don't ignore second answer from + nameserver if the first one was empty (bnc#767266, BZ #13651) +- ldd-system-interp.patch: Never try to execute the file in ldd + (bnc#677787, BZ #16750) + +------------------------------------------------------------------- +Mon Mar 24 12:26:50 UTC 2014 - [email protected] + +- check-pf-alloca.patch: Account for alloca use when collecting interface + addresses (bnc#785041, BZ #16002) + +------------------------------------------------------------------- +Mon Mar 24 07:59:40 UTC 2014 - [email protected] + +- powerpc-opt-power8.patch: two more POWER8 optimisations (bnc#866711, + fate#315443) + +------------------------------------------------------------------- +Thu Mar 20 14:52:47 UTC 2014 - [email protected] + +- getaddrinfo-uninit-result.patch: Fix use of half-initialized result in + getaddrinfo when using nscd (bnc#867636, BZ #16743) + +------------------------------------------------------------------- glibc-utils.changes: same change glibc.changes: same change New: ---- abort-no-flush.patch check-pf-alloca.patch fix-locking-in-_IO_cleanup.patch getaddrinfo-uninit-result.patch ldd-system-interp.patch resolv-dont-ignore-second-answer.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ glibc-testsuite.spec ++++++ --- /var/tmp/diff_new_pack.zfeEgC/_old 2014-03-27 09:28:41.000000000 +0100 +++ /var/tmp/diff_new_pack.zfeEgC/_new 2014-03-27 09:28:41.000000000 +0100 @@ -240,10 +240,22 @@ Patch1003: nscd-track-startup-failures.patch # PATCH-FIX-UPSTREAM GLIBC Optimizations For POWER8 Hardware Patch1004: powerpc-opt-power8.patch +# PATCH-FIX-UPSTREAM Account for alloca use when collecting interface addresses +Patch1005: check-pf-alloca.patch +# PATCH-FIX-UPSTREAM Fix use of half-initialized result in getaddrinfo when using nscd +Patch1006: getaddrinfo-uninit-result.patch ### # Patches awaiting upstream approval ### +# PATCH-FIX-UPSTREAM Always to locking when accessing streams (BZ #15142) +Patch2000: fix-locking-in-_IO_cleanup.patch +# PATCH-FIX-UPSTREAM Don't ignore second answer from nameserver if the first one was empty (BZ #13651) +Patch2001: resolv-dont-ignore-second-answer.patch +# PATCH-FIX-UPSTREAM Never try to execute the file in ldd (BZ #16750) +Patch2002: ldd-system-interp.patch +# PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436) +Patch2003: abort-no-flush.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -449,6 +461,13 @@ %patch1002 -p1 %patch1003 -p1 %patch1004 -p1 +%patch1005 -p1 +%patch1006 -p1 + +%patch2000 -p1 +%patch2001 -p1 +%patch2002 -p1 +%patch2003 -p1 %patch3000 glibc-utils.spec: same change ++++++ glibc.spec ++++++ --- /var/tmp/diff_new_pack.zfeEgC/_old 2014-03-27 09:28:41.000000000 +0100 +++ /var/tmp/diff_new_pack.zfeEgC/_new 2014-03-27 09:28:41.000000000 +0100 @@ -240,10 +240,22 @@ Patch1003: nscd-track-startup-failures.patch # PATCH-FIX-UPSTREAM GLIBC Optimizations For POWER8 Hardware Patch1004: powerpc-opt-power8.patch +# PATCH-FIX-UPSTREAM Account for alloca use when collecting interface addresses +Patch1005: check-pf-alloca.patch +# PATCH-FIX-UPSTREAM Fix use of half-initialized result in getaddrinfo when using nscd +Patch1006: getaddrinfo-uninit-result.patch ### # Patches awaiting upstream approval ### +# PATCH-FIX-UPSTREAM Always to locking when accessing streams (BZ #15142) +Patch2000: fix-locking-in-_IO_cleanup.patch +# PATCH-FIX-UPSTREAM Don't ignore second answer from nameserver if the first one was empty (BZ #13651) +Patch2001: resolv-dont-ignore-second-answer.patch +# PATCH-FIX-UPSTREAM Never try to execute the file in ldd (BZ #16750) +Patch2002: ldd-system-interp.patch +# PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436) +Patch2003: abort-no-flush.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -449,6 +461,13 @@ %patch1002 -p1 %patch1003 -p1 %patch1004 -p1 +%patch1005 -p1 +%patch1006 -p1 + +%patch2000 -p1 +%patch2001 -p1 +%patch2002 -p1 +%patch2003 -p1 %patch3000 ++++++ abort-no-flush.patch ++++++ Don't close or flush stdio streams on abort [BZ #15436] * stdlib/abort.c (abort): Don't call fflush and __fcloseall. Index: glibc-2.19/stdlib/abort.c =================================================================== --- glibc-2.19.orig/stdlib/abort.c +++ glibc-2.19/stdlib/abort.c @@ -30,9 +30,6 @@ # define ABORT_INSTRUCTION #endif -#include <libio/libioP.h> -#define fflush(s) _IO_flush_all_lockp (0) - /* Exported variable to locate abort message in core files etc. */ struct abort_msg_s *__abort_msg __attribute__ ((nocommon)); libc_hidden_def (__abort_msg) @@ -66,16 +63,8 @@ abort (void) __sigprocmask (SIG_UNBLOCK, &sigs, (sigset_t *) NULL); } - /* Flush all streams. We cannot close them now because the user - might have registered a handler for SIGABRT. */ - if (stage == 1) - { - ++stage; - fflush (NULL); - } - /* Send signal which possibly calls a user handler. */ - if (stage == 2) + if (stage == 1) { /* This stage is special: we must allow repeated calls of `abort' when a user defined handler for SIGABRT is installed. @@ -93,7 +82,7 @@ abort (void) } /* There was a handler installed. Now remove it. */ - if (stage == 3) + if (stage == 2) { ++stage; memset (&act, '\0', sizeof (struct sigaction)); @@ -103,30 +92,22 @@ abort (void) __sigaction (SIGABRT, &act, NULL); } - /* Now close the streams which also flushes the output the user - defined handler might has produced. */ - if (stage == 4) - { - ++stage; - __fcloseall (); - } - /* Try again. */ - if (stage == 5) + if (stage == 3) { ++stage; raise (SIGABRT); } /* Now try to abort using the system specific command. */ - if (stage == 6) + if (stage == 4) { ++stage; ABORT_INSTRUCTION; } /* If we can't signal ourselves and the abort instruction failed, exit. */ - if (stage == 7) + if (stage == 5) { ++stage; _exit (127); ++++++ check-pf-alloca.patch ++++++ * sysdeps/unix/sysv/linux/check_pf.c (make_request): Add out_fail2 label to be used after in6ailist is initialized. [BZ #16002] * sysdeps/unix/sysv/linux/check_pf.c (make_request): Use alloca_account and account alloca use for struct in6ailist. Index: glibc-2.19/sysdeps/unix/sysv/linux/check_pf.c =================================================================== --- glibc-2.19.orig/sysdeps/unix/sysv/linux/check_pf.c +++ glibc-2.19/sysdeps/unix/sysv/linux/check_pf.c @@ -139,9 +139,10 @@ make_request (int fd, pid_t pid) #endif bool use_malloc = false; char *buf; + size_t alloca_used = 0; if (__libc_use_alloca (buf_size)) - buf = alloca (buf_size); + buf = alloca_account (buf_size, alloca_used); else { buf = malloc (buf_size); @@ -163,6 +164,7 @@ make_request (int fd, pid_t pid) { struct in6addrinfo info; struct in6ailist *next; + bool use_malloc; } *in6ailist = NULL; size_t in6ailistlen = 0; bool seen_ipv4 = false; @@ -180,10 +182,10 @@ make_request (int fd, pid_t pid) ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0)); if (read_len < 0) - goto out_fail; + goto out_fail2; if (msg.msg_flags & MSG_TRUNC) - goto out_fail; + goto out_fail2; struct nlmsghdr *nlmh; for (nlmh = (struct nlmsghdr *) buf; @@ -239,7 +241,19 @@ make_request (int fd, pid_t pid) } } - struct in6ailist *newp = alloca (sizeof (*newp)); + struct in6ailist *newp; + if (__libc_use_alloca (alloca_used + sizeof (*newp))) + { + newp = alloca_account (sizeof (*newp), alloca_used); + newp->use_malloc = false; + } + else + { + newp = malloc (sizeof (*newp)); + if (newp == NULL) + goto out_fail2; + newp->use_malloc = true; + } newp->info.flags = (((ifam->ifa_flags & (IFA_F_DEPRECATED | IFA_F_OPTIMISTIC)) @@ -275,7 +289,7 @@ make_request (int fd, pid_t pid) result = malloc (sizeof (*result) + in6ailistlen * sizeof (struct in6addrinfo)); if (result == NULL) - goto out_fail; + goto out_fail2; result->timestamp = get_nl_timestamp (); result->usecnt = 2; @@ -286,7 +300,10 @@ make_request (int fd, pid_t pid) do { result->in6ai[--in6ailistlen] = in6ailist->info; - in6ailist = in6ailist->next; + struct in6ailist *next = in6ailist->next; + if (in6ailist->use_malloc) + free (in6ailist); + in6ailist = next; } while (in6ailist != NULL); } @@ -302,7 +319,15 @@ make_request (int fd, pid_t pid) free (buf); return result; -out_fail: + out_fail2: + while (in6ailist != NULL) + { + struct in6ailist *next = in6ailist->next; + if (in6ailist->use_malloc) + free (in6ailist); + in6ailist = next; + } + out_fail: if (use_malloc) free (buf); return NULL; ++++++ fix-locking-in-_IO_cleanup.patch ++++++ Always do locking when accessing streams [BZ #15142] * libio/genops.c (_IO_list_all_stamp): Delete. All uses removed. (_IO_flush_all_all_lockp): Delete. (_IO_flush_all): Replace with body of _IO_flush_all_all_lockp. Always do locking. (_IO_unbuffer_write): Always do locking. (_IO_cleanup): Call _IO_flush_all instead of _IO_flush_all_lockp. * libio/libioP.h (_IO_flush_all_all_lockp): Remove declaration. diff --git a/libio/genops.c b/libio/genops.c index e0ce8cc..9def1d4 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -38,10 +38,6 @@ static _IO_lock_t list_all_lock = _IO_lock_initializer; #endif -/* Used to signal modifications to the list of FILE decriptors. */ -static int _IO_list_all_stamp; - - static _IO_FILE *run_fp; #ifdef _IO_MTSAFE_IO @@ -70,16 +66,12 @@ _IO_un_link (fp) if (_IO_list_all == NULL) ; else if (fp == _IO_list_all) - { - _IO_list_all = (struct _IO_FILE_plus *) _IO_list_all->file._chain; - ++_IO_list_all_stamp; - } + _IO_list_all = (struct _IO_FILE_plus *) _IO_list_all->file._chain; else for (f = &_IO_list_all->file._chain; *f; f = &(*f)->_chain) if (*f == (_IO_FILE *) fp) { *f = fp->file._chain; - ++_IO_list_all_stamp; break; } fp->file._flags &= ~_IO_LINKED; @@ -108,7 +100,6 @@ _IO_link_in (fp) #endif fp->file._chain = (_IO_FILE *) _IO_list_all; _IO_list_all = fp; - ++_IO_list_all_stamp; #ifdef _IO_MTSAFE_IO _IO_funlockfile ((_IO_FILE *) fp); run_fp = NULL; @@ -818,25 +809,20 @@ _IO_get_column (fp) int -_IO_flush_all_lockp (int do_lock) +_IO_flush_all (void) { int result = 0; struct _IO_FILE *fp; - int last_stamp; #ifdef _IO_MTSAFE_IO - __libc_cleanup_region_start (do_lock, flush_cleanup, NULL); - if (do_lock) - _IO_lock_lock (list_all_lock); + _IO_cleanup_region_start_noarg (flush_cleanup); + _IO_lock_lock (list_all_lock); #endif - last_stamp = _IO_list_all_stamp; - fp = (_IO_FILE *) _IO_list_all; - while (fp != NULL) + for (fp = (_IO_FILE *) _IO_list_all; fp != NULL; fp = fp->_chain) { run_fp = fp; - if (do_lock) - _IO_flockfile (fp); + _IO_flockfile (fp); if (((fp->_mode <= 0 && fp->_IO_write_ptr > fp->_IO_write_base) #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T @@ -848,52 +834,30 @@ _IO_flush_all_lockp (int do_lock) && _IO_OVERFLOW (fp, EOF) == EOF) result = EOF; - if (do_lock) - _IO_funlockfile (fp); + _IO_funlockfile (fp); run_fp = NULL; - - if (last_stamp != _IO_list_all_stamp) - { - /* Something was added to the list. Start all over again. */ - fp = (_IO_FILE *) _IO_list_all; - last_stamp = _IO_list_all_stamp; - } - else - fp = fp->_chain; } #ifdef _IO_MTSAFE_IO - if (do_lock) - _IO_lock_unlock (list_all_lock); - __libc_cleanup_region_end (0); + _IO_lock_unlock (list_all_lock); + _IO_cleanup_region_end (0); #endif return result; } - - -int -_IO_flush_all (void) -{ - /* We want locking. */ - return _IO_flush_all_lockp (1); -} libc_hidden_def (_IO_flush_all) void _IO_flush_all_linebuffered (void) { struct _IO_FILE *fp; - int last_stamp; #ifdef _IO_MTSAFE_IO _IO_cleanup_region_start_noarg (flush_cleanup); _IO_lock_lock (list_all_lock); #endif - last_stamp = _IO_list_all_stamp; - fp = (_IO_FILE *) _IO_list_all; - while (fp != NULL) + for (fp = (_IO_FILE *) _IO_list_all; fp != NULL; fp = fp->_chain) { run_fp = fp; _IO_flockfile (fp); @@ -903,15 +867,6 @@ _IO_flush_all_linebuffered (void) _IO_funlockfile (fp); run_fp = NULL; - - if (last_stamp != _IO_list_all_stamp) - { - /* Something was added to the list. Start all over again. */ - fp = (_IO_FILE *) _IO_list_all; - last_stamp = _IO_list_all_stamp; - } - else - fp = fp->_chain; } #ifdef _IO_MTSAFE_IO @@ -947,6 +902,12 @@ static void _IO_unbuffer_write (void) { struct _IO_FILE *fp; + +#ifdef _IO_MTSAFE_IO + _IO_cleanup_region_start_noarg (flush_cleanup); + _IO_lock_lock (list_all_lock); +#endif + for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain) { if (! (fp->_flags & _IO_UNBUFFERED) @@ -956,15 +917,8 @@ _IO_unbuffer_write (void) && fp->_mode != 0) { #ifdef _IO_MTSAFE_IO - int cnt; -#define MAXTRIES 2 - for (cnt = 0; cnt < MAXTRIES; ++cnt) - if (fp->_lock == NULL || _IO_lock_trylock (*fp->_lock) == 0) - break; - else - /* Give the other thread time to finish up its use of the - stream. */ - __sched_yield (); + run_fp = fp; + _IO_flockfile (fp); #endif if (! dealloc_buffers && !(fp->_flags & _IO_USER_BUF)) @@ -980,8 +934,8 @@ _IO_unbuffer_write (void) _IO_SETBUF (fp, NULL, 0); #ifdef _IO_MTSAFE_IO - if (cnt < MAXTRIES && fp->_lock != NULL) - _IO_lock_unlock (*fp->_lock); + _IO_funlockfile (fp); + run_fp = NULL; #endif } @@ -989,6 +943,11 @@ _IO_unbuffer_write (void) used. */ fp->_mode = -1; } + +#ifdef _IO_MTSAFE_IO + _IO_lock_unlock (list_all_lock); + _IO_cleanup_region_end (0); +#endif } @@ -1008,9 +967,7 @@ libc_freeres_fn (buffer_free) int _IO_cleanup (void) { - /* We do *not* want locking. Some threads might use streams but - that is their problem, we flush them underneath them. */ - int result = _IO_flush_all_lockp (0); + int result = _IO_flush_all (); /* We currently don't have a reliable mechanism for making sure that C++ static destructors are executed in the correct order. diff --git a/libio/libioP.h b/libio/libioP.h index 8a7b85b..3e3a724 100644 --- a/libio/libioP.h +++ b/libio/libioP.h @@ -488,7 +488,6 @@ extern int _IO_new_do_write (_IO_FILE *, const char *, _IO_size_t); extern int _IO_old_do_write (_IO_FILE *, const char *, _IO_size_t); extern int _IO_wdo_write (_IO_FILE *, const wchar_t *, _IO_size_t); libc_hidden_proto (_IO_wdo_write) -extern int _IO_flush_all_lockp (int); extern int _IO_flush_all (void); libc_hidden_proto (_IO_flush_all) extern int _IO_cleanup (void); -- 1.9.1 ++++++ getaddrinfo-uninit-result.patch ++++++ * sysdeps/posix/getaddrinfo.c (gaih_inet): Properly skip over non-matching result from nscd. Index: glibc-2.19/sysdeps/posix/getaddrinfo.c =================================================================== --- glibc-2.19.orig/sysdeps/posix/getaddrinfo.c +++ glibc-2.19/sysdeps/posix/getaddrinfo.c @@ -710,6 +710,14 @@ gaih_inet (const char *name, const struc struct gaih_addrtuple *addrfree = addrmem; for (int i = 0; i < air->naddrs; ++i) { + if (!((air->family[i] == AF_INET + && req->ai_family == AF_INET6 + && (req->ai_flags & AI_V4MAPPED) != 0) + || req->ai_family == AF_UNSPEC + || air->family[i] == req->ai_family)) + /* Skip over non-matching result. */ + continue; + socklen_t size = (air->family[i] == AF_INET ? INADDRSZ : IN6ADDRSZ); if (*pat == NULL) ++++++ ldd-system-interp.patch ++++++ Never try to execute the file in ldd Executing a random file is never a good idea. Treat all arguments as if they are invoked with __libc_enable_secure, and run them through the known good dynamic linker. * elf/ldd.bash.in: Always run through the dynamic linker, even if the file has its own interpreter. Remove unneeded executable check. Index: glibc-2.19/elf/ldd.bash.in =================================================================== --- glibc-2.19.orig/elf/ldd.bash.in +++ glibc-2.19/elf/ldd.bash.in @@ -150,8 +150,6 @@ for file do echo "ldd: ${file}:" $"not regular file" >&2 result=1 elif test -r "$file"; then - test -x "$file" || echo 'ldd:' $"\ -warning: you do not have execution permission for" "\`$file'" >&2 RTLD= ret=1 for rtld in ${RTLDLIST}; do @@ -164,18 +162,6 @@ warning: you do not have execution permi fi done case $ret in - 0) - # If the program exits with exit code 5, it means the process has been - # invoked with __libc_enable_secure. Fall back to running it through - # the dynamic linker. - try_trace "$file" - rc=$? - if [ $rc = 5 ]; then - try_trace "$RTLD" "$file" - rc=$? - fi - [ $rc = 0 ] || result=1 - ;; 1) # This can be a non-ELF binary or no binary at all. nonelf "$file" || { @@ -183,7 +169,7 @@ warning: you do not have execution permi result=1 } ;; - 2) + [02]) try_trace "$RTLD" "$file" || result=1 ;; *) ++++++ powerpc-opt-power8.patch ++++++ ++++ 718 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/glibc/powerpc-opt-power8.patch ++++ and /work/SRC/openSUSE:Factory/.glibc.new/powerpc-opt-power8.patch ++++++ resolv-dont-ignore-second-answer.patch ++++++ Don't ignore second answer from nameserver if the first one was empty (BZ #13651) Index: glibc-2.19/resolv/res_query.c =================================================================== --- glibc-2.19.orig/resolv/res_query.c +++ glibc-2.19/resolv/res_query.c @@ -382,7 +382,7 @@ __libc_res_nsearch(res_state statp, answer, anslen, answerp, answerp2, nanswerp2, resplen2, answerp2_malloced); - if (ret > 0 || trailing_dot) + if (ret > 0 || (ret == 0 && *resplen2 > 0) || trailing_dot) return (ret); saved_herrno = h_errno; tried_as_is++; @@ -422,7 +422,7 @@ __libc_res_nsearch(res_state statp, answer, anslen, answerp, answerp2, nanswerp2, resplen2, answerp2_malloced); - if (ret > 0) + if (ret > 0 || (ret == 0 && *resplen2 > 0)) return (ret); if (answerp && *answerp != answer) { @@ -491,7 +491,7 @@ __libc_res_nsearch(res_state statp, answer, anslen, answerp, answerp2, nanswerp2, resplen2, answerp2_malloced); - if (ret > 0) + if (ret > 0 || (ret == 0 && *resplen2 > 0)) return (ret); } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
