Commit Graph

11801 Commits

Author SHA1 Message Date
Ulrich Drepper 9655389317 Fix bookkeeping of static TLS block for TLS_TCB_AT_TP architectures. 2009-07-28 21:58:32 -07:00
Ulrich Drepper e83c1a8a72 Refine testing for xmm/ymm register use in x86-64 ld.so.
The test now takes the callgraph into account.  Only code called
during runtime relocation is affected by the limitation.  We now
determine the affected object files as closely as possible from
the outside.  This allowed to remove some the specializations
for some of the string functions as they are only used in other
code paths.
2009-07-27 13:40:27 -07:00
Adam Tkac 2d0671cbbd Define and implement RES_USE_DNSSEC option in resolver. 2009-07-27 07:33:48 -07:00
Jakub Jelinek 09cd1f5754 Fix STB_GNU_UNIQUE handling for > 30 unique symbols.
There were several issues when the initial 31 entries hashtab filled up.
size * 3 <= tab->n_elements is always false, table can't have more elements
than its size.  I assume from libiberty/hashtab.c this meant to be check for
3/4 full.  Even after fixing that, _dl_higher_prime_number (31) apparently
returns 31, only _dl_higher_prime_number (32) returns 61.  And, size
variable wasn't updated during reallocation, which means during reallocation
the insertion of the new entry was done into a wrong spot.

All this lead to a hang in ld.so, because a search with n_elements 31 size
31 wouldn't ever terminate.
2009-07-27 07:25:57 -07:00
Ulrich Drepper 009a69f0bc No need for special strcmp for rtld. 2009-07-27 06:55:04 -07:00
Ulrich Drepper 16d2ea4c82 Make sure no code in ld.so uses xmm/ymm registers on x86-64.
This patch introduces a test to make sure no function modifies the
xmm/ymm registers.  With the exception of the auditing functions.

