]> git.ipfire.org Git - thirdparty/glibc.git/log
thirdparty/glibc.git
11 years agoalpha: Fix tls-macros.h gentoo/2.18
Richard Henderson [Fri, 24 Jan 2014 17:07:04 +0000 (09:07 -0800)] 
alpha: Fix tls-macros.h

Reported to the gcc bugzilla, there was a missing dependency on $gp
that let the compiler generated $gp reload be scheduled across the
macros here.

(cherry picked from commit 4ab6acaebd0047dc37c6493946484be9f1b4920b)

11 years agoARM: Fix clone build for ARMv4
Will Newton [Thu, 23 Jan 2014 11:11:24 +0000 (11:11 +0000)] 
ARM: Fix clone build for ARMv4

ARMv4 does not have the blx instruction, so use the BLX macro which
handles abstracting this for us.

Build tested for armv7, armv4t and armv4.

ports/ChangeLog.arm:

2014-01-24  Will Newton  <will.newton@linaro.org>

[BZ #16499]
* sysdeps/unix/sysv/linux/arm/clone.S: Use BLX macro instead
of blx instruction directly.

(cherry picked from commit 47590bce28616abbcee93457da91d65a7a07589b)

11 years agoFix sparc 64-bit GMP ifunc resolution in static builds.
David S. Miller [Tue, 12 Nov 2013 20:48:01 +0000 (12:48 -0800)] 
Fix sparc 64-bit GMP ifunc resolution in static builds.

[BZ #16150]
* sysdeps/sparc/sparc64/multiarch/add_n.S: Resolve to the correct generic
symbol in the non-vis3 case in static builds.
* sysdeps/sparc/sparc64/multiarch/addmul_1.S: Likewise.
* sysdeps/sparc/sparc64/multiarch/mul_1.S: Likewise.
* sysdeps/sparc/sparc64/multiarch/sub_n.S: Likewise.
* sysdeps/sparc/sparc64/multiarch/submul_1.S: Likewise.

(cherry picked from commit 2293d2b10a583486cd22ce578796848f4c3a8b6d)

11 years agoFix build on pre-v9 32-bit Sparc.
David S. Miller [Wed, 6 Nov 2013 21:01:36 +0000 (13:01 -0800)] 
Fix build on pre-v9 32-bit Sparc.

We cannot use fnegd in this code, as fnegd was added in v9.
Only fnegs exists in v8 and earlier.

[BZ #15985]
* sysdeps/sparc/sparc32/fpu/s_fdim.S (__fdim): Do not use fnegd
on pre-v9 cpus, use a fnegs+fmovs sequence instead.

(cherry picked from commit 2216e48645dbd297cdc0f4050fdfc0b52e2a4ab8)

11 years agoPowerPC: Fix POINTER_CHK_GUARD thread register for PPC64
Adhemerval Zanella [Wed, 25 Sep 2013 18:43:04 +0000 (13:43 -0500)] 
PowerPC: Fix POINTER_CHK_GUARD thread register for PPC64

(cherry picked from commit dc3a1f98dc4c86cb454474f4912ae325573655cb)

11 years agomalloc: Check for integer overflow in memalign.
Will Newton [Fri, 16 Aug 2013 11:54:29 +0000 (12:54 +0100)] 
malloc: Check for integer overflow in memalign.

A large bytes parameter to memalign could cause an integer overflow
and corrupt allocator internals. Check the overflow does not occur
before continuing with the allocation.

ChangeLog:

2013-09-11  Will Newton  <will.newton@linaro.org>

[BZ #15857]
* malloc/malloc.c (__libc_memalign): Check the value of bytes
does not overflow.

(cherry picked from commit c51d675c459aefef8d84d5a0b114010f916ea278)

11 years agomalloc: Check for integer overflow in valloc.
Will Newton [Fri, 16 Aug 2013 10:59:37 +0000 (11:59 +0100)] 
malloc: Check for integer overflow in valloc.

A large bytes parameter to valloc could cause an integer overflow
and corrupt allocator internals. Check the overflow does not occur
before continuing with the allocation.

ChangeLog:

2013-09-11  Will Newton  <will.newton@linaro.org>

[BZ #15856]
* malloc/malloc.c (__libc_valloc): Check the value of bytes
does not overflow.

(cherry picked from commit 6a6a386a3040726053a5fb8582ff26dc85d84741)

11 years agomalloc: Check for integer overflow in pvalloc.
Will Newton [Mon, 12 Aug 2013 14:08:02 +0000 (15:08 +0100)] 
malloc: Check for integer overflow in pvalloc.

A large bytes parameter to pvalloc could cause an integer overflow
and corrupt allocator internals. Check the overflow does not occur
before continuing with the allocation.

ChangeLog:

2013-09-11  Will Newton  <will.newton@linaro.org>

[BZ #15855]
* malloc/malloc.c (__libc_pvalloc): Check the value of bytes
does not overflow.

(cherry picked from commit 7e0e64ead52591b968df582b0ddc247ba5c4eab4)

11 years agoBZ #15754: CVE-2013-4788
Carlos O'Donell [Mon, 23 Sep 2013 04:52:09 +0000 (00:52 -0400)] 
BZ #15754: CVE-2013-4788

The pointer guard used for pointer mangling was not initialized for
static applications resulting in the security feature being disabled.
The pointer guard is now correctly initialized to a random value for
static applications. Existing static applications need to be
recompiled to take advantage of the fix.

The test tst-ptrguard1-static and tst-ptrguard1 add regression
coverage to ensure the pointer guards are sufficiently random
and initialized to a default value.

(cherry picked from commit c779e9df75256f19c7be8d12b2d163e2016a63f4)

11 years agoFix stack overflow due to large AF_INET6 requests
Siddhesh Poyarekar [Fri, 25 Oct 2013 04:52:12 +0000 (10:22 +0530)] 
Fix stack overflow due to large AF_INET6 requests

Resolves #16072 (CVE-2013-4458).

This patch fixes another stack overflow in getaddrinfo when it is
called with AF_INET6.  The AF_UNSPEC case was fixed as CVE-2013-1914,
but the AF_INET6 case went undetected back then.

(cherry picked from commit 6f95434fd488e9b72117f9b93ec2e2dbf397a4d3)

11 years agoFix memory leak in stdlib/isomac.c
Allan McRae [Mon, 9 Sep 2013 12:52:58 +0000 (22:52 +1000)] 
Fix memory leak in stdlib/isomac.c

(cherry picked from commit 3f71830d35d7bf4ac11664f0c48c3c68d250618b)

11 years agoFix memory leaks in libio on allocation failure
Allan McRae [Mon, 9 Sep 2013 12:50:41 +0000 (22:50 +1000)] 
Fix memory leaks in libio on allocation failure

(cherry picked from commit 8e395175c4786ad9679851e3ed3c0c54a6f4e1f0)

11 years agoPowerPC: fix POWER7 memrchr for some large inputs
Adhemerval Zanella [Thu, 5 Sep 2013 14:32:56 +0000 (09:32 -0500)] 
PowerPC: fix POWER7 memrchr for some large inputs

(cherry picked from commit b51679672648410c6627a4bd169e076c5b36f47b)

Conflicts:
ChangeLog

11 years ago* elf/setup-vdso.h (setup_vdso): Fix missing string termination.
Andreas Arnez [Thu, 31 Oct 2013 14:57:33 +0000 (09:57 -0500)] 
* elf/setup-vdso.h (setup_vdso): Fix missing string termination.

backport of f315524e034cfc644157cb4af5ecc99f645dd067

(cherry picked from commit f8a004f1fa412e3aae77faa30b4dfb654d721510)

11 years agoCVE-2013-4237, BZ #14699: Buffer overflow in readdir_r
Florian Weimer [Thu, 31 Oct 2013 14:55:52 +0000 (09:55 -0500)] 
CVE-2013-4237, BZ #14699: Buffer overflow in readdir_r

* sysdeps/posix/dirstream.h (struct __dirstream): Add errcode
member.
* sysdeps/posix/opendir.c (__alloc_dir): Initialize errcode
member.
* sysdeps/posix/rewinddir.c (rewinddir): Reset errcode member.
* sysdeps/posix/readdir_r.c (__READDIR_R): Enforce NAME_MAX limit.
Return delayed error code.  Remove GETDENTS_64BIT_ALIGNED
conditional.
* sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c: Do not define
GETDENTS_64BIT_ALIGNED.
* sysdeps/unix/sysv/linux/i386/readdir64_r.c: Likewise.
* manual/filesys.texi (Reading/Closing Directory): Document
ENAMETOOLONG return value of readdir_r.  Recommend readdir more
strongly.
* manual/conf.texi (Limits for Files): Add portability note to
NAME_MAX, PATH_MAX.
(Pathconf): Add portability note for _PC_NAME_MAX, _PC_PATH_MAX.

backport of 91ce40854d0b7f865cf5024ef95a8026b76096f3

(cherry picked from commit f166b9c6e90d631115c59b4357357bc168d8e51a)

11 years agoFix PI mutex check in pthread_cond_broadcast and pthread_cond_signal
Siddhesh Poyarekar [Thu, 3 Oct 2013 02:56:21 +0000 (08:26 +0530)] 
Fix PI mutex check in pthread_cond_broadcast and pthread_cond_signal

Fixes BZ #15996.

The check had a typo - it checked for PTHREAD_MUTEX_ROBUST_NP instead
of PTHREAD_MUTEX_ROBUST_NORMAL_NP.  It has now been replaced by the
already existing convenience macro USE_REQUEUE_PI.

(cherry picked from commit 2770d15e7e880821fc586619c59eb45180628e16)

11 years agoARM: Fix clone code when built for Thumb.
Will Newton [Thu, 29 Aug 2013 19:10:26 +0000 (20:10 +0100)] 
ARM: Fix clone code when built for Thumb.

The mov lr, pc instruction will lose the Thumb bit from the return address
so use blx lr instead.

ports/ChangeLog.arm:

2013-08-30  Will Newton  <will.newton@linaro.org>

[BZ #15909]
* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx
instead of mov lr, pc.

(cherry picked from commit 6b06ac56cdfc9293908724e51e827534e97819aa)
(cherry picked from commit 4f2bcda964d4fff56855e0c66198c9bcb682ea1e)

11 years agoia64: add __ prefix to pt_all_user_regs/ia64_fpreg [BZ #762]
Mike Frysinger [Sun, 5 Jan 2014 21:23:42 +0000 (16:23 -0500)] 
ia64: add __ prefix to pt_all_user_regs/ia64_fpreg [BZ #762]

This addresses a long standing collision between userspace headers and
kernel headers only on ia64 systems.  All other types have a __ prefix
in the ptrace headers except these two.  Let's finally namespace these.

Verified that at least strace still builds after this change, as well
as after deleting all the struct hacks it has specifically for ia64.

URL: https://sourceware.org/bugzilla/show_bug.cgi?id=762
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agoptrace.h: add __ prefix to ptrace_peeksiginfo_args
Mike Frysinger [Sun, 5 Jan 2014 21:07:13 +0000 (16:07 -0500)] 
ptrace.h: add __ prefix to ptrace_peeksiginfo_args

All the other ptrace structures in this file have a __ prefix except this
new one.  This in turn causes build problems for most packages that try to
use ptrace such as strace:

gcc -DHAVE_CONFIG_H -I. -I../..  -I../../linux/x86_64 -I../../linux \
-I./linux  -Wall -Wwrite-strings -g -O2 -MT process.o -MD -MP \
-MF .deps/process.Tpo -c -o process.o ../../process.c
In file included from ../../process.c:63:0:
/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
 struct ptrace_peeksiginfo_args {
        ^
In file included from ../../defs.h:159:0,
                 from ../../process.c:37:
/usr/include/sys/ptrace.h:191:8: note: originally defined here
 struct ptrace_peeksiginfo_args
        ^

Since this struct was introduced in glibc-2.18, there shouldn't be any
real regressions with adding the __ prefix.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agoDon't use broken DL_AUTO_FUNCTION_ADDRESS()
Guy Martin [Thu, 21 Nov 2013 18:23:16 +0000 (13:23 -0500)] 
Don't use broken DL_AUTO_FUNCTION_ADDRESS()

On hppa and ia64, the macro DL_AUTO_FUNCTION_ADDRESS() uses the
variable fptr[2] in it's own scope.

The content of fptr[] is thus undefined right after the macro exits.
Newer gcc's (>= 4.7) reuse the stack space of this variable triggering
a segmentation fault in dl-init.c:69.

To fix this we rewrite the macros to make the call directly to init
and fini without needing to pass back a constructed function pointer.

URL: https://bugs.gentoo.org/486618
URL: https://bugs.gentoo.org/486974

(cherry picked from commit daf75146de07303ea0c5ad700ec5ef703ec114a1)

11 years agoAccept make versions 4.0 and greater
Marc-Antoine Perennou [Thu, 31 Oct 2013 02:37:50 +0000 (12:37 +1000)] 
Accept make versions 4.0 and greater

URL: https://bugs.gentoo.org/487906

(cherry picked from commit 28d708c44bc47b56f6551ff285f78edcf61c208a)

11 years agohppa: add fanotify_mark
Mike Frysinger [Tue, 3 Sep 2013 03:13:57 +0000 (23:13 -0400)] 
hppa: add fanotify_mark

Another example of all the 64bit arches getting the definition via a
common file, but the 32bit ones all adding it by themselves and hppa
was missed.

I'm not entirely sure about the usage of GLIBC_2.19 symbols here.
We'd like to backport this so people can use it, but it means we'd
be releasing a glibc-2.17/glibc-2.18 with a GLIBC_2.19 symbol in it.
But maybe it won't be a big deal since you'd only get that 2.19 ref
if you actually used the symbol ?

There hasn't been a glibc release where hppa worked w/out a bunch of
patches, so in reality there's only two distros that matter -- Gentoo
and Debian.

URL: https://bugs.gentoo.org/480268
Reported-by: Jeroen Roovers <jer@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
(cherry picked from commit 18d4371683fbe347bf4fbaef05d18b5a4918887a)

11 years agoalpha: Fix signal thunk unwind info
Richard Henderson [Fri, 15 Nov 2013 20:34:39 +0000 (06:34 +1000)] 
alpha: Fix signal thunk unwind info

2013-11-16  Richard Henderson  <rth@redhat.com>

* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Include a nop
before each signal thunk.

URL: https://bugs.gentoo.org/480740
URL: https://sourceware.org/ml/libc-ports/2013-11/msg00000.html

(cherry picked from commit 027e32bd42314e17095ba39df82ef293f4a72c09)

11 years agomips: add clock_{g,s}ettime symbol compat hacks
Mike Frysinger [Fri, 16 Aug 2013 19:10:41 +0000 (15:10 -0400)] 
mips: add clock_{g,s}ettime symbol compat hacks

we kind of screwed ourselves into a corner by having the clock symbols
exported only with the glibc-2.0 version ... this patch fixes the
export so all new binaries built against librt will use the correct
glibc-2.2 symbol version

11 years agoarm: fix PIC vs SHARED typos
David Lamparter [Fri, 16 Aug 2013 19:06:34 +0000 (15:06 -0400)] 
arm: fix PIC vs SHARED typos

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/eabi/setjmp.S: Change PIC to SHARED.
* sysdeps/arm/eabi/__longjmp.S: Likewise

11 years agogentoo: disable building in timezone subdir
Mike Frysinger [Fri, 16 Aug 2013 19:05:26 +0000 (15:05 -0400)] 
gentoo: disable building in timezone subdir

We've split this out into the package sys-libs/timezone-data

11 years agogentoo: support running tests under sandbox
Stephanie J. Lockwood-Childs [Fri, 16 Aug 2013 19:03:41 +0000 (15:03 -0400)] 
gentoo: support running tests under sandbox

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

11 years agonptl: handle EAGAIN with some futex operations
Carlos O'Donell [Fri, 16 Aug 2013 19:00:53 +0000 (15:00 -0400)] 
nptl: handle EAGAIN with some futex operations

https://bugs.gentoo.org/452184

11 years agortld: do not ignore arch-specific CFLAGS
Guy Martin [Fri, 16 Aug 2013 19:00:05 +0000 (15:00 -0400)] 
rtld: do not ignore arch-specific CFLAGS

https://bugs.gentoo.org/452184
http://sourceware.org/bugzilla/show_bug.cgi?id=15005
http://sourceware.org/ml/libc-alpha/2013-01/msg00247.html

11 years agonptl: support thread stacks that grow up
Carlos O'Donell [Fri, 16 Aug 2013 18:57:59 +0000 (14:57 -0400)] 
nptl: support thread stacks that grow up

http://bugs.gentoo.org/301642

11 years agoreload /etc/resolv.conf when it has changed
Thorsten Kukuk [Fri, 16 Aug 2013 18:54:23 +0000 (14:54 -0400)] 
reload /etc/resolv.conf when it has changed

if /etc/resolv.conf is updated, then make sure applications
already running get the updated information.

ripped from SuSE

http://bugs.gentoo.org/177416

11 years agoFix localedef segfault when run under exec-shield, PaX or similar
Jakub Jelinek [Fri, 16 Aug 2013 18:52:25 +0000 (14:52 -0400)] 
Fix localedef segfault when run under exec-shield, PaX or similar

http://bugs.debian.org/198099
http://bugs.debian.org/231438

11 years agomake fortify logic checks less angry
Mike Frysinger [Sat, 4 May 2013 18:12:58 +0000 (14:12 -0400)] 
make fortify logic checks less angry

the fortify/optimization check does not play well with our default gcc specs

http://sourceware.org/ml/libc-alpha/2012-06/msg00068.html

11 years agoworkaround crash when handling signals in static PIEs
Mike Frysinger [Sat, 4 May 2013 18:10:41 +0000 (14:10 -0400)] 
workaround crash when handling signals in static PIEs

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

11 years agodisable ldconfig during install
Mike Frysinger [Sat, 4 May 2013 18:07:11 +0000 (14:07 -0400)] 
disable ldconfig during install

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

11 years agoUpdate version.h and include/features.h for 2.18 release. glibc-2.18
David S. Miller [Sat, 10 Aug 2013 22:52:55 +0000 (15:52 -0700)] 
Update version.h and include/features.h for 2.18 release.

12 years agoFix typo in ChangeLog
Andreas Schwab [Tue, 6 Aug 2013 09:13:03 +0000 (11:13 +0200)] 
Fix typo in ChangeLog

12 years agoUpdate Korean translations.
David S. Miller [Sat, 3 Aug 2013 17:35:26 +0000 (10:35 -0700)] 
Update Korean translations.

* po/ko.po: Update Korean translation from translation project.

12 years agoUpdate manual/contrib.texi
David S. Miller [Fri, 2 Aug 2013 00:27:04 +0000 (17:27 -0700)] 
Update manual/contrib.texi

* manual/contrib.texi: Update entry for Siddhesh Poyarekar.  Add
entries for Will Newton, Andi Kleen, David Holsgrove, and Ondrej
Bilka.

12 years agoUpdate French translations.
David S. Miller [Tue, 30 Jul 2013 18:27:46 +0000 (11:27 -0700)] 
Update French translations.

* po/fr.po: Update French translation from translation project.

12 years agoUpdate Czech translations.
David S. Miller [Sun, 28 Jul 2013 20:01:03 +0000 (13:01 -0700)] 
Update Czech translations.

* po/cs.po: Update Czech translation from translation project.

12 years agoUpdate Swedish translations.
David S. Miller [Sun, 28 Jul 2013 18:11:13 +0000 (11:11 -0700)] 
Update Swedish translations.

* po/sv.po: Update Swedish translation from translation project.

12 years agoUpdate Esperanto translations.
David S. Miller [Sun, 28 Jul 2013 00:49:14 +0000 (17:49 -0700)] 
Update Esperanto translations.

* po/eo.po: Update Esperanto translation from translation project.

12 years agoUpdate Vietnamese translations.
David S. Miller [Sat, 27 Jul 2013 08:49:29 +0000 (01:49 -0700)] 
Update Vietnamese translations.

* po/vi.po: Update Vietnamese translation from translation project.

12 years agoUpdate German translations.
David S. Miller [Sat, 27 Jul 2013 07:56:58 +0000 (00:56 -0700)] 
Update German translations.

* po/de.po: Update German translation from translation project.

12 years agoUpdate Bulgarian translations.
David S. Miller [Fri, 26 Jul 2013 22:58:17 +0000 (15:58 -0700)] 
Update Bulgarian translations.

* po/bg.po: Update Bulgarian translation from translation project.

12 years agoUpdate Dutch, Polish, and Russian translations.
David S. Miller [Fri, 26 Jul 2013 20:21:03 +0000 (13:21 -0700)] 
Update Dutch, Polish, and Russian translations.

* po/nl.po: Update Dutch translation from translation project.
* po/pl.po: Update Polish translation from translation project.
* po/ru.po: Update Russian translation from translation project.

12 years ago[AArch64] Provide symbol version for _mcount.
Marcus Shawcroft [Fri, 26 Jul 2013 07:29:17 +0000 (08:29 +0100)] 
[AArch64] Provide symbol version for _mcount.

12 years agoUpdate libc.pot in preparation for giving tarball to translation project.
David S. Miller [Thu, 25 Jul 2013 06:31:57 +0000 (23:31 -0700)] 
Update libc.pot in preparation for giving tarball to translation project.

* po/libc.pot: Update.

12 years agoAdded NEWS entries for AT_HWCAP2 and POWER8 enablement.
Ryan S. Arnold [Thu, 25 Jul 2013 15:49:13 +0000 (10:49 -0500)] 
Added NEWS entries for AT_HWCAP2 and POWER8 enablement.

12 years agohppa: Regenerate libm-test-ulps.
Carlos O'Donell [Wed, 24 Jul 2013 03:49:00 +0000 (23:49 -0400)] 
hppa: Regenerate libm-test-ulps.

12 years agoRemove Linux kernel version ambiguity in comment added by previous commit.
David S. Miller [Tue, 23 Jul 2013 18:31:39 +0000 (11:31 -0700)] 
Remove Linux kernel version ambiguity in comment added by previous commit.

* tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.

12 years agoPowerPC: use _dl_static_init to set GLRO(gl_pagesize)
Adhemerval Zanella [Tue, 23 Jul 2013 12:39:57 +0000 (07:39 -0500)] 
PowerPC: use _dl_static_init to set GLRO(gl_pagesize)

This patch fixes dlfcn/tststatic5 for PowerPC where pagesize
variable was not properly initialized in certain cases. This patch
is based on other architecture code.

12 years agoIncrease nptl test case buffer size so we really block on current Linux kernels.
David S. Miller [Tue, 23 Jul 2013 09:31:37 +0000 (02:31 -0700)] 
Increase nptl test case buffer size so we really block on current Linux kernels.

* tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.

12 years agotile BZ #15759: Fix bug in _dl_unmap
Chris Metcalf [Mon, 22 Jul 2013 15:46:44 +0000 (11:46 -0400)] 
tile BZ #15759: Fix bug in _dl_unmap

We returned without calling __munmap if not in the simulator.
Now we call a separate sim_dlclose() function to make the
control flow work correctly.

12 years agoS/390: ULPs update.
Andreas Krebbel [Mon, 22 Jul 2013 07:51:52 +0000 (09:51 +0200)] 
S/390: ULPs update.

12 years agoCVE-2013-2207, BZ #15755: Disable pt_chown.
Carlos O'Donell [Fri, 19 Jul 2013 06:42:03 +0000 (02:42 -0400)] 
CVE-2013-2207, BZ #15755: Disable pt_chown.

The helper binary pt_chown tricked into granting access to another
user's pseudo-terminal.

Pre-conditions for the attack:

 * Attacker with local user account
 * Kernel with FUSE support
 * "user_allow_other" in /etc/fuse.conf
 * Victim with allocated slave in /dev/pts

Using the setuid installed pt_chown and a weak check on whether a file
descriptor is a tty, an attacker could fake a pty check using FUSE and
trick pt_chown to grant ownership of a pty descriptor that the current
user does not own.  It cannot access /dev/pts/ptmx however.

In most modern distributions pt_chown is not needed because devpts
is enabled by default. The fix for this CVE is to disable building
and using pt_chown by default. We still provide a configure option
to enable hte use of pt_chown but distributions do so at their own
risk.

12 years agoUpdate Sparc ULPs.
David S. Miller [Sat, 20 Jul 2013 23:46:24 +0000 (16:46 -0700)] 
Update Sparc ULPs.

* sysdeps/sparc/fpu/libm-test-ulps: Update ULPs to handle minor
difference between 32-bit and 64-bit.

12 years agom68k: use _dl_static_init to set GLR0(dl_pagesize)
Andreas Schwab [Sat, 20 Jul 2013 20:37:42 +0000 (22:37 +0200)] 
m68k: use _dl_static_init to set GLR0(dl_pagesize)

12 years agotile: add missing semicolon in <bits/ptrace.h>
Chris Metcalf [Fri, 19 Jul 2013 17:06:30 +0000 (13:06 -0400)] 
tile: add missing semicolon in <bits/ptrace.h>

Change 521c6785e1fc94d added the enum but missed the semicolon.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoClean up whitespace in lock elision patches.
Dominik Vogt [Fri, 19 Jul 2013 05:16:28 +0000 (05:16 +0000)] 
Clean up whitespace in lock elision patches.

Signed-off-by: Carlos O'Donell <carlos@redhat.com>
12 years agoRemove remains of rwlock elision which is not implemented yet.
Dominik Vogt [Fri, 19 Jul 2013 05:02:44 +0000 (05:02 +0000)] 
Remove remains of rwlock elision which is not implemented yet.

Signed-off-by: Carlos O'Donell <carlos@redhat.com>
---

nptl/
2013-07-19  Dominik Vogt  <vogt@de.ibm.com>

* sysdeps/unix/sysv/linux/x86/elision-conf.c:
Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
(elision_init): Don't set __rwlock_rtm_enabled.
* sysdeps/unix/sysv/linux/x86/elision-conf.h:
Remove __rwlock_rtm_enabled.

12 years agoBZ #15711: Avoid circular dependency for syscall.h
Carlos O'Donell [Tue, 16 Jul 2013 21:55:43 +0000 (17:55 -0400)] 
BZ #15711: Avoid circular dependency for syscall.h

The generated header is compiled with `-ffreestanding' to avoid any
circular dependencies against the installed implementation headers.
Such a dependency would require the implementation header to be
installed before the generated header could be built (See bug 15711).
In current practice the generated header dependencies do not include
any of the implementation headers removed by the use of `-ffreestanding'.

---

2013-07-15  Carlos O'Donell  <carlos@redhat.com>

[BZ #15711]
* sysdeps/unix/sysv/linux/Makefile ($(objpfx)bits/syscall%h):
Avoid system header dependency with -ffreestanding.
($(objpfx)bits/syscall%d): Likewise.

12 years agoAnnotate more cases of math bug 15319.
David S. Miller [Sat, 13 Jul 2013 23:57:05 +0000 (16:57 -0700)] 
Annotate more cases of math bug 15319.

* math/libm-test.inc (casin_test_data): Annotate more cases of missing
underflows from atanl/atan2l due to bug 15319.
(casinh_test_data): Likewise.

12 years ago[AArch64] Adding -funwind-tables to backtrace.c
Marcus Shawcroft [Fri, 5 Jul 2013 16:12:46 +0000 (17:12 +0100)] 
[AArch64] Adding -funwind-tables to backtrace.c

12 years ago[AArch64] Use _dl_static_init to set GLR0(dl_pagesize)
Marcus Shawcroft [Fri, 5 Jul 2013 16:13:35 +0000 (17:13 +0100)] 
[AArch64] Use _dl_static_init to set GLR0(dl_pagesize)

12 years agoFull from-scratch rebuild of sparc ULPs.
David S. Miller [Mon, 8 Jul 2013 05:15:36 +0000 (22:15 -0700)] 
Full from-scratch rebuild of sparc ULPs.

* sysdeps/sparc/fpu/libm-test-ulps: Regenerate from scratch.

12 years agotile: use _dl_static_init to set GLRO(gl_pagesize)
Chris Metcalf [Wed, 3 Jul 2013 18:48:39 +0000 (14:48 -0400)] 
tile: use _dl_static_init to set GLRO(gl_pagesize)

A recently-added test (dlfcn/tststatic5) pointed out that tile was not
properly initializing the variable pagesize in certain cases.  This
change just copies the existing code from MIPS.

12 years agotile: update libm-test-ulps from scratch
Chris Metcalf [Wed, 3 Jul 2013 17:58:34 +0000 (13:58 -0400)] 
tile: update libm-test-ulps from scratch

12 years agotile: use soft-fp for fma() and fmaf()
Chris Metcalf [Wed, 3 Jul 2013 15:23:01 +0000 (11:23 -0400)] 
tile: use soft-fp for fma() and fmaf()

The sfp-machine.h is based on the gcc version, but extended with
required new macros by comparison with other architectures and by
investigating the hardware support for FP on tile.

12 years agoUpdate x86 and x86_64 ulps on AMD FX-8350 with GCC 4.8.1.
Jeroen Albers [Fri, 5 Jul 2013 12:58:20 +0000 (12:58 +0000)] 
Update x86 and x86_64 ulps on AMD FX-8350 with GCC 4.8.1.

12 years ago[AArch64] Regenerate libm-test-ulps
Marcus Shawcroft [Fri, 5 Jul 2013 08:30:52 +0000 (09:30 +0100)] 
[AArch64] Regenerate libm-test-ulps

12 years agoFix lock elision help text in INSTALL and configure
Siddhesh Poyarekar [Thu, 4 Jul 2013 15:03:03 +0000 (20:33 +0530)] 
Fix lock elision help text in INSTALL and configure

12 years agoUpdate powerpc-fpu ULPs.
Adhemerval Zanella [Thu, 4 Jul 2013 12:14:44 +0000 (07:14 -0500)] 
Update powerpc-fpu ULPs.

12 years agoSync sys/ptrace with Linux 3.10
Andreas Jaeger [Thu, 4 Jul 2013 07:45:12 +0000 (09:45 +0200)] 
Sync sys/ptrace with Linux 3.10

12 years agoCondition sysdeps/arm/include/bits/setjmp.h contents on _ISOMAC.
Joseph Myers [Wed, 3 Jul 2013 21:59:58 +0000 (21:59 +0000)] 
Condition sysdeps/arm/include/bits/setjmp.h contents on _ISOMAC.

12 years agoRegenerate powerpc-nofpu ULPs.
Joseph Myers [Wed, 3 Jul 2013 16:32:52 +0000 (16:32 +0000)] 
Regenerate powerpc-nofpu ULPs.

12 years agoAdd x86 init-arch to nptl
H.J. Lu [Wed, 3 Jul 2013 16:22:31 +0000 (09:22 -0700)] 
Add x86 init-arch to nptl

12 years agoUpdate i386 ULPs.
Allan McRae [Wed, 3 Jul 2013 02:44:59 +0000 (12:44 +1000)] 
Update i386 ULPs.

* sysdeps/i386/fpu/libm-test-ulps: Update.

12 years agoUpdate sparc ULPs.
David S. Miller [Tue, 2 Jul 2013 23:41:17 +0000 (16:41 -0700)] 
Update sparc ULPs.

* sysdeps/sparc/fpu/libm-test-ulps: Update.

12 years agom68k: update libm test ULPs
Andreas Schwab [Tue, 2 Jul 2013 22:50:13 +0000 (00:50 +0200)] 
m68k: update libm test ULPs

12 years agoUpdate x86_64 ULPs.
Markus Trippelsdorf [Tue, 2 Jul 2013 22:01:13 +0000 (22:01 +0000)] 
Update x86_64 ULPs.

12 years agoRegenerate MIPS ulps.
Joseph Myers [Tue, 2 Jul 2013 21:53:23 +0000 (21:53 +0000)] 
Regenerate MIPS ulps.

12 years agoRegenerate ARM ulps.
Joseph Myers [Tue, 2 Jul 2013 20:34:19 +0000 (20:34 +0000)] 
Regenerate ARM ulps.

12 years agoRegenerate x86 and x86_64 ulps.
Joseph Myers [Tue, 2 Jul 2013 20:00:48 +0000 (20:00 +0000)] 
Regenerate x86 and x86_64 ulps.

12 years agoMake soft-float ARM use soft-fp fma/fmaf.
Joseph Myers [Tue, 2 Jul 2013 19:51:19 +0000 (19:51 +0000)] 
Make soft-float ARM use soft-fp fma/fmaf.

12 years agoalpha: Update libm-test-ulps from scratch
Richard Henderson [Tue, 2 Jul 2013 16:59:50 +0000 (09:59 -0700)] 
alpha: Update libm-test-ulps from scratch

12 years agoAdd lock elision to NEWS file
Andi Kleen [Tue, 2 Jul 2013 15:49:30 +0000 (08:49 -0700)] 
Add lock elision to NEWS file

12 years agoAdd a configure option to enable lock elision and disable by default
Andi Kleen [Fri, 17 May 2013 02:17:14 +0000 (19:17 -0700)] 
Add a configure option to enable lock elision and disable by default

Can be enabled with --enable-lock-elision=yes at configure time.

12 years agoDisable elision for any pthread_mutexattr_settype call
Andi Kleen [Thu, 27 Jun 2013 18:15:06 +0000 (11:15 -0700)] 
Disable elision for any pthread_mutexattr_settype call

PTHREAD_MUTEX_NORMAL requires deadlock for nesting, DEFAULT
does not. Since glibc uses the same value (0) disable elision
for any call to pthread_mutexattr_settype() with a 0 value.
This implies that a program can disable elision by doing
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL)

Based on a original proposal by Rich Felker.

12 years agoAdd elision to pthread_mutex_{try,timed,un}lock
Andi Kleen [Sat, 22 Dec 2012 09:03:04 +0000 (01:03 -0800)] 
Add elision to pthread_mutex_{try,timed,un}lock

Add elision paths to the basic mutex locks.

The normal path has a check for RTM and upgrades the lock
to RTM when available. Trylocks cannot automatically upgrade,
so they check for elision every time.

We use a 4 byte value in the mutex to store the lock
elision adaptation state. This is separate from the adaptive
spin state and uses a separate field.

Condition variables currently do not support elision.

Recursive mutexes and condition variables may be supported at some point,
but are not in the current implementation. Also "trylock" will
not automatically enable elision unless some other lock call
has been already called on the lock.

This version does not use IFUNC, so it means every lock has one
additional check for elision. Benchmarking showed the overhead
to be negligible.

12 years agoAdd minimal test suite changes for elision enabled kernels
Andi Kleen [Fri, 28 Jun 2013 12:19:37 +0000 (05:19 -0700)] 
Add minimal test suite changes for elision enabled kernels

tst-mutex5 and 8 test some behaviour not required by POSIX,
that elision changes. This changes these tests to not check
this when elision is enabled at configure time.

12 years agoAdd new internal mutex type flags for elision.
Andi Kleen [Sat, 22 Dec 2012 08:58:34 +0000 (00:58 -0800)] 
Add new internal mutex type flags for elision.

Add Enable/disable flags used internally

Extend the mutex initializers to have the fields needed for
elision. The layout stays the same, and this is not visible
to programs.

These changes are not exposed outside pthread

12 years agoAdd the low level infrastructure for pthreads lock elision with TSX
Andi Kleen [Sat, 10 Nov 2012 08:51:26 +0000 (00:51 -0800)] 
Add the low level infrastructure for pthreads lock elision with TSX

Lock elision using TSX is a technique to optimize lock scaling
It allows to run locks in parallel using hardware support for
a transactional execution mode in 4th generation Intel Core CPUs.
See http://www.intel.com/software/tsx for more Information.

This patch implements a simple adaptive lock elision algorithm based
on RTM. It enables elision for the pthread mutexes and rwlocks.
The algorithm keeps track whether a mutex successfully elides or not,
and stops eliding for some time when it is not.

When the CPU supports RTM the elision path is automatically tried,
otherwise any elision is disabled.

The adaptation algorithm and its tuning is currently preliminary.

The code adds some checks to the lock fast paths. Micro-benchmarks
show little to no difference without RTM.

This patch implements the low level "lll_" code for lock elision.
Followon patches hook this into the pthread implementation

Changes with the RTM mutexes:
-----------------------------
Lock elision in pthreads is generally compatible with existing programs.
There are some obscure exceptions, which are expected to be uncommon.
See the manual for more details.

- A broken program that unlocks a free lock will crash.
  There are ways around this with some tradeoffs (more code in hot paths)
  I'm still undecided on what approach to take here; have to wait for testing reports.
- pthread_mutex_destroy of a lock mutex will not return EBUSY but 0.
- There's also a similar situation with trylock outside the mutex,
  "knowing" that the mutex must be held due to some other condition.
  In this case an assert failure cannot be recovered. This situation is
  usually an existing bug in the program.
- Same applies to the rwlocks. Some of the return values changes
  (for example there is no EDEADLK for an elided lock, unless it aborts.
   However when elided it will also never deadlock of course)
- Timing changes, so broken programs that make assumptions about specific timing
  may expose already existing latent problems.  Note that these broken programs will
  break in other situations too (loaded system, new faster hardware, compiler
  optimizations etc.)
- Programs with non recursive mutexes that take them recursively in a thread and
  which would always deadlock without elision may not always see a deadlock.
  The deadlock will only happen on an early or delayed abort (which typically
  happens at some point)
  This only happens for mutexes not explicitely set to PTHREAD_MUTEX_NORMAL
  or PTHREAD_MUTEX_ADAPTIVE_NP.  PTHREAD_MUTEX_NORMAL mutexes do not elide.

The elision default can be set at configure time.

This patch implements the basic infrastructure for elision.

12 years agoEnable static 32-bit SSE4.2 strcasecmp/strncasecmp
H.J. Lu [Tue, 2 Jul 2013 15:03:29 +0000 (08:03 -0700)] 
Enable static 32-bit SSE4.2 strcasecmp/strncasecmp

12 years agoImplement fma in soft-fp.
Joseph Myers [Tue, 2 Jul 2013 14:55:32 +0000 (14:55 +0000)] 
Implement fma in soft-fp.

12 years agoARM: Pass dl_hwcap to IFUNC resolver functions.
Will Newton [Tue, 2 Jul 2013 13:01:21 +0000 (13:01 +0000)] 
ARM: Pass dl_hwcap to IFUNC resolver functions.

12 years agoSupport no-FPU ColdFire in sysdeps/m68k/dl-trampoline.S and refactor code.
Joseph Myers [Sun, 30 Jun 2013 21:36:59 +0000 (21:36 +0000)] 
Support no-FPU ColdFire in sysdeps/m68k/dl-trampoline.S and refactor code.

12 years agotile: switch to using <fenv.h> fallback functions
Chris Metcalf [Sun, 30 Jun 2013 15:48:31 +0000 (11:48 -0400)] 
tile: switch to using <fenv.h> fallback functions

Now that the fallback functions match the desired semantics for tile
functions, just switch to using them.

12 years agoAdd more NEWS items for 2.18.
Joseph Myers [Fri, 28 Jun 2013 22:53:57 +0000 (22:53 +0000)] 
Add more NEWS items for 2.18.