about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* Fix implicit declarationAndreas Schwab2014-05-012-0/+5
|
* Fix v9/64-bit strcmp when string ends in multiple zero bytes.David S. Miller2014-05-013-0/+69
| | | | | | | | | | [BZ #16885] * sysdeps/sparc/sparc64/strcmp.S: Fix end comparison handling when multiple zero bytes exist at the end of a string. Reported by Aurelien Jarno <aurelien@aurel32.net> * string/test-strcmp.c (check): Add explicit test for situations where there are multiple zero bytes after the first.
* Correctly handle %p in wprintf (BZ #16890)Andreas Schwab2014-05-014-2/+30
|
* 2014-05-01 Steve Ellcey <sellcey@mips.com>Steve Ellcey2014-05-015-5/+13
| | | | | | | * intl/iconv/skeleton.c (ONE_DIRECTION): Remove define. * iconv/gconv_simple.c (ONE_DIRECTION): Define. * iconvdata/8bit-gap.c (ONE_DIRECTION): Ditto. * iconvdata/8bit-generic.c (ONE_DIRECTION): Ditto.
* 2014-05-01 Steve Ellcey <sellcey@mips.com>Steve Ellcey2014-05-012-2/+6
| | | | * stdlib/longlong.h: Updated from GCC.
* NEWS: Add 15119 to fixed bug listWill Newton2014-05-012-7/+10
|
* ARM: Remove lowlevellock.cWill Newton2014-05-012-132/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lowlevellock.c for arm differs from the generic lowlevellock.c only in insignificant ways, so can be removed. Happily, this fixes BZ 15119 (unnecessary busy loop in __lll_timedlock_wait on arm). The notable differences between the arm and generic implementations are: 1) arm __lll_timedlock_wait has a fast path out if futex has been set to 0 between since the function was called. This seems unlikely to happen very often, so it seems at worst harmless to lose this fast path. 2) Some function in arm's lowlevellock.c set futex to 2 if it was 1. The generic version always sets the futex to 2. As futex can only be 0, 1 or 2 on entry into these functions, the behaviour is equivalent. (If the futex manages to be 0 on entry then we've just lost another unlikely fast path out.) There are no test suite regressions. Note that hppa and sparc also have their own lowlevellock.c. I believe hppa can also be removed, so I'll send a separate patch for that shortly. sparc's seems to be genuinely needed as it uses a different locking structure. Also note that the analysis at https://sourceware.org/ml/libc-ports/2013-02/msg00021.html indicates a further locking performance bug to fix - I've got a partial patch for that which I can submit once I've finished testing. 2014-05-01 Bernard Ogden <bernie.ogden@linaro.org> [BZ #15119] * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c: Remove file.
* Add round-mode context support to sparc.David S. Miller2014-04-302-0/+85
| | | | | | | | | | | | | | | | | | | | | | | * sysdeps/sparc/fpu/fenv_private.h (HAVE_RM_CTX): Define. (libc_feholdexcept_setround_sparc_ctx): New function. (libc_fesetenv_sparc_ctx): Likewise. (libc_feupdateenv_sparc_ctx): Likewise. (libc_feholdsetround_sparc_ctx): Likewise. (libc_feholdexcept_setround_ctx): Define. (libc_feholdexcept_setroundf_ctx): Likewise. (libc_feholdexcept_setroundl_ctx): Likewise. (libc_fesetenv_ctx): Likewise. (libc_fesetenvf_ctx): Likewise. (libc_fesetenvl_ctx): Likewise. (libc_feupdateenv_ctx): Likewise. (libc_feupdateenvf_ctx): Likewise. (libc_feupdateenvl_ctx): Likewise. (libc_feresetround_ctx): Likewise. (libc_feresetroundf_ctx): Likewise. (libc_feresetroundl_ctx): Likewise. (libc_feholdsetround_ctx): Likewise. (libc_feholdsetroundf_ctx): Likewise. (libc_feholdsetroundl_ctx): Likewise.
* Correct sparc CPP guards for EMT_TAGOVF.David S. Miller2014-04-302-1/+4
| | | | | * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h (EMT_TAGOVF): Protect with __USE_GNU instead of XOPEN cpp guards.
* Fix some sparc -Wundef build warnings.David S. Miller2014-04-302-0/+6
| | | | | * sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Define to 0.
* Fix some sparc conform test failures in siginfo.hDavid S. Miller2014-04-302-0/+7
| | | | | * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h (EMT_TAGOVF): Protect with XOPEN cpp guards.
* Move ports/ChangeLog* files to ChangeLog.old-ports*, remove ports/ directory.Roland McGrath2014-04-3015-0/+0
|
* Add deprecation header text to remaining ports/ChangeLog* files.Roland McGrath2014-04-304-0/+27
|
* ARM: Fix R_ARM_IRELATIVE RELA relocations.Julian Brown2014-04-303-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes what I believe to be a bug in the handling of R_ARM_IRELATIVE RELA relocations. At present, these are handled the same as REL relocations: i.e. the addend is loaded from the relocation address. Most of the time this isn't a problem because RELA relocations aren't used on ARM (GNU/Linux at least) anyway, but it causes problems with prelink, which uses RELA on all targets for its conflict table. (Support for ifunc prelinking requires a prelink patch, not yet posted.) Anyway, this patch works, though I'm not 100% sure if it is correct: I notice that this code path received attention last year: https://sourceware.org/ml/libc-ports/2013-07/msg00000.html I'm not sure under what circumstances that patch would have had an effect, nor if my patch conflicts with that case. No regressions using Mentor's usual glibc cross-testing infrastructure. [BZ #16888] * sysdeps/arm/dl-machine.h (elf_machine_rela): Fix R_ARM_IRELATIVE handling.
* Increase minimum Linux kernel version to 2.6.32.Joseph Myers2014-04-3011-46/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch increases the minimum Linux kernel version for glibc to 2.6.32, as discussed in the thread starting at <https://sourceware.org/ml/libc-alpha/2014-01/msg00511.html>. This patch just does the minimal change to arch_minimum_kernel settings (and LIBC_LINUX_VERSION, which determines the minimum kernel headers version, as it doesn't make sense for that to be older than the minimum kernel that can be used at runtime). Followups would be expected to do, roughly and not necessarily precisely in this order: * Remove __LINUX_KERNEL_VERSION checks in kernel-features.h files where those checks are always true / always false for kernels 2.6.32 and above. * Otherwise simplify/improve conditionals in those files (for example, where defining once in the main file then undefining in architecture-specific files makes things clearer than having lots of separate definitions of the same macro), possibly fixing in the process cases where a macro should optimally have been defined for a given architecture but wasn't. (In the review in preparation for this version increase I checked what the right conditions should be for all macros in the main kernel-features.h whose definitions there would have been affected by the increase - but I only fixed that subset of the issues found where --enable-kernel=2.6.32 would have caused a kernel feature to be wrongly assumed to be present, not any cases where a feature is not assumed but could be assumed.) * Remove conditionals on __ASSUME_* where they can now be taken to be always-true, and the definitions when the macros are only used in Linux-specific files. * Split more architectures out of the main kernel-features.h (like ex-ports architectures), once various of the architecture conditionals there have been eliminated so the new architecture-specific files are no larger than actually necessary. Tested x86_64. 2014-03-27 Joseph Myers <joseph@codesourcery.com> [BZ #9894] * sysdeps/unix/sysv/linux/configure.ac (LIBC_LINUX_VERSION): Change to 2.6.32. (arch_minimum_kernel): Change all 2.6.16 settings to 2.6.32. * sysdeps/unix/sysv/linux/configure: Regenerated. * sysdeps/unix/sysv/linux/microblaze/configure.ac: Remove file. * sysdeps/unix/sysv/linux/microblaze/configure: Likewise. * sysdeps/unix/sysv/linux/tile/configure.ac: Likewise. * sysdeps/unix/sysv/linux/tile/configure: Likewise. * README: Update reference to required Linux kernel version. * manual/install.texi (Linux): Update reference to required Linux kernel headers version. * INSTALL: Regenerated.
* conformtest: clean up POSIX expectations for stdlib.h, string.h.Joseph Myers2014-04-303-3/+14
| | | | | | | | | | | | | | | | Continuing the series of patches to clean up conformtest expectations for "POSIX" (1995/6) based on review of the expectations against the standard, this patch cleans up expectations for stdlib.h and string.h. Tested x86_64; no new XFAILs needed. * conform/data/stdlib.h-data [POSIX] (stddef.h): Do not allow header inclusion. [POSIX] (limits.h): Likewise. [POSIX] (math.h): Likewise. [POSIX] (sys/wait.h): Likewise. * conform/data/string.h-data [POSIX || UNIX98] (strtok_r): Require function. [POSIX] (stddef.h): Do not allow header inclusion.
* ChangeLog cleanupAndreas Schwab2014-04-301-493/+275
|
* More fixes for unsafe compiler optimizationAdhemerval Zanella2014-04-302-0/+5
| | | | | GCC 4.9 -ftree-loop-distribute-patterns now may transform loops in memcpy. Add the alias to internal GLIBC symbol to avoid PLT creation.
* Fix lll_unlock twice in pthread_cond_broadcastYang Yingliang2014-04-302-0/+6
| | | | | | | | | | lll_unlock() will be called again if it goes to "wake_all" in pthread_cond_broadcast(). This may make another thread which is waiting for lock in pthread_cond_timedwait() unlock. So there are more than one threads get the lock, it will break the shared data. It's introduced by commit 8313cb997d2d("FUTEX_*_REQUEUE_PI support for non-x86 code")
* Initialize all of datahead structure in nscd (BZ #16791)Siddhesh Poyarekar2014-04-303-5/+23
| | | | | | | | | The datahead structure has an unused padding field that remains uninitialized. Valgrind prints out a warning for it on querying a netgroups entry. This is harmless, but is a potential data leak since it would result in writing out an uninitialized byte to the cache file. Besides, this happens only when there is a cache miss, so we're not adding computation to any fast path.
* Consolidate code to initialize nscd dataset headerSiddhesh Poyarekar2014-04-309-122/+105
| | | | | | | | | | This patch consolidates the code to initialize the header of a dataset into a single set of functions (one for positive and another for negative datasets) primarily to reduce repetition of code. The secondary reason is to simplify Patch 2/2 which fixes the problem of an uninitialized byte in the header by initializing an unused field in the structure and hence preventing a possible data leak into the cache file.
* Do not fail if one of the two responses to AF_UNSPEC fails (BZ #14308)Siddhesh Poyarekar2014-04-304-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Fixes BZ #14308, #12994, #13651] AF_UNSPEC results in sending two queries in parallel, one for the A record and the other for the AAAA record. If one of these is a referral, then the query fails, which is wrong. It should return at least the one successful response. The fix has two parts. The first part makes the referral fall back to the SERVFAIL path, which results in using the successful response. There is a bug in that path however, due to which the second part is necessary. The bug here is that if the first response is a failure and the second succeeds, __libc_res_nsearch does not detect that and assumes a failure. The case where the first response is a success and the second fails, works correctly. This condition is produced by buggy routers, so here's a crude interposable library that can simulate such a condition. The library overrides the recvfrom syscall and modifies the header of the packet received to reproduce this scenario. It has two key variables: mod_packet and first_error. The mod_packet variable when set to 0, results in odd packets being modified to be a referral. When set to 1, even packets are modified to be a referral. The first_error causes the first response to be a failure so that a domain-appended search is performed to test the second part of the __libc_nsearch fix. The driver for this fix is a simple getaddrinfo program that does an AF_UNSPEC query. I have omitted this since it should be easy to implement. I have tested this on x86_64. The interceptor library source: /* Override recvfrom and modify the header of the first DNS response to make it a referral and reproduce bz #845218. We have to resort to this ugly hack because we cannot make bind return the buggy response of a referral for the AAAA record and an authoritative response for the A record. */ #define _GNU_SOURCE #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdbool.h> #include <endian.h> #include <dlfcn.h> #include <stdlib.h> /* Lifted from resolv/arpa/nameser_compat.h. */ typedef struct { unsigned id :16; /*%< query identification number */ #if BYTE_ORDER == BIG_ENDIAN /* fields in third byte */ unsigned qr: 1; /*%< response flag */ unsigned opcode: 4; /*%< purpose of message */ unsigned aa: 1; /*%< authoritive answer */ unsigned tc: 1; /*%< truncated message */ unsigned rd: 1; /*%< recursion desired */ /* fields * in * fourth * byte * */ unsigned ra: 1; /*%< recursion available */ unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ unsigned ad: 1; /*%< authentic data from named */ unsigned cd: 1; /*%< checking disabled by resolver */ unsigned rcode :4; /*%< response code */ #endif #if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN /* fields * in * third * byte * */ unsigned rd :1; /*%< recursion desired */ unsigned tc :1; /*%< truncated message */ unsigned aa :1; /*%< authoritive answer */ unsigned opcode :4; /*%< purpose of message */ unsigned qr :1; /*%< response flag */ /* fields * in * fourth * byte * */ unsigned rcode :4; /*%< response code */ unsigned cd: 1; /*%< checking disabled by resolver */ unsigned ad: 1; /*%< authentic data from named */ unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ unsigned ra :1; /*%< recursion available */ #endif /* remaining * bytes * */ unsigned qdcount :16; /*%< number of question entries */ unsigned ancount :16; /*%< number of answer entries */ unsigned nscount :16; /*%< number of authority entries */ unsigned arcount :16; /*%< number of resource entries */ } HEADER; static int done = 0; /* Packets to modify. 0 for the odd packets and 1 for even packets. */ static const int mod_packet = 0; /* Set to true if the first request should result in an error, resulting in a search query. */ static bool first_error = true; static ssize_t (*real_recvfrom) (int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen); void __attribute__ ((constructor)) init (void) { real_recvfrom = dlsym (RTLD_NEXT, "recvfrom"); if (real_recvfrom == NULL) { printf ("Failed to get reference to recvfrom: %s\n", dlerror ()); printf ("Cannot simulate test\n"); abort (); } } /* Modify the second packet that we receive to set the header in a manner as to reproduce BZ #845218. */ static void mod_buf (HEADER *h, int port) { if (done % 2 == mod_packet || (first_error && done == 1)) { printf ("(Modifying header)"); if (first_error && done == 1) h->rcode = 3; else h->rcode = 0; /* NOERROR == 0. */ h->ancount = 0; h->aa = 0; h->ra = 0; h->arcount = 0; } done++; } ssize_t recvfrom (int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) { ssize_t ret = real_recvfrom (sockfd, buf, len, flags, src_addr, addrlen); int port = htons (((struct sockaddr_in *) src_addr)->sin_port); struct in_addr addr = ((struct sockaddr_in *) src_addr)->sin_addr; const char *host = inet_ntoa (addr); printf ("\n*** From %s:%d: ", host, port); mod_buf (buf, port); printf ("returned %zd\n", ret); return ret; }
* Final update to ports ChangeLog.Carlos O'Donell2014-04-291-0/+4
| | | | | Indicate the removal of the README and carry out the final update to the ports/ChangeLog.
* Remove ports README and update machine ChangeLogs.Carlos O'Donell2014-04-295-49/+28
| | | | | | | This patch removes the ports/README now that ports is no longer being used. It also adds a header to all ChangeLogs for all machines that were moved to the main libc tree. The header indicates that the ChangeLog is no longer used.
* 2014-04-29 Steve Ellcey <sellcey@mips.com>Steve Ellcey2014-04-292-0/+8
| | | | * iconf/skeleton.c (ONE_DIRECTION): Set default value if not set.
* Mention BZ16823 in NEWSStefan Liebler2014-04-291-1/+1
|
* [BZ #16823] Fix log1pl returning wrong infinity signStefan Liebler2014-04-294-3/+11
|
* FixAdhemerval Zanella2014-04-292-2/+2
|
* PowerPC: Suppress unnecessary FPSCR writeAdhemerval Zanella2014-04-298-16/+60
| | | | | | | This patch optimizes the FPSCR update on exception and rounding change functions by just updating its value if new value if different from current one. It also optimizes fedisableexcept and feenableexcept by removing an unecessary FPSCR read.
* Relocate hppa from ports to libc.Carlos O'Donell2014-04-29152-61/+41
|
* hppa: Update lowlevellock.h.Carlos O'Donell2014-04-292-22/+39
| | | | | Cleanup and remove old lll_private_futex_wake macro and add generic support for PI-aware futexes.
* hppa: Use lll_futex_wake.Carlos O'Donell2014-04-292-1/+4
| | | | | The lll_private_futex_wake function no longer exists. Instead use lll_futex_make with LLL_PRIVATE as the last argument.
* hppa: Use r25 as second input to __longjmp.Carlos O'Donell2014-04-292-12/+18
| | | | | | The generated assembly is simplified if we use r25, the expected second argument to the function given the calling convention.
* Fix types of stream hook functions in manual.Ondřej Bílka2014-04-283-6/+9
|
* Fix recvmmsg comment.Ondřej Bílka2014-04-283-3/+8
|
* [ARM] Add support for fenv_private on ARM.Wilco Dijkstra2014-04-284-1/+267
|
* Replace __int128 with __int128_t in bits/link.hH.J. Lu2014-04-252-3/+9
| | | | | | | | | | __int128 was added in GCC 4.6 and __int128_t was added before x86-64 was supported. This patch replaces __int128 with __int128_t so that the installed bits/link.h can be used with older GCC. * sysdeps/x86/bits/link.h (La_x86_64_regs): Replace __int128 with __int128_t. (La_x86_64_retval): Likewise.
* [AArch64] Suppress unnecessary FPSR and FPCR writes.Ian Bolton2014-04-248-28/+61
|
* Use test-skeleton.c in tst-sem3 and tst-sem4Siddhesh Poyarekar2014-04-233-15/+29
|
* Fix sigaction conform test failures on sparc.David S. Miller2014-04-222-1/+8
| | | | | | * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h (struct sigaction): New struct member __glibc_reserved0, change type of sa_flags to int.
* [AArch64] Use GCC builtins to count leading/tailing zeros.Yufeng Zhang2014-04-222-0/+21
|
* Include atomic.h in sem_wait.c and sem_trywait.cSiddhesh Poyarekar2014-04-223-0/+7
|
* aarch64: Add setjmp and longjmp SystemTap probesVenkataramanan Kumar2014-04-223-0/+24
| | | | | | | | | | | | | | | Add setjmp, longjmp and longjmp_target SystemTap probes. ChangeLog: 2014-04-22 Will Newton <will.newton@linaro.org> Venkataramanan Kumar <venkataramanan.kumar@linaro.org> * sysdeps/aarch64/__longjmp.S: Include stap-probe.h. (__longjmp): Add longjmp and longjmp_target SystemTap probes. * sysdeps/aarch64/setjmp.S: Include stap-probe.h. (__sigsetjmp): Add setjmp SystemTap probe.
* manual: Sort overview listing by manual order.Carlos O'Donell2014-04-172-28/+82
| | | | | | | | | | | | | | | In the glibc manual we have a "Roadmap to the manual" section at the end of the "Introduction" chapter. The introductory text says "Here is an overview of the contents of the remaining chapters of this manual.", but then proceeds to list chapters out of order and some chapter are never referenced. This commit reorders the overview to correctly match the manual order. See: https://sourceware.org/ml/libc-alpha/2014-02/msg00823.html
* PowerPC: Sync pthread_once with default implementationAdhemerval Zanella2014-04-172-110/+4
| | | | | | | | This patch removes the arch specific powerpc implementation and instead uses the linux default one. Although the current powerpc implementation already constains the required memory barriers for correct initialization, the default implementation shows a better performance on newer chips.
* PowerPC: Add fenv macros for long doubleAdhemerval Zanella2014-04-172-2/+17
| | | | | This patch add the missing libc_<function>l_ctx macros for long double. Similar for float, they point to default double versions.
* Add fenv test support for AArch64.Ian Bolton2014-04-172-0/+26
|
* Detect if AVX2 is usableSihai Yao2014-04-174-0/+25
| | | | | | | | | | | | | | | This patch checks and sets bit_AVX2_Usable in __cpu_features.feature. * sysdeps/x86_64/multiarch/ifunc-defines.sym (COMMON_CPUID_INDEX_7): New. * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Check and set bit_AVX2_Usable. * sysdeps/x86_64/multiarch/init-arch.h (bit_AVX2_Usable): New macro. (bit_AVX2): Likewise. (index_AVX2_Usable): Likewise. (CPUID_AVX2): Likewise. (HAS_AVX2): Likewise.
* manual/setjmp.texi: Clarify setcontext and signal handlers textWill Newton2014-04-172-8/+17
| | | | | | | | | | | | | | | | | Calling setcontext from a signal handler can be done safely so it is sufficient to note that it is not recommended. Also mention in setcontext documentation that the behaviour of setcontext when restoring a context created by a call to a signal handler is unspecified. 2014-04-17 Will Newton <will.newton@linaro.org> * manual/setjmp.texi (System V contexts): Add note that calling setcontext on a context created by a call to a signal handler is undefined. Update text to note that setcontext from a signal handler is possible but not recommended.
* stdlib/tst-setcontext.c: Check for clobbering of signal stackWill Newton2014-04-172-0/+25
| | | | | | | | | | | | | | | On aarch64 calling swapcontext clobbers the state of the signal stack (BZ #16629). Check that the address and size of the signal stack before and after the call to swapcontext remains the same. ChangeLog: 2014-04-17 Will Newton <will.newton@linaro.org> [BZ #16629] * stdlib/tst-setcontext.c: Include signal.h. (main): Check that the signal stack before and after swapcontext is the same.