The test is probably too pessimistic.  All code linked into ld.so
is checked.  Perhaps at some point the callgraph starting from
_dl_fixup and _dl_profile_fixup is checked and we can start using
faster SSE-using functions in parts of ld.so.
2009-07-26 16:10:00 -07:00
Ulrich Drepper dc8e5eb6ed Add missing ChangeLog entry for last checkin. 2009-07-26 13:37:45 -07:00
Ulrich Drepper aa7492d20e Compatibility of signalfd/eventfd with older kernels. 2009-07-26 12:55:03 -07:00
Ulrich Drepper e28b969b49 Handle SERVFAIL, NOTIMP, REFUSED replies from DNS server better.
When doing IPv4+6 lookups we have to pass up the error record from
send_dg.
2009-07-26 12:16:24 -07:00
Ulrich Drepper 889f847e4a Define NT_GNU_GOLD_VERSION. 2009-07-26 08:26:43 -07:00
H.J. Lu 4e5b5821bf Some some optimizations for x86-64 strcmp. 2009-07-25 19:15:14 -07:00
Ulrich Drepper 657317537c Handle missing NSS modules and those without callbacks.
getaddrinfo didn't update the status variable in that round of the
loop if no callback was used.
2009-07-25 12:29:04 -07:00
Ulrich Drepper 29e92fa5cd Optimize x86-64 SSE4.2 strcmp.
The file contained some code which was never used.  Don't compile it
in.
2009-07-25 12:02:47 -07:00
Ulrich Drepper da331e8e14 Don't automatically use /lib/modules/* headers.
Ever since the /usr/include/linux headers got cleaned up this isn't
necessary.  Meanwhile everybody should have these cleanups.
2009-07-24 13:01:17 -07:00
Andreas Krebbel f957edded8 S/390: Hardware iconv modules. 2009-07-24 08:29:06 -07:00
Ulrich Drepper b2509a1e38 Avoid cpuid instructions in cache info discovery.
When multiarch is enabled we have this information stored.  Use it.
2009-07-23 14:03:53 -07:00
Ulrich Drepper 3e9099b4f6 Add more cache descriptors for L3 caches on x86 and x86-64.
The most recent AP 485 describes a few more cache descriptors for
L3 caches with 24-way associativity.
2009-07-23 13:42:46 -07:00
Ulrich Drepper d28797e426 Perform test for Arom x86-64 in central place and handle it.
There will be more than one function which, in multiarch mode, wants
to use SSSE3.  We should not test in each of them for Atoms with
slow SSSE3.  Instead, disable the SSSE3 bit in the startup code for
such machines.
2009-07-23 13:15:17 -07:00
Ulrich Drepper 666a9871f7 Avoid warnings in test cases.
The posix/tst-rfc3484* test cases caused warnings in newer gccs
because the unused but copied sin_zero part of sockaddr_in wasn't
explicitly initialized.
2009-07-23 12:53:50 -07:00
Duncan Simpson 30a2dfd518 Make include/unistd.h suitable for C++ test cases. 2009-07-23 12:39:17 -07:00
Ulrich Drepper 9b6bf8a302 Preserve stack alignment in i386 makecontext. 2009-07-23 08:02:07 -07:00
Ulrich Drepper 077e7700b3 Some more fixes for the unique symbol handling.
The hash value can be zero, so we need a different test for empty
slots.  And unify the way we prevent a DSO from being unloaded.
2009-07-23 07:36:34 -07:00
Ulrich Drepper 802fe9a1ca Handle unloading of DSO with a unique symbol definition. 2009-07-23 07:07:53 -07:00
Ulrich Drepper ae612b04cc Minor cleanups in x86-64 strstr. 2009-07-21 07:52:12 -07:00
Ulrich Drepper a8f895ebe1 Better check for optimization in new x86-64 strstr/strcasestr. 2009-07-20 21:18:28 -07:00
H.J. Lu 2b7a8664fa SSE4.2 strstr/strcasestr for x86-64.
This patch implements SSE4.2 strstr/strcasestr, using Knuth-Morris-Pratt
string searching algorithm.
2009-07-20 21:06:50 -07:00
Ulrich Drepper 8a4494506d Check generated locale for non-ASCII 8-bit characters with case conversion.
If a locale does not have 8-bit characters with case conversion which
are different from the ASCII conversion (±0x20) then we can perform
some optimizations.  These will follow later.
2009-07-20 20:04:42 -07:00
Ulrich Drepper 63601ccd16 Replace hand-coded unwind tables from x86-64 pthread_once. 2009-07-17 14:45:08 -07:00
Ulrich Drepper 00ebd7ed58 Revert "Fix lock handling in memory hander of nscd."
This reverts commit 137028b4d7.

Conflicts:

	ChangeLog
2009-07-17 07:49:16 -07:00
Ulrich Drepper 09f97a8fbf Add missing BZ number in ChangeLog. 2009-07-17 05:58:12 -07:00
Ulrich Drepper 1c0ab5bd34 Handle overly large answer buffers in resolver.
In EDNS0 records the maximum result size is transmitted in a 16
bit value.  Large buffer sizes were handled incorrectly by using
only the low 16 bits.  Fix this by limiting the size to 0xffff.
2009-07-16 23:37:50 -07:00
Petr Baudis 137028b4d7 Fix lock handling in memory hander of nscd.
The commit 20e498bd removes the pthread_mutex_rdlock() calls, but not the
corresponding pthread_mutex_unlock() calls. Also, the database lock is never
unlocked in one branch of the mempool_alloc() if.

