| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using sln on some filesystems which return 64-bit inodes,
the stat call might fail during install like so:
.../elf/sln .../elf/symlink.list
/lib32/libc.so.6: invalid destination: Value too large for defined data type
/lib32/ld-linux.so.2: invalid destination: Value too large for defined data type
Makefile:104: recipe for target 'install-symbolic-link' failed
Switch to using stat64 all the time to avoid this.
URL: https://bugs.gentoo.org/576396
(cherry picked from commit f5e753c8c3a18a1e3c715dd11bf4dc341b5c481f)
(cherry picked from commit d6778fc4b0039b2116f88218212618ca357fee2f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Beginning with Linux 4.3, the kernel headers contain direct
system call numbers __NR_socket etc. on s390x. On older kernels,
the socket-multiplexer syscall __NR_socketcall was used.
To enable these new syscalls, the patch
"S390: Call direct system calls for socket operations."
(https://sourceware.org/git/?p=glibc.git;a=commit;h=016495b818cb61df7d0d10e6db54074271b3e3a5)
was applied upstream.
If glibc 2.23 is configured with --enable-kernel=4.3 and newer,
the direct socket syscalls are used.
For older kernels, the socket-multiplexer syscall is used instead.
In glibc 2.22 and earlier, this patch is not applied.
If you build glibc on a kernel < 4.3, the socket-multiplexer
syscall is used. But if you build glibc on kernel >= 4.3, the
direct socket-syscalls are used. If you install this glibc on a
kernel < 4.3, all socket operations will fail.
See "Bug 19682 - s390x: Incorrect syscall definitions cause
breakage with Linux 4.3 headers"
(https://sourceware.org/bugzilla/show_bug.cgi?id=19682)
The configure switch --enable-kernel does not influence this
behaviour on older glibc-releases.
The solution is to remove the direct socket-syscalls in
sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
(this patch) on older glibc-releases as it was done by the
upstream patch, too. These entries were never used on s390x,
but the c-files in sysdeps/unix/sysv/linux/.
After this removal, the behaviour of the socket functions are
not changed compared to the original glibc release version
and the socket-multiplexer-syscall is always used.
(cherry picked from commit 425c48c217ef93c2c4f81f9f3bb2fdba096877a2)
|
|
|
|
|
|
|
|
|
| |
Some extraneous semicolons were included in a
recent patch which causes a build failure with
newer compilers.
(cherry picked from commit af8ea0f449af7d3847351a4a5bafcd435a22ac31)
(cherry picked from commit a33d347c181cfa0d84c37e9961ebf030495ed248)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Work around a GCC behavior with hardware transactional memory built-ins.
GCC doesn't treat the PowerPC transactional built-ins as compiler
barriers, moving instructions past the transaction boundaries and
altering their atomicity.
(cherry picked from commit 42bf1c897170ff951c7fd0ee9da25f97ff787396)
Conflicts:
sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
(cherry picked from commit 3803874b4a368eb8245fbf091651b6c8edd90b23)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* A stack-based buffer overflow was found in libresolv when invoked from
libnss_dns, allowing specially crafted DNS responses to seize control
of execution flow in the DNS client. The buffer overflow occurs in
the functions send_dg (send datagram) and send_vc (send TCP) for the
NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC
family. The use of AF_UNSPEC triggers the low-level resolver code to
send out two parallel queries for A and AAAA. A mismanagement of the
buffers used for those queries could result in the response of a query
writing beyond the alloca allocated buffer created by
_nss_dns_gethostbyname4_r. Buffer management is simplified to remove
the overflow. Thanks to the Google Security Team and Red Hat for
reporting the security impact of this issue, and Robert Holiday of
Ciena for reporting the related bug 18665. (CVE-2015-7547)
See also:
https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html
https://sourceware.org/ml/libc-alpha/2016-02/msg00418.html
(cherry picked from commit e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca)
(cherry picked from commit b995d95a5943785be3ab862b2d3276f3b4a22481)
|
|
|
|
|
| |
(cherry picked from commit bae7c7c764413b23e61cb099ce33be4c4ee259bb)
(cherry picked from commit 287de30e170cb765ed326d23d22791a81aab6e0f)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi,
As in bugzilla entry there is overflow in hsearch when looking for prime
number as SIZE_MAX - 1 is divisible by 5. We fix that by rejecting large
inputs before looking for prime.
* misc/hsearch_r.c (__hcreate_r): Handle overflow.
(cherry picked from commit 2f5c1750558fe64bac361f52d6827ab1bcfe52bc)
(cherry picked from commit 43f189b0032fbce67fc0c0f4e122e917cd232670)
|
|
|
|
|
|
|
|
| |
* locale/loadlocale.c (_nl_intern_locale_data): Change assertion
on CNT to a conditional jump to 'puntdata'.
(cherry picked from commit 0062ace2292effc4135c15ea99b1931fea5e0203)
(cherry picked from commit 84f80d5ea11fb3b6325c18c31ba0a6a99d5f68bb)
|
|
|
|
|
| |
(cherry picked from commit d36c75fc0d44deec29635dd239b0fbd206ca49b7)
(cherry picked from commit 7a5d3129638db8a832e2c3090d263bbc1b1b919b)
|
|
|
|
|
| |
(cherry picked from commit 0f58539030e436449f79189b6edab17d7479796e)
(cherry picked from commit 0c5f5b233964aa97d1aa470488a1731c022ff615)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit fdb7d390 introduced the fmemopen symbol at the wrong location
in alpha/libc.abilist and hppa/libc.abilist. The file needs to keep
sorted, fix that.
Note: this is for 2.22 only, for master the format has been changed in
commit 8c77b6ad.
* sysdeps/unix/sysv/linux/alpha/libc.abilist [GLIBC_2.22]: Move
to keep the file sorted.
* sysdeps/unix/sysv/linux/hppa/libc.abilist [GLIBC_2.22]: Likewise.
(cherry picked from commit 3b54d911809643fb6a293807333b7f2cf15a3b50)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The skip_lock_out_of_tbegin_retries adaptive parameter was
not being used correctly, nor as described. This prevents
a fallback for all users of the lock if a transient abort
occurs within the accepted number of retries.
[BZ #19174]
* sysdeps/powerpc/nptl/elide.h (__elide_lock): Fix usage of
.skip_lock_out_of_tbegin_retries.
* sysdeps/unix/sysv/linux/powerpc/elision-lock.c
(__lll_lock_elision): Likewise, and respect a value of
try_tbegin <= 0.
(cherry picked from commit 72f1463df85a522bfd1568e47bd81371522ee358)
Conflicts:
NEWS
(cherry picked from commit cd51b1424477652cccdb83e7a95644d198fd4513)
|
|
|
|
|
|
|
| |
* math/Makefile ($(inst_libdir)/libm.so): Corrected path to
libmvec_nonshared.a
(cherry picked from commit 13ff0739fdca293adab02b9f4fe78395de251086)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Old workaround based on assembly aliases can lead to link fail (bug 19058).
This patch makes workaround in another way to avoid it.
[BZ #19058]
* math/Makefile ($(inst_libdir)/libm.so): Added libmvec_nonshared.a
to AS_NEEDED.
* sysdeps/x86/fpu/bits/math-vector.h: Removed code with old workaround.
* sysdeps/x86_64/fpu/Makefile (libmvec-support,
libmvec-static-only-routines): Added new file.
* sysdeps/x86_64/fpu/svml_finite_alias.S: New file.
* NEWS: Mention this fix.
(cherry picked from commit 060f8dbd0ca6eb17d20442dc4df72c2a707bdf86)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
prelink runs ld.so with the environment variable LD_TRACE_PRELINKING
set to dump the relocation type class from _dl_debug_bindings. prelink
has the following relocation type classes:
#define RTYPE_CLASS_VALID 8
#define RTYPE_CLASS_PLT (8|1)
#define RTYPE_CLASS_COPY (8|2)
#define RTYPE_CLASS_TLS (8|4)
where ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA has a conflict with
RTYPE_CLASS_TLS.
Since prelink only uses ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY
bits, we should clear the other bits when the DL_DEBUG_PRELINK bit is
set.
[BZ #19178]
* elf/dl-lookup.c (RTYPE_CLASS_VALID): New.
(RTYPE_CLASS_PLT): Likewise.
(RTYPE_CLASS_COPY): Likewise.
(RTYPE_CLASS_TLS): Likewise.
(_dl_debug_bindings): Use RTYPE_CLASS_TLS and RTYPE_CLASS_VALID
to set relocation type class for DL_DEBUG_PRELINK. Keep only
ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY bits for
DL_DEBUG_PRELINK.
(cherry picked from commit f3d18efb8a720121066dc3401e822043beb98cde)
(cherry picked from commit 387011e0b6f9cbefd26691f0df8ce76bb7ddfa03)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous code used to evaluate the preprocessor token is_lock_free to
a variable before starting a transaction. This behavior can cause an
error if another thread got the lock (without using a transaction)
between the evaluation of the token and the beginning of the transaction.
This bug can be triggered with the following order of events:
1. The lock accessed by is_lock_free is free.
2. Thread T1 evaluates is_lock_free and stores into register R1 that the
lock is free.
3. Thread T2 acquires the same lock used in is_lock_free.
4. T1 begins the transaction, creating a memory barrier where is_lock_free
is false, but R1 is true.
5. T1 reads R1 and doesn't abort the transaction.
6. T1 calls ELIDE_UNLOCK, which reads false from is_lock_free and decides
to unlock a lock acquired by T2, leading to undefined behavior.
This patch delays the evaluation of is_lock_free to inside a transaction
by moving this part of the code to the macro ELIDE_LOCK.
[BZ #18743]
* sysdeps/powerpc/nptl/elide.h (__elide_lock): Move most of this
code to...
(ELIDE_LOCK): ...here.
(__get_new_count): New function with part of the code from
__elide_lock that updates the value of adapt_count after a
transaction abort.
(__elided_trylock): Moved this code to...
(ELIDE_TRYLOCK): ...here.
(cherry picked from commit 6ec52bf634b7650b57ff67b5f5053bce8992d549)
(cherry picked from commit 5b319ce2949cf6fb97862ff81558944f76c704f1)
|
|
|
|
|
| |
(cherry picked from commit f586e1328681b400078c995a0bb6ad301ef73549)
(cherry picked from commit 5fb7924cb6cf606ce865122e5bbac9df934db14e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The optimization introduced in commit
f13c2a8dff2329c6692a80176262ceaaf8a6f74e, causes regressions in
sorting for languages that have digraphs that change sort order, like
cs_CZ which sorts ch between h and i.
My analysis shows the fast-forwarding optimization in STRCOLL advances
through a digraph while possibly stopping in the middle which results
in a subsequent skipping of the digraph and incorrect sorting. The
optimization is incorrect as implemented and because of that I'm
removing it for 2.23, and I will also commit this fix for 2.22 where
it was originally introduced.
This patch reverts the optimization, introduces a new bug-strcoll2.c
regression test that tests both cs_CZ.UTF-8 and da_DK.ISO-8859-1 and
ensures they sort one digraph each correctly. The optimization can't be
applied without regressing this test.
Checked on x86_64, bug-strcoll2.c fails without this patch and passes
after. This will also get a fix on 2.22 which has the same bug.
(cherry picked from commit 87701a58e291bd7ac3b407d10a829dac52c9c16e)
(cherry picked from commit 6c84109cfa26f35c3dfed3acb97d347361bd5849)
|
|
|
|
|
|
|
|
| |
* scripts/test-installation.pl: Don't add -lmvec to build options
if libmvec wasn't built.
* NEWS: Mention this fix.
(cherry picked from commit 9031106ea063f0476bdabf3f5ec22758cdcf987b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Honoring the LD_POINTER_GUARD environment variable in AT_SECURE mode
has security implications. This commit enables pointer guard
unconditionally, and the environment variable is now ignored.
[BZ #18928]
* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove
_dl_pointer_guard member.
* elf/rtld.c (_rtld_global_ro): Remove _dl_pointer_guard
initializer.
(security_init): Always set up pointer guard.
(process_envvars): Do not process LD_POINTER_GUARD.
(cherry picked from commit a014cecd82b71b70a6a843e250e06b541ad524f7)
(cherry picked from commit dc22a1ec157d02529a0b17986679d3f1c122985e)
|
|
|
|
|
| |
(cherry picked from commit 51f24be7ba5d15313ae94f8fb4500ce07cb98c84)
(cherry picked from commit 666bb4dc55f5a93538d020024c34abad641f50ae)
|
|
|
|
|
| |
(cherry picked from commit bd9e69abb887d78d0d6708fc089cc9f3eabf106d)
(cherry picked from commit 5c8c3123652045191474a4ca85fbb6e8d9e7d2bc)
|
|
|
|
|
|
|
| |
[BZ #18870]
* sysdeps/sparc/sparc32/sem_open.c: Add missing #include
(cherry picked from commit 36c6e27a26b0afe0187f8790990cf880abdbf244)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a regression introduced with commit 0d23a5c1 [Static dlopen
correction fallout fixes] that caused the default library search path to
be ignored for modules loaded with dlopen from static executables.
[BZ #17250]
* elf/dl-support.c (_dl_main_map): Don't initialize l_flags_1
member.
(cherry picked from commit 93bad7c97c7047ecaf7664859e2b49c0fe995443)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix for BZ #17273 introduced a single byte of memory corruption when
the line is entirely blank. It would walk back past the start of the
buffer if the heap happened to be 0x20 or 0x09 and then write a NUL byte.
buffer = '\n';
end_ptr = buffer;
while (end_ptr[-1] == ' ' || end_ptr[-1] == '\t')
end_ptr--;
*end_ptr = '\0';
Fix that and rework the tests. Adding the testcase for BZ #17273 to the
existing \040 parser does not really make sense as it's unrelated, and
leads to confusing behavior: it implicitly relies on the new entry being
longer than the previous entry (since it just rewinds the FILE*). Split
it out into its own dedicated testcase instead.
(cherry picked from commit b0e805fa0d6fea33745952df7b7f5442ca4c374f)
(cherry picked from commit 3007f797a1a596e954f44879a5a7267966186ba4)
|
|
|
|
|
|
|
|
|
| |
Do not try to generate the manual when perl is unavailable. This
matches the behavior when makeinfo is unavailable. Otherwise the
install step fails when trying to generate the libm section since
it runs a perl script.
(cherry picked from commit 1695cdae065fa3693e7b18169a100f53444eac69)
|
|
|
|
|
| |
The startup code was not using PIC friendly references leading to TEXTRELs
in every PIE ELF.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://sourceware.org/bugzilla/show_bug.cgi?id=18778
If dlopen fails to load an object that has triggered loading libpthread it
causes ld.so to unload libpthread because its DF_1_NODELETE flags has been
forcefully cleared. The next call to __rtdl_unlock_lock_recursive will crash
since pthread_mutex_unlock no longer exists.
This patch moves l->l_flags_1 &= ~DF_1_NODELETE out of loop through all loaded
libraries and performs the action only on inconsistent one.
[BZ #18778]
* elf/Makefile (tests): Add Add tst-nodelete2.
(modules-names): Add tst-nodelete2mod.
(tst-nodelete2mod.so-no-z-defs): New.
($(objpfx)tst-nodelete2): Likewise.
($(objpfx)tst-nodelete2.out): Likewise.
(LDFLAGS-tst-nodelete2): Likewise.
* elf/dl-close.c (_dl_close_worker): Move DF_1_NODELETE clearing
out of loop through all loaded libraries.
* elf/tst-nodelete2.c: New file.
* elf/tst-nodelete2mod.c: Likewise.
(cherry picked from commit f25238ffe0455013174438376b3ee88df496f9d1)
(cherry picked from commit a34d1c6afc86521d6ad17662a3b5362d8481514c)
|
|
|
|
|
| |
(cherry picked from commit eb32b0d40308166c4d8f6330cc2958cb1e545075)
(cherry picked from commit 561a9f11a974a447acb3dd03550a05df701a900e)
|
|
|
|
|
|
|
|
|
|
|
| |
The attached change fixes the miscompilation of sched_setaffinity() on
hppa. This is an old problem that was fixed on other architectures using
a similar approach to the attached change. See:
https://sourceware.org/ml/libc-hacker/2004-04/msg00016.html
Build tested on trunk. Patch has been applied to debian glibc for some time.
(cherry picked from commit 04ece7d2dec91fe870c5f1a38032875915f44633)
|
|
|
|
|
|
|
|
| |
The semi-recent SYSCALL_CANCEL inclusion broke microblaze due to the
sysdep.h header not including the unix/sysdep.h header. Include it
here like all other ports.
(cherry picked from commit 5d5de49c3ccd69f65b801f1ca490a0112d1cbd7d)
|
|
|
|
|
|
|
|
|
| |
Commit 2a6ad8142d14c998e6c5eb51418aac1f598b621e updated the headers and
the common dl-symaddr.c, but missed that hppa has its own dedicated source
file for this func. Update that too to fix build errors due to missing
exports of the symbol.
(cherry picked from commit be144ba68c918a5d7bc964be06fbeb51a0df84fc)
|
|
|
|
|
|
| |
On arches that set _STACK_GROWS_UP, the stacktop variable is declared
and set, but never actually used. Refactor the code a bit so that the
variable is only declared/set under _STACK_GROWS_DOWN settings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the compiler builds PIEs by default, the configure PIC check is
confused into thinking PIC code is default. The end result is that
we end up with only PIC being produced.
Run the configure check with -fno-PIE so that we produce PIC & non-PIC
(PIE) objects like normal.
2014-09-09 Kevin F. Quinn <kevquinn@gentoo.org>
* configure.ac (libc_cv_pic_default): Pass -fno-PIE.
* configure: Regenerated.
|
| |
|
|
|
|
|
|
| |
Specifically:
../sysdeps/unix/sysv/linux/hppa/bits/atomic.h:68:6: error:
can't find a register in class 'R1_REGS' while reloading 'asm'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the logic in setjmp/__longjmp incorrectly tie to "PIC" to figure out
whether the code is going into a shared library when it should be using
"SHARED". otherwise, building static PIC code goes wrong.
https://bugs.gentoo.org/336914
http://sourceware.org/ml/libc-ports/2011-09/msg00018.html
2011-09-19 David Lamparter <equinox-gentoo@diac24.net>
* sysdeps/arm/setjmp.S: Change PIC to SHARED.
* sysdeps/arm/__longjmp.S: Likewise
|
|
|
|
| |
We've split this out into the package sys-libs/timezone-data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when glibc runs its tests, it does so by invoking the local library loader.
in Gentoo, we build/run inside of our "sandbox" which itself is linked against
libdl (so that it can load libraries and pull out symbols). the trouble
is that when you upgrade from an older glibc to the new one, often times
internal symbols change name or abi. this is normally OK as you cannot use
libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so
we always say "keep all of the glibc libraries from the same build". but
when glibc runs its tests, it uses dynamic paths to point to its new local
copies of libraries. if the test doesnt use libdl, then glibc doesnt add
its path, and when sandbox triggers the loading of libdl, glibc does so
from the host system system. this gets us into the case of all libraries
are from the locally compiled version of glibc except for libdl.so.
http://bugs.gentoo.org/56898
|
|
|
|
|
|
| |
https://bugs.gentoo.org/452184
http://sourceware.org/bugzilla/show_bug.cgi?id=15005
http://sourceware.org/ml/libc-alpha/2013-01/msg00247.html
|
|
|
|
| |
http://bugs.gentoo.org/301642
|
|
|
|
|
|
|
|
|
| |
if /etc/resolv.conf is updated, then make sure applications
already running get the updated information.
ripped from SuSE
http://bugs.gentoo.org/177416
|
|
|
|
|
| |
http://bugs.debian.org/198099
http://bugs.debian.org/231438
|
|
|
|
|
|
|
|
|
|
| |
work around ... not entirely sure what is going on here.
2011-03-01 squeezy <vina@mailserver.eu>
* sysdeps/unix/sysv/linux/x86_64/sigaction.c fix the __restore_rt symbol
http://bugs.gentoo.org/283470
|
|
|
|
|
|
|
|
|
|
| |
do not bother running ldconfig on DESTDIR. it wants to write the temp cache
file outside of the chroot. doesnt matter anyways as we wont use the cache
results (portage will rebuild cache), so running ldconfig is simply a waste
of time.
http://sourceware.org/ml/libc-alpha/2012-08/msg00118.html
https://bugs.gentoo.org/431038
|
| |
|
|
|
|
|
| |
Using a ({ }) structure avoids the "value computed is not used"
that a simple () structure causes.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<regexp.h> (not to be confused with <regex.h>) is an obsolete and
frankly horrible regular expression-matching API. It was part of SVID
but was withdrawn in Issue 5 (for reference, we're on Issue 7 now).
It doesn't do anything you can't do with <regex.h>, and using it
involves defining a bunch of macros before including the header.
Moreover, the code in regexp.h that uses those macros has been buggy
since its creation (in 1996) and no one has noticed, which indicates
to me that there are no users. (Specifically, RETURN() is used in a
whole bunch of cases where it should have been ERROR().)
The header is given a warning and marked deprecated for 2.22.
See:
https://sourceware.org/ml/libc-alpha/2015-07/msg00862.html and
https://sourceware.org/ml/libc-alpha/2015-07/msg00871.html.
|