I think unreproducible random assert(dh->usable) crashes in prune_cache() were
caused by this. But an easy way to make nscd threads hang with the broken
locking was.
2009-07-16 10:10:10 -07:00
Andreas Schwab 50158f9552 Use correct release semantic in list update.
nscd uses lockfree lists and we need to ensure the correct release
semantics is used when adding to the list.
2009-07-16 09:57:32 -07:00
Ulrich Drepper bec466d922 Fix race in corruption check.
With atomic fastbins the checks performed can race with concurrent
modifications of the arena.  If we detect a problem re-do the test
after getting the lock.
2009-07-16 09:54:34 -07:00
Jakub Jelinek bea0ac1d87 Use rel semantics of cas instead of acq semantics with full barrier before it in _int_free
The following patch fixes catomic_compare_and_exchange_*_rel definitions
(which were never used and weren't correct) and uses
catomic_compare_and_exchange_val_rel in _int_free.  Comparing to the
pre-2009-07-02 --enable-experimental-malloc state the generated code should
be identical on all arches other than ppc/ppc64 and on ppc/ppc64 should use
lwsync instead of isync barrier.
2009-07-16 07:24:50 -07:00
Ulrich Drepper 55c4ce6885 Remove warning and little optimization.
The prototype for _dl_higher_prime_number was missing.  While at it,
the function is now marked with internal_function.
2009-07-16 07:18:53 -07:00
Ulrich Drepper c8027cced1 Optimize restoring of ymm registers on x86-64.
The patch mainly reduces the code size but also avoids some jumps.
2009-07-16 07:15:15 -07:00
H.J. Lu e26c9b8415 memcmp implementation for x86-64 using SSE2. 2009-07-16 07:00:34 -07:00
Ulrich Drepper d7bd7a8ae8 Secure AVX changes for auditing code.
The original AVX patch used a function pointer to handle the difference
between machines with and without AVX support.  This is insecure.  A
well-placed memory exploit could lead to redirection of the execution.
Using a variable and several tests is a bit slower but cannot be
exploited in this way.
2009-07-15 17:41:36 -07:00
Ulrich Drepper 59cbcac015 Fix build issue with modules for audit test on machines != x86-64. 2009-07-15 08:27:19 -07:00
H.J. Lu b0ecde3a63 Add AVX support to ld.so auditing for x86-64. 2009-07-10 12:04:14 -07:00
Ulrich Drepper 786b74f41a Remove do-lookup.h.
It is not necessary/useful anymore to have the content separate
from dl-lookup.c.
2009-07-10 08:50:33 -07:00
Ulrich Drepper 339717d5f1 Fix comment in Linux's <sys/epoll.h>. 2009-07-10 06:14:25 -07:00
Ulrich Drepper 415ac3df9b Implement STB_GNU_UNIQUE handling.
Some symbols have to be identified process-wide by their name.  This is
particularly important for some C++ features (e.g., class local static data
and static variables in inline functions).  This cannot completely be
implemented with ELF functionality so far.  The STB_GNU_UNIQUE binding
helps by ensuring the dynamic linker will always use the same definition for
all symbols with the same name and this binding.
2009-07-09 23:52:22 -07:00
Ulrich Drepper b4f55afd03 Define STB_GNU_UNIQUE. 2009-07-07 09:53:01 -07:00
Ulrich Drepper eba0994e75 Clean up code for hash table handling in ld.so. 2009-07-07 09:49:55 -07:00
Ulrich Drepper a38862a589 Optimize test for valid ELF symbol types in lookup function. 2009-07-06 06:55:57 -07:00
Andreas Schwab 2123d5815e Fix wrong PPC_FEATURE_* values.
Nothing uses these wrong values yet, but it fixes a warning due to
conflicting definitions in <asm/cputable.h>.
2009-07-05 23:46:03 -07:00
Ulrich Drepper cea4329592 Minor cleanups in recently added files. 2009-07-03 03:23:01 -07:00
Ulrich Drepper d6485c981b Align functions to 16-byte boundary.
Some of the new multi-arch string functions for x86-64 were
not aligned to 16 byte boundarie,s possibly creating unnecessary
cache line misses and delays.
2009-07-03 03:01:57 -07:00