]> git.ipfire.org Git - thirdparty/glibc.git/log
thirdparty/glibc.git
8 years agoFix powerpc software sqrt (bug 17964). release/2.19/master
Joseph Myers [Thu, 12 Feb 2015 23:05:37 +0000 (23:05 +0000)] 
Fix powerpc software sqrt (bug 17964).

As Adhemerval noted in
<https://sourceware.org/ml/libc-alpha/2015-01/msg00451.html>, the
powerpc sqrt implementation for when _ARCH_PPCSQ is not defined is
inaccurate in some cases.

The problem is that this code relies on fused multiply-add, and relies
on the compiler contracting a * b + c to get a fused operation.  But
sysdeps/ieee754/dbl-64/Makefile disables contraction for e_sqrt.c,
because the implementation in that directory relies on *not* having
contracted operations.

While it would be possible to arrange makefiles so that an earlier
sysdeps directory can disable the setting in
sysdeps/ieee754/dbl-64/Makefile, it seems a lot cleaner to make the
dependence on fused operations explicit in the .c file.  GCC 4.6
introduced support for __builtin_fma on powerpc and other
architectures with such instructions, so we can rely on that; this
patch duly makes the code use __builtin_fma for all such fused
operations.

Tested for powerpc32 (hard float).

2015-02-12  Joseph Myers  <joseph@codesourcery.com>

[BZ #17964]
* sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Use
__builtin_fma instead of relying on contraction of a * b + c.

(cherry picked from commit e8bd5286c68bc35be3b41e94c15c4387dcb3bec9)

8 years agopowerpc: Fix fsqrt build in libm [BZ#16576]
Adhemerval Zanella [Tue, 27 Jan 2015 18:16:39 +0000 (13:16 -0500)] 
powerpc: Fix fsqrt build in libm [BZ#16576]

Some powerpc64 processors (e5500 core for instance) does not provide the
fsqrt instruction, however current check to use in math_private.h is
__WORDSIZE and _ARCH_PWR4 (ISA 2.02).  This is patch change it to use
the compiler flag _ARCH_PPCSQ (which is the same condition GCC uses to
decide whether to generate fsqrt instruction).

It fixes BZ#16576.

(cherry picked from commit 08cee2a464f614a6d4275b5af6c52481f1aa16e6)

8 years agoarm: mark __startcontext as .cantunwind (bug 20435)
Andreas Schwab [Thu, 18 Aug 2016 09:38:28 +0000 (11:38 +0200)] 
arm: mark __startcontext as .cantunwind (bug 20435)

__startcontext marks the bottom of the call stack of the contexts created
by makecontext.

(cherry picked from commit 9e2ff6c9cc54c0b4402b8d49e4abe7000fde7617)

Also includes the NEWS update, cherry-picked from commits
056dd72af83f5459ce6d545a49dea6dba7d635dc and
4d047efdbc55b0d68947cde682e5363d16a66294.

8 years agolinux: open and openat ignore 'mode' with O_TMPFILE in flags
Eric Rannaud [Tue, 24 Feb 2015 07:42:26 +0000 (13:12 +0530)] 
linux: open and openat ignore 'mode' with O_TMPFILE in flags

Both open and openat load their last argument 'mode' lazily, using
va_arg() only if O_CREAT is found in oflag. This is wrong, mode is also
necessary if O_TMPFILE is in oflag.

By chance on x86_64, the problem wasn't evident when using O_TMPFILE
with open, as the 3rd argument of open, even when not loaded with
va_arg, is left untouched in RDX, where the syscall expects it.

However, openat was not so lucky, and O_TMPFILE couldn't be used: mode
is the 4th argument, in RCX, but the syscall expects its 4th argument in
a different register than the glibc wrapper, in R10.

Introduce a macro __OPEN_NEEDS_MODE (oflag) to test if either O_CREAT or
O_TMPFILE is set in oflag.

Tested on Linux x86_64.

[BZ #17523]
* io/fcntl.h (__OPEN_NEEDS_MODE): New macro.
* io/bits/fcntl2.h (open): Use it.
(openat): Likewise.
* io/open.c (__libc_open): Likewise.
* io/open64.c (__libc_open64): Likewise.
* io/open64_2.c (__open64_2): Likewise.
* io/open_2.c (__open_2): Likewise.
* io/openat.c (__openat): Likewise.
* io/openat64.c (__openat64): Likewise.
* io/openat64_2.c (__openat64_2): Likewise.
* io/openat_2.c (__openat_2): Likewise.
* sysdeps/mach/hurd/open.c (__libc_open): Likewise.
* sysdeps/mach/hurd/openat.c (__openat): Likewise.
* sysdeps/posix/open64.c (__libc_open64): Likewise.
* sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise.
* ports/sysdeps/unix/sysv/linux/generic/open.c (__libc_open): Likewise.
(__open_nocancel): Likewise.
* ports/sysdeps/unix/sysv/linux/generic/open64.c (__libc_open64):
Likewise.
* sysdeps/unix/sysv/linux/open64.c (__libc_open64): Likewise.
* sysdeps/unix/sysv/linux/openat.c (__OPENAT): Likewise.

(cherry picked from commit 65f6f938cd562a614a68e15d0581a34b177ec29d)

9 years agoHarden tls_dtor_list with pointer mangling [BZ #19018]
Florian Weimer [Tue, 6 Oct 2015 11:12:36 +0000 (13:12 +0200)] 
Harden tls_dtor_list with pointer mangling [BZ #19018]

(cherry picked from commit f586e1328681b400078c995a0bb6ad301ef73549)

Conflicts:
NEWS
stdlib/cxa_thread_atexit_impl.c

9 years agoAlways enable pointer guard [BZ #18928]
Florian Weimer [Thu, 15 Oct 2015 07:23:07 +0000 (09:23 +0200)] 
Always enable pointer guard [BZ #18928]

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)

Conflicts:
NEWS

9 years agoFix memory handling in strxfrm_l [BZ #16009]
Leonhard Holz [Tue, 13 Jan 2015 06:03:56 +0000 (11:33 +0530)] 
Fix memory handling in strxfrm_l [BZ #16009]

[Modified from the original email by Siddhesh Poyarekar]

This patch solves bug #16009 by implementing an additional path in
strxfrm that does not depend on caching the weight and rule indices.

In detail the following changed:

* The old main loop was factored out of strxfrm_l into the function
do_xfrm_cached to be able to alternativly use the non-caching version
do_xfrm.

* strxfrm_l allocates a a fixed size array on the stack. If this is not
sufficiant to store the weight and rule indices, the non-caching path is
taken. As the cache size is not dependent on the input there can be no
problems with integer overflows or stack allocations greater than
__MAX_ALLOCA_CUTOFF. Note that malloc-ing is not possible because the
definition of strxfrm does not allow an oom errorhandling.

* The uncached path determines the weight and rule index for every char
and for every pass again.

* Passing all the locale data array by array resulted in very long
parameter lists, so I introduced a structure that holds them.

* Checking for zero src string has been moved a bit upwards, it is
before the locale data initialization now.

* To verify that the non-caching path works correct I added a test run
to localedata/sort-test.sh & localedata/xfrm-test.c where all strings
are patched up with spaces so that they are too large for the caching path.

(cherry picked from commit 0f9e585480edcdf1e30dc3d79e24b84aeee516fa)

Conflicts:
NEWS
string/strxfrm_l.c

9 years agoCVE-2016-4429: sunrpc: Do not use alloca in clntudp_call [BZ #20112]
Florian Weimer [Mon, 23 May 2016 18:18:34 +0000 (20:18 +0200)] 
CVE-2016-4429: sunrpc: Do not use alloca in clntudp_call [BZ #20112]

The call is technically in a loop, and under certain circumstances
(which are quite difficult to reproduce in a test case), alloca
can be invoked repeatedly during a single call to clntudp_call.
As a result, the available stack space can be exhausted (even
though individual alloca sizes are bounded implicitly by what
can fit into a UDP packet, as a side effect of the earlier
successful send operation).

(cherry picked from commit bc779a1a5b3035133024b21e2f339fe4219fb11c)

9 years agoresolv: Always set *resplen2 out parameter in send_dg [BZ #19791]
Florian Weimer [Fri, 25 Mar 2016 10:49:51 +0000 (11:49 +0100)] 
resolv: Always set *resplen2 out parameter in send_dg [BZ #19791]

Since commit 44d20bca52ace85850012b0ead37b360e3ecd96e (Implement
second fallback mode for DNS requests), there is a code path which
returns early, before *resplen2 is initialized.  This happens if the
name server address is immediately recognized as invalid (because of
lack of protocol support, or if it is a broadcast address such
255.255.255.255, or another invalid address).

If this happens and *resplen2 was non-zero (which is the case if a
previous query resulted in a failure), __libc_res_nquery would reuse
an existing second answer buffer.  This answer has been previously
identified as unusable (for example, it could be an NXDOMAIN
response).  Due to the presence of a second answer, no name server
switching will occur.  The result is a name resolution failure,
although a successful resolution would have been possible if name
servers have been switched and queries had proceeded along the search
path.

The above paragraph still simplifies the situation.  Before glibc
2.23, if the second answer needed malloc, the stub resolver would
still attempt to reuse the second answer, but this is not possible
because __libc_res_nsearch has freed it, after the unsuccessful call
to __libc_res_nquerydomain, and set the buffer pointer to NULL.  This
eventually leads to an assertion failure in __libc_res_nquery:

/* Make sure both hp and hp2 are defined */
assert((hp != NULL) && (hp2 != NULL));

If assertions are disabled, the consequence is a NULL pointer
dereference on the next line.

Starting with glibc 2.23, as a result of commit
e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca (CVE-2015-7547: getaddrinfo()
stack-based buffer overflow (Bug 18665)), the second answer is always
allocated with malloc.  This means that the assertion failure happens
with small responses as well because there is no buffer to reuse, as
soon as there is a name resolution failure which triggers a search for
an answer along the search path.

This commit addresses the issue by ensuring that *resplen2 is
initialized before the send_dg function returns.

This commit also addresses a bug where an invalid second reply is
incorrectly returned as a valid to the caller.

(cherry picked from commit b66d837bb5398795c6b0f651bd5a5d66091d8577)

9 years agoCVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug 18665).
Carlos O'Donell [Wed, 17 Feb 2016 02:26:37 +0000 (21:26 -0500)] 
CVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug 18665).

* 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)

9 years agoCVE-2016-3706: getaddrinfo: stack overflow in hostent conversion [BZ #20010]
Florian Weimer [Fri, 29 Apr 2016 08:35:34 +0000 (10:35 +0200)] 
CVE-2016-3706: getaddrinfo: stack overflow in hostent conversion [BZ #20010]

When converting a struct hostent response to struct gaih_addrtuple, the
gethosts macro (which is called from gaih_inet) used alloca, without
malloc fallback for large responses.  This commit changes this code to
use calloc unconditionally.

This commit also consolidated a second hostent-to-gaih_addrtuple
conversion loop (in gaih_inet) to use the new conversion function.

(cherry picked from commit 4ab2ab03d4351914ee53248dc5aef4a8c88ff8b9)

9 years agoCVE-2016-1234: glob: Do not copy d_name field of struct dirent [BZ #19779]
Florian Weimer [Wed, 4 May 2016 10:09:35 +0000 (12:09 +0200)] 
CVE-2016-1234: glob: Do not copy d_name field of struct dirent [BZ #19779]

Instead, we store the data we need from the return value of
readdir in an object of the new type struct readdir_result.
This type is independent of the layout of struct dirent.

(cherry picked from commit 5171f3079f2cc53e0548fc4967361f4d1ce9d7ea)

9 years agoglob: Simplify the interface for the GLOB_ALTDIRFUNC callback gl_readdir
Florian Weimer [Fri, 29 Apr 2016 07:33:07 +0000 (09:33 +0200)] 
glob: Simplify the interface for the GLOB_ALTDIRFUNC callback gl_readdir

Previously, application code had to set up the d_namlen member if
the target supported it, involving conditional compilation.  After
this change, glob will use the length of the string in d_name instead
of d_namlen to determine the file name length.  All glibc targets
provide the d_type and d_ino members, and setting them as needed for
gl_readdir is straightforward.

Changing the behavior with regards to d_ino is left to a future
cleanup.

(cherry picked from commit 137fe72eca6923a00381a3ca9f0e7672c1f85e3f)

9 years agoS390: Fix "backtrace() returns infinitely deep stack frames with makecontext()" ...
Stefan Liebler [Thu, 28 Apr 2016 08:21:58 +0000 (10:21 +0200)] 
S390: Fix "backtrace() returns infinitely deep stack frames with makecontext()" [BZ #18508].

On s390/s390x backtrace(buffer, size) returns the series of called functions until
"makecontext_ret" and additional entries (up to "size") with "makecontext_ret".
GDB-backtrace is also warning:
"Backtrace stopped: previous frame identical to this frame (corrupt stack?)"

To reproduce this scenario you have to setup a new context with makecontext()
and activate it with setcontext(). See e.g. cf() function in testcase stdlib/tst-makecontext.c.
Or see bug in libgo "Bug 66303 - runtime.Caller() returns infinitely deep stack frames
on s390x " (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66303).

This patch omits the cfi_startproc/cfi_endproc directives in ENTRY/END macro of
__makecontext_ret. Thus no frame information is generated in .eh_frame and backtrace
stops after __makecontext_ret. There is also no .eh_frame info for _start or
thread_start functions.

ChangeLog:

[BZ #18508]
* stdlib/Makefile ($(objpfx)tst-makecontext3):
Depend on $(libdl).
* stdlib/tst-makecontext.c (cf): Test if _Unwind_Backtrace
is not called infinitely times.
(backtrace_helper): New function.
(trace_arg): New struct.
(st1): Enlarge stack size.
* sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S:
(__makecontext_ret): Omit cfi_startproc and cfi_endproc.
* sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S:
Likewise.

(cherry picked from commit 890b7a4b33d482b5c768ab47d70758b80227e9bc)

9 years agoS/390: Fix setcontext/swapcontext which are not restoring sigmask. [BZ #18080]
Stefan Liebler [Thu, 28 Apr 2016 08:12:05 +0000 (10:12 +0200)] 
S/390: Fix setcontext/swapcontext which are not restoring sigmask. [BZ #18080]

This patch uses sigprocmask(SIG_SETMASK) instead of SIG_BLOCK
in setcontext, swapcontext.

(cherry picked from commit 2e807f29595eb5b1e5d0decc6e356a3562ecc58e)

9 years agoCVE-2016-3075: Stack overflow in _nss_dns_getnetbyname_r [BZ #19879]
Florian Weimer [Tue, 29 Mar 2016 10:57:56 +0000 (12:57 +0200)] 
CVE-2016-3075: Stack overflow in _nss_dns_getnetbyname_r [BZ #19879]

The defensive copy is not needed because the name may not alias the
output buffer.

(cherry picked from commit 317b199b4aff8cfa27f2302ab404d2bb5032b9a4)

9 years agohsearch_r: Apply VM size limit in test case
Florian Weimer [Fri, 12 Feb 2016 11:57:40 +0000 (12:57 +0100)] 
hsearch_r: Apply VM size limit in test case

(cherry picked from commit f34f146e682d8d529dcf64b3c2781bf3f2f05f6c)

9 years agoImprove check against integer wraparound in hcreate_r [BZ #18240]
Florian Weimer [Thu, 28 Jan 2016 12:59:11 +0000 (13:59 +0100)] 
Improve check against integer wraparound in hcreate_r [BZ #18240]

(cherry picked from commit bae7c7c764413b23e61cb099ce33be4c4ee259bb)

9 years agoHandle overflow in __hcreate_r
Ondřej Bílka [Sat, 11 Jul 2015 15:44:10 +0000 (17:44 +0200)] 
Handle overflow in __hcreate_r

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)

9 years agoFix BZ #18985 -- out of range data to strftime() causes a segfault
Paul Pluzhnikov [Sat, 26 Sep 2015 20:27:48 +0000 (13:27 -0700)] 
Fix BZ #18985 -- out of range data to strftime() causes a segfault

(cherry picked from commit d36c75fc0d44deec29635dd239b0fbd206ca49b7)

9 years agoFix trailing space.
Paul Pluzhnikov [Sat, 8 Aug 2015 22:54:40 +0000 (15:54 -0700)] 
Fix trailing space.

(cherry picked from commit 7565d2a862683a3c26ffb1f32351b8c5ab9f7b31)

9 years agoFix BZ #17905
Paul Pluzhnikov [Sat, 8 Aug 2015 22:53:03 +0000 (15:53 -0700)] 
Fix BZ #17905

(cherry picked from commit 0f58539030e436449f79189b6edab17d7479796e)

9 years agoAvoid overlapping addresses to stpcpy calls in nscd (BZ #16760)
Siddhesh Poyarekar [Thu, 27 Mar 2014 14:18:15 +0000 (19:48 +0530)] 
Avoid overlapping addresses to stpcpy calls in nscd (BZ #16760)

Calls to stpcpy from nscd netgroups code will have overlapping source
and destination when all three values in the returned triplet are
non-NULL and in the expected (host,user,domain) order.  This is seen
in valgrind as:

==3181== Source and destination overlap in stpcpy(0x19973b48, 0x19973b48)
==3181==    at 0x4C2F30A: stpcpy (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==3181==    by 0x12567A: addgetnetgrentX (string3.h:111)
==3181==    by 0x12722D: addgetnetgrent (netgroupcache.c:665)
==3181==    by 0x11114C: nscd_run_worker (connections.c:1338)
==3181==    by 0x4E3C102: start_thread (pthread_create.c:309)
==3181==    by 0x59B81AC: clone (clone.S:111)
==3181==

Fix this by using memmove instead of stpcpy.

(cherry picked from commit ea7d8b95e2fcb81f68b04ed7787a3dbda023991a)

9 years agoReturn NULL for wildcard values in getnetgrent from nscd (BZ #16759)
Siddhesh Poyarekar [Thu, 27 Mar 2014 14:19:51 +0000 (19:49 +0530)] 
Return NULL for wildcard values in getnetgrent from nscd (BZ #16759)

getnetgrent is supposed to return NULL for values that are wildcards
in the (host, user, domain) triplet.  This works correctly with nscd
disabled, but with it enabled, it returns a blank ("") instead of a
NULL.  This is easily seen with the output of `getent netgroup foonet`
for a netgroup foonet defined as follows in /etc/netgroup:

    foonet (,foo,)

The output with nscd disabled is:

    foonet ( ,foo,)

while with nscd enabled, it is:

    foonet (,foo,)

The extra space with nscd disabled is due to the fact that `getent
netgroup` adds it if the return value from getnetgrent is NULL for
either host or user.

(cherry picked from commit dd3022d75e6fb8957843d6d84257a5d8457822d5)

9 years agoFix nscd lookup for innetgr when netgroup has wildcards (BZ #16758)
Siddhesh Poyarekar [Thu, 27 Mar 2014 01:45:22 +0000 (07:15 +0530)] 
Fix nscd lookup for innetgr when netgroup has wildcards (BZ #16758)

nscd works correctly when the request in innetgr is a wildcard,
i.e. when one or more of host, user or domain parameters is NULL.
However, it does not work when the the triplet in the netgroup
definition has a wildcard.  This is easy to reproduce for a triplet
defined as follows:

    foonet (,foo,)

Here, an innetgr call that looks like this:

    innetgr ("foonet", "foohost", "foo", NULL);

should succeed and so should:

    innetgr ("foonet", NULL, "foo", "foodomain");

It does succeed with nscd disabled, but not with nscd enabled.  This
fix adds this additional check for all three parts of the triplet so
that it gives the correct result.

[BZ #16758]
* nscd/netgroupcache.c (addinnetgrX): Succeed if triplet has
blank values.

(cherry picked from commit fbd6b5a4052316f7eb03c4617eebfaafc59dcc06)

9 years agoDon't read past end of pattern in fnmatch (BZ #17062)
Andreas Schwab [Wed, 18 Jun 2014 09:58:45 +0000 (11:58 +0200)] 
Don't read past end of pattern in fnmatch (BZ #17062)

(cherry picked from commit b3a9f56ba59c3d8eadd3135a1c25c37a63151450)

Conflicts:
NEWS
posix/Makefile

9 years agoCVE-2014-8121: Do not close NSS files database during iteration [BZ #18007]
Florian Weimer [Wed, 29 Apr 2015 12:41:25 +0000 (14:41 +0200)] 
CVE-2014-8121: Do not close NSS files database during iteration [BZ #18007]

Robin Hack discovered Samba would enter an infinite loop processing
certain quota-related requests.  We eventually tracked this down to a
glibc issue.

Running a (simplified) test case under strace shows that /etc/passwd
is continuously opened and closed:


open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
lseek(3, 0, SEEK_CUR)                   = 0
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2717
lseek(3, 2717, SEEK_SET)                = 2717
close(3)                                = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
lseek(3, 0, SEEK_CUR)                   = 0
lseek(3, 0, SEEK_SET)                   = 0
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2717
lseek(3, 2717, SEEK_SET)                = 2717
close(3)                                = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
lseek(3, 0, SEEK_CUR)                   = 0


The lookup function implementation in
nss/nss_files/files-XXX.c:DB_LOOKUP has code to prevent that.  It is
supposed skip closing the input file if it was already open.

  /* Reset file pointer to beginning or open file.  */       \
  status = internal_setent (keep_stream);       \
      \
  if (status == NSS_STATUS_SUCCESS)       \
    {       \
      /* Tell getent function that we have repositioned the file pointer.  */ \
      last_use = getby;       \
      \
      while ((status = internal_getent (result, buffer, buflen, errnop       \
H_ERRNO_ARG EXTRA_ARGS_VALUE))       \
     == NSS_STATUS_SUCCESS)       \
{ break_if_match }       \
      \
      if (! keep_stream)       \
internal_endent ();       \
    }       \

keep_stream is initialized from the stayopen flag in internal_setent.
internal_setent is called from the set*ent implementation as:

  status = internal_setent (stayopen);

However, for non-host database, this flag is always 0, per the
STAYOPEN magic in nss/getXXent_r.c.

Thus, the fix is this:

-  status = internal_setent (stayopen);
+  status = internal_setent (1);

This is not a behavioral change even for the hosts database (where the
application can specify the stayopen flag) because with a call to
sethostent(0), the file handle is still not closed in the
implementation of gethostent.

(cherry picked from commit 03d2730b44cc2236318fd978afa2651753666c55)

Conflicts:
ChangeLog
NEWS

9 years agoFix BZ #17269 -- _IO_wstr_overflow integer overflow
Paul Pluzhnikov [Sun, 22 Feb 2015 20:01:47 +0000 (12:01 -0800)] 
Fix BZ #17269 -- _IO_wstr_overflow integer overflow

(cherry picked from commit bdf1ff052a8e23d637f2c838fa5642d78fcedc33)

Conflicts:
ChangeLog
NEWS

9 years agoFix read past end of pattern in fnmatch (bug 18032)
Andreas Schwab [Thu, 26 Feb 2015 13:55:24 +0000 (14:55 +0100)] 
Fix read past end of pattern in fnmatch (bug 18032)

(cherry picked from commit 4a28f4d55a6cc33474c0792fe93b5942d81bf185)

Conflicts:
ChangeLog
NEWS

9 years agoDon't ignore too long lines in nss_files (BZ #17079)
Andreas Schwab [Mon, 23 Jun 2014 08:24:45 +0000 (10:24 +0200)] 
Don't ignore too long lines in nss_files (BZ #17079)

(cherry picked from commit ac60763eac3d43b7234dd21286ad3ec3f17957fc)

Conflicts:
ChangeLog
NEWS

9 years agoFix parsing of getai result from nscd for IPv6-only request
Andreas Schwab [Wed, 7 May 2014 09:47:20 +0000 (11:47 +0200)] 
Fix parsing of getai result from nscd for IPv6-only request

(cherry picked from commit 8dc9751764eb1bedf06d19695524b31a16773413)

9 years agoCorrect DT_PPC64_NUM
Alan Modra [Mon, 14 Jul 2014 11:44:50 +0000 (21:14 +0930)] 
Correct DT_PPC64_NUM

[BZ #17153]
* elf/elf.h (DT_PPC64_NUM): Correct value.
* NEWS: Add to fixed bug list.

(cherry picked from commit f6c44d475104e931bab2b4ffa499961088de673c)

Conflicts:
NEWS

9 years agoFix use of half-initialized result in getaddrinfo when using nscd (bug 16743)
Andreas Schwab [Thu, 20 Mar 2014 14:05:25 +0000 (15:05 +0100)] 
Fix use of half-initialized result in getaddrinfo when using nscd (bug 16743)

This fixes a bug in the way the results from __nscd_getai are collected:
for every returned result a new entry is first added to the
gaih_addrtuple list, but if that result doesn't match the request this
entry remains uninitialized.  So for this non-matching result an extra
result with uninitialized content is returned.

To reproduce (with nscd running):

$ getent ahostsv4 localhost
127.0.0.1       STREAM localhost
127.0.0.1       DGRAM
127.0.0.1       RAW
(null)          STREAM
(null)          DGRAM
(null)          RAW

(cherry picked from commit a071766ebfd853179ac39f9773f894029bf86d36)

Conflicts:
ChangeLog
NEWS

9 years agoCVE-2015-1781: resolv/nss_dns/dns-host.c buffer overflow [BZ#18287]
Arjun Shankar [Tue, 21 Apr 2015 12:06:31 +0000 (14:06 +0200)] 
CVE-2015-1781: resolv/nss_dns/dns-host.c buffer overflow [BZ#18287]

(cherry picked from commit 2959eda9272a033863c271aff62095abd01bd4e3)

9 years agoProperly handle forced elision in pthread_mutex_trylock (bug 16657)
Andreas Schwab [Tue, 4 Mar 2014 12:00:26 +0000 (13:00 +0100)] 
Properly handle forced elision in pthread_mutex_trylock (bug 16657)

(cherry picked from commit b0a3c1640ab2fb7d16d9b9a8d9c0e524e9cb0001)

9 years agoPowerPC: Fix gprof entry point for LE
Adhemerval Zanella [Tue, 29 Jul 2014 18:56:44 +0000 (13:56 -0500)] 
PowerPC: Fix gprof entry point for LE

This patch fixes the ELFv2 gprof entry point since the ABI
does not define function descriptors.  It fixes BZ#17213.

Conflicts:
NEWS

10 years ago[AArch64] End frame record chain correctly.
Renlin Li [Tue, 11 Nov 2014 15:50:07 +0000 (15:50 +0000)] 
[AArch64] End frame record chain correctly.

10 years agoCVE-2014-6040: Crashes on invalid input in IBM gconv modules [BZ #17325]
Florian Weimer [Wed, 3 Sep 2014 17:45:43 +0000 (19:45 +0200)] 
CVE-2014-6040: Crashes on invalid input in IBM gconv modules [BZ #17325]

These changes are based on the fix for BZ #14134 in commit
6e230d11837f3ae7b375ea69d7905f0d18eb79e5.

(cherry picked from commit 41488498b6d9440ee66ab033808cce8323bba7ac)

Conflicts:
NEWS
iconvdata/Makefile

10 years ago__gconv_translit_find: Disable function [BZ #17187]
Florian Weimer [Tue, 26 Aug 2014 17:38:59 +0000 (19:38 +0200)] 
__gconv_translit_find: Disable function [BZ #17187]

This functionality has never worked correctly, and the implementation
contained a security vulnerability (CVE-2014-5119).

(cherry picked from commit a1a6a401ab0a3c9f15fb7eaebbdcee24192254e8)
(cherry picked from commit f9df71e895d3552d557e783fdb9d133328195645)

Conflicts:
NEWS

10 years agoNEWS: Explain the s390 jmp_buf / ucontext_t ABI change reversal.
Stefan Liebler [Fri, 1 Aug 2014 07:48:17 +0000 (09:48 +0200)] 
NEWS: Explain the s390 jmp_buf / ucontext_t ABI change reversal.

(cherry picked from commit 95ee7fb13ba99ba265b49531c57e1cb8db629bc6)

Typo fix as in commit 45ef66289acbab17278a73512f9b2a9d8a7ca79d and
NEW enty adjusted to reflect revert occuring in 2.19.1 and 2.20.

Conflicts:
NEWS

10 years agoS/390: Revert the jmp_buf/ucontext_t ABI change
Stefan Liebler [Thu, 28 Aug 2014 06:53:13 +0000 (16:53 +1000)] 
S/390: Revert the jmp_buf/ucontext_t ABI change

Backport of commit 2f438e20ab591641760e97458d5d1569942eced5

10 years agomanual: Update the locale documentation
Florian Weimer [Wed, 28 May 2014 12:05:03 +0000 (14:05 +0200)] 
manual: Update the locale documentation

(cherry picked from commit 585367266923156ac6fb789939a923641ba5aaf4)

Conflicts:
manual/locale.texi

10 years ago_nl_find_locale: Improve handling of crafted locale names [BZ #17137]
Florian Weimer [Mon, 12 May 2014 13:24:12 +0000 (15:24 +0200)] 
_nl_find_locale: Improve handling of crafted locale names [BZ #17137]

Prevent directory traversal in locale-related environment variables
(CVE-2014-0475).

(cherry picked from commit 4e8f95a0df7c2300b830ec12c0ae1e161bc8a8a3)

Addiational backporting fixes:
  Added tst-setlocale3-ENV to localedata/Makefile

Conflicts:
NEWS
localedata/Makefile

10 years agosetlocale: Use the heap for the copy of the locale argument
Florian Weimer [Wed, 28 May 2014 12:41:52 +0000 (14:41 +0200)] 
setlocale: Use the heap for the copy of the locale argument

This avoids alloca calls with potentially large arguments.

(cherry picked from commit d183645616b0533b3acee28f1a95570bffbdf50f)

10 years agoUse NSS_STATUS_TRYAGAIN to indicate insufficient buffer (BZ #16878)
Siddhesh Poyarekar [Mon, 26 May 2014 06:10:08 +0000 (11:40 +0530)] 
Use NSS_STATUS_TRYAGAIN to indicate insufficient buffer (BZ #16878)

The netgroups nss modules in the glibc tree use NSS_STATUS_UNAVAIL
(with errno as ERANGE) when the supplied buffer does not have
sufficient space for the result.  This is wrong, because the canonical
way to indicate insufficient buffer is to set the errno to ERANGE and
the status to NSS_STATUS_TRYAGAIN, as is used by all other modules.

This fixes nscd behaviour when the nss_ldap module returns
NSS_STATUS_TRYAGAIN to indicate that a netgroup entry is too long to
fit into the supplied buffer.

(cherry picked from commit c3ec475c5dd16499aa040908e11d382c3ded9692)

Conflicts:
NEWS

10 years agoProvide correct buffer length to netgroup queries in nscd (BZ #16695)
Siddhesh Poyarekar [Wed, 12 Mar 2014 11:57:22 +0000 (17:27 +0530)] 
Provide correct buffer length to netgroup queries in nscd (BZ #16695)

The buffer to query netgroup entries is allocated sufficient space for
the netgroup entries and the key to be appended at the end, but it
sends in an incorrect available length to the NSS netgroup query
functions, resulting in overflow of the buffer in some special cases.
The fix here is to factor in the key length when sending the available
buffer and buffer length to the query functions.

(cherry picked from commit c44496df2f090a56d3bf75df930592dac6bba46f)

Conflicts:
NEWS

10 years ago[BZ #16046] dl_iterate_phdr static executable test
Maciej W. Rozycki [Fri, 20 Jun 2014 20:52:53 +0000 (21:52 +0100)] 
[BZ #16046] dl_iterate_phdr static executable test

(cherry picked from commit 257ce7127e2f64a6a959b146786cd43de0e42b5f)

10 years agoFix another memory leak in regexp compiler (BZ #17069)
Andreas Schwab [Fri, 20 Jun 2014 10:41:27 +0000 (12:41 +0200)] 
Fix another memory leak in regexp compiler (BZ #17069)

(cherry picked from commit aa6ec754f3b4b1df81d186480c534b6486a1e6ee)

Conflicts:
NEWS

10 years agoFix memory leak in regexp compiler (BZ #17069)
Andreas Schwab [Thu, 19 Jun 2014 13:38:03 +0000 (15:38 +0200)] 
Fix memory leak in regexp compiler (BZ #17069)

(cherry picked from commit 4d43ef1e7434d7d419afbcd754931cb0c794763c)

Conflicts:
posix/Makefile

10 years agoFix invalid file descriptor reuse while sending DNS query (BZ #15946)
Andreas Schwab [Mon, 26 May 2014 16:01:31 +0000 (18:01 +0200)] 
Fix invalid file descriptor reuse while sending DNS query (BZ #15946)

(cherry picked from commit f9d2d03254a58d92635a311a42253eeed5a40a47)

Conflicts:
NEWS

10 years agoProperly fix memory leak in _nss_dns_gethostbyname4_r with big DNS answer
Andreas Schwab [Tue, 18 Feb 2014 09:57:25 +0000 (10:57 +0100)] 
Properly fix memory leak in _nss_dns_gethostbyname4_r with big DNS answer

Instead of trying to guess whether the second buffer needs to be freed
set a flag at the place it is allocated

(cherry picked from commit ab09bf616ad527b249aca5f2a4956fd526f0712f)

10 years agoDeduplicate resolv/nss_dns/dns-host.c
Ondřej Bílka [Sun, 16 Feb 2014 11:59:23 +0000 (12:59 +0100)] 
Deduplicate resolv/nss_dns/dns-host.c

In resolv/nss_dns/dns-host.c one of code path duplicated code after
that. We merge these paths.

(cherry picked from commit ab7ac0f2cf8731fe4c3f3aea6088a7c0127b5725)

10 years agoFix memory leak in _nss_dns_gethostbyname4_r with big DNS answer
Andreas Schwab [Thu, 13 Feb 2014 10:01:57 +0000 (11:01 +0100)] 
Fix memory leak in _nss_dns_gethostbyname4_r with big DNS answer

(cherry picked from commit d668061994a7486a3ba9c7d5e7882d85a2883707)

Conflicts:
NEWS

10 years agoFix unbound stack use in NIS NSS module
Andreas Schwab [Thu, 8 May 2014 14:53:01 +0000 (16:53 +0200)] 
Fix unbound stack use in NIS NSS module

(cherry picked from commit 315eb1d86aea489cd6325fd1c2521dcfb4fc0e1c)

Conflicts:
NEWS

10 years agoMention CVE-2014-4043 in NEWS
Allan McRae [Sat, 21 Jun 2014 07:23:55 +0000 (17:23 +1000)] 
Mention CVE-2014-4043 in NEWS

(cherry picked from commit d03efb2f979defd473955a455d66b949961d26b2)

Conflicts:
NEWS

10 years agoposix_spawn_faction_addopen: Add missing string.h include directive
Stefan Liebler [Thu, 12 Jun 2014 12:15:25 +0000 (14:15 +0200)] 
posix_spawn_faction_addopen: Add missing string.h include directive

This is needed to avoid a PLT call on s390.

(cherry picked from commit 35a5e3e338ae17f3d42c60a708763c5d498fb840)

11 years agoposix_spawn_file_actions_addopen needs to copy the path argument (BZ 17048)
Florian Weimer [Wed, 11 Jun 2014 21:12:52 +0000 (23:12 +0200)] 
posix_spawn_file_actions_addopen needs to copy the path argument (BZ 17048)

POSIX requires that we make a copy, so we allocate a new string
and free it in posix_spawn_file_actions_destroy.

Reported by David Reid, Alex Gaynor, and Glyph Lefkowitz.  This bug
may have security implications.

(cherry picked from commit 89e435f3559c53084498e9baad22172b64429362)

Conflicts:
NEWS

11 years agoFixed pthread_spin_lock on sparc32/64 (bug 16882)
Guo Yixuan [Tue, 3 Jun 2014 23:19:11 +0000 (16:19 -0700)] 
Fixed pthread_spin_lock on sparc32/64 (bug 16882)

[BZ #16882]
* nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
(pthread_spin_lock): Branch out of spin loop to proper location.
* nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
(pthread_spin_lock): Likewise.

* nptl/tst-spin4.c: New test.
* nptl/Makefile (tests): Add tst-spin4.

11 years agoaarch64: Merge __local_multiple_threads offset with memory reference
Richard Henderson [Wed, 21 May 2014 17:24:03 +0000 (13:24 -0400)] 
aarch64: Merge __local_multiple_threads offset with memory reference

This also highlights that we'd been loading 64-bits instead of
the proper 32-bits.  Caught by the linker as a relocation error,
since the variable happened to be unaligned for 64-bits.

Cherry-pick of a6b3657be6bc5067aeec98d990f60765361c6557.

11 years agoFix sparc memcpy data corruption when using niagara2 optimized routines.
Jose E. Marchesi [Sat, 17 May 2014 18:20:27 +0000 (11:20 -0700)] 
Fix sparc memcpy data corruption when using niagara2 optimized routines.

* sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Add missing
membar to avoid block loads/stores to overlap previous stores.

11 years agotzselect: use zonedir instead of current working directory
Sami Kerola [Tue, 13 May 2014 17:38:32 +0000 (19:38 +0200)] 
tzselect: use zonedir instead of current working directory

(cherry picked from commit 893b4f375668c025cbd6828f82a8844edda276d1)
(cherry picked from commit c72399fbc5228580a560d8fe319ff98150928b05)

Conflicts:
timezone/Makefile

11 years agoUpdate Swedish translations
Allan McRae [Fri, 16 May 2014 04:21:12 +0000 (14:21 +1000)] 
Update Swedish translations

(cherry picked from commit d51d659d114e2edb0037b2af45d6ee36458e48d1)

11 years agoSPARC: add prlimit and prlimit64 in <bits/resource.h> (BZ #16943)
Aurelien Jarno [Thu, 15 May 2014 22:04:41 +0000 (00:04 +0200)] 
SPARC: add prlimit and prlimit64 in <bits/resource.h> (BZ #16943)

prlimit and prlimit64 have been added in the main <bits/resource.h>, but
not in the SPARC specific version. Fix that.

Note: this is Debian bug#703559, reported by Emilio Pozuelo Monfort
<pochu@debian.org>

(cherry picked from commit d16e6ec7ca2c861ba681e3a2fbd431725774292e)

11 years agoSPARC: add EFD_SEMAPHORE in <bits/eventfd.h> (BZ #16916)
Aurelien Jarno [Tue, 6 May 2014 21:31:44 +0000 (23:31 +0200)] 
SPARC: add EFD_SEMAPHORE in <bits/eventfd.h> (BZ #16916)

EFD_SEMAPHORE has been added in the main <bits/eventfd.h>, but not in
the SPARC specific version. Fix that.

(cherry picked from commit 83df9ad0cc861ef24f08a88c5a4c055e2516d33c)

11 years agomisc/sys/xattr.h: guard against linux uapi header inclusion
Serge Hallyn [Tue, 11 Mar 2014 04:17:07 +0000 (23:17 -0500)] 
misc/sys/xattr.h: guard against linux uapi header inclusion

If the glibc xattr.h header is included after the uapi header,
compilation fails due to an enum re-using a #define from the
uapi header.  Protect against this by guarding the define and
enum inclusions against each other.

(A corresponding kernel patch has been sent here:
http://lkml.org/lkml/2014/3/7/331 )

(See https://lists.debian.org/debian-glibc/2014/03/msg00029.html
and https://sourceware.org/glibc/wiki/Synchronizing_Headers
for more information.)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
(cherry picked from commit fdbe8eae2b9aed74dabba1b0a189c5d7d61bf032)

11 years agoUpdate Esperanto translations
Allan McRae [Sun, 4 May 2014 03:35:16 +0000 (13:35 +1000)] 
Update Esperanto translations

(cherry picked from commit d69aeb123961252ddd2a23acc7dc9ce0ae2cfa5f)

11 years agoNEWS: Add 16885 to fixed bug list.
David S. Miller [Thu, 1 May 2014 20:44:59 +0000 (16:44 -0400)] 
NEWS: Add 16885 to fixed bug list.

11 years agoFix v9/64-bit strcmp when string ends in multiple zero bytes.
David S. Miller [Wed, 30 Apr 2014 19:57:51 +0000 (12:57 -0700)] 
Fix v9/64-bit strcmp when string ends in multiple zero bytes.

[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.

11 years agoFix sign of input to bsloww1 (BZ #16623)
Siddhesh Poyarekar [Thu, 27 Feb 2014 15:59:16 +0000 (21:29 +0530)] 
Fix sign of input to bsloww1 (BZ #16623)

In 84ba214c, I removed some redundant sign computations and in the
process, I incorrectly got rid of a temporary variable, thus passing
the absolute value of the input to bsloww1.  This caused #16623.

This fix undoes the incorrect change.

11 years agoUpdate x86_64 libm-test-ulps on AMD family 21h model 1 (bug 16545).
Dylan Alex Simon [Wed, 12 Feb 2014 15:55:10 +0000 (15:55 +0000)] 
Update x86_64 libm-test-ulps on AMD family 21h model 1 (bug 16545).

(cherry picked from commit fbfdf9cb039486f66994637081862c01bbd6a765)

Conflicts:
NEWS

11 years agoUpdate version.h and include/features.h for 2.19 release glibc-2.19
Allan McRae [Fri, 7 Feb 2014 09:04:38 +0000 (19:04 +1000)] 
Update version.h and include/features.h for 2.19 release

11 years agoBug 15968 was fixed by commit 0748546f660d27a2ad29fa6174d456e2f6490758.
Joseph Myers [Fri, 7 Feb 2014 02:47:37 +0000 (02:47 +0000)] 
Bug 15968 was fixed by commit 0748546f660d27a2ad29fa6174d456e2f6490758.

11 years agoBug 6981 was fixed by commit 1484e65736f4cab27e5051e0f06be8470e69af82.
Joseph Myers [Fri, 7 Feb 2014 02:36:28 +0000 (02:36 +0000)] 
Bug 6981 was fixed by commit 1484e65736f4cab27e5051e0f06be8470e69af82.

11 years agoBZ #16529: Fix pedantic warning with netinet/in.h.
Carlos O'Donell [Thu, 6 Feb 2014 16:12:48 +0000 (11:12 -0500)] 
BZ #16529: Fix pedantic warning with netinet/in.h.

When compiling with pedantic the following warning is seen:

gcc -Wall -pedantic -O0 -o test test.c
In file included from test.c:3:0:
/path/inet/netinet/in.h:111:21: warning: comma at end of \
enumerator list [-Wpedantic]
     IPPROTO_MH = 135,      /* IPv6 mobility header.  */
                     ^

It is valid C99 to have a trailing comma after the last item in
an enumeration. However it is not valid C90. If possible glibc
attempts to keep all headers C90 + long long without requiring
C99 features. In this case it's easy to fix the headers and it
removes the warning seem with -pedantic.

11 years agoUpdate contrib.texi
Siddhesh Poyarekar [Thu, 6 Feb 2014 05:31:35 +0000 (11:01 +0530)] 
Update contrib.texi

Update blurb for Roland, Alex, Ryan, Joseph and Carlos.

11 years agoAdd missing ChangeLog from yesterday's sparc ULPs update.
David S. Miller [Thu, 6 Feb 2014 03:41:27 +0000 (19:41 -0800)] 
Add missing ChangeLog from yesterday's sparc ULPs update.

11 years agoRevert "microblaze BZ #15705: Define MMAP2_PAGE_SHIFT"
David Holsgrove [Wed, 5 Feb 2014 23:57:56 +0000 (09:57 +1000)] 
Revert "microblaze BZ #15705: Define MMAP2_PAGE_SHIFT"

This reverts commit 79b846ecc0275ceb02b5e2d3b03a34d7c43e6bf9.

Conflicts:

NEWS
ports/ChangeLog.microblaze

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
11 years agoRevert "BZ 16133 has been fixed (async signal safe TLS)."
Allan McRae [Wed, 5 Feb 2014 11:22:19 +0000 (21:22 +1000)] 
Revert "BZ 16133 has been fixed (async signal safe TLS)."

This reverts commit a494421f5268df333c589d71104a39bb6a9cff19.

Conflicts:
NEWS

11 years agoRevert "Patch [1/4] async-signal safe TLS."
Allan McRae [Wed, 5 Feb 2014 11:21:09 +0000 (21:21 +1000)] 
Revert "Patch [1/4] async-signal safe TLS."

This reverts commit 69a17d9d245dc3551792e95e1823cc2d877592f3.

11 years agoRevert "Patch 3/4 of the effort to make TLS access async-signal-safe."
Allan McRae [Wed, 5 Feb 2014 11:21:00 +0000 (21:21 +1000)] 
Revert "Patch 3/4 of the effort to make TLS access async-signal-safe."

This reverts commit 35e8f7ab94c910659de9d507aa0f3e1f8973d914.

11 years agoRevert "Patch 2/4 of the effort to make TLS access async-signal-safe."
Allan McRae [Wed, 5 Feb 2014 11:19:51 +0000 (21:19 +1000)] 
Revert "Patch 2/4 of the effort to make TLS access async-signal-safe."

This reverts commit 1f33d36a8a9e78c81bed59b47f260723f56bb7e6.

Conflicts:
elf/dl-misc.c

Also reverts the follow commits that were bug fixes to new code introduced
in the above commit:
063b2acbce83549df82ab30f5af573f1b9c4bd19
b627fdd58554bc36bd344dc40a8787c4b7a9cc46
e81c64bba13d2d8b2a4e53254a82cc80f27c8497

11 years agoRevert "Async-signal safe TLS."
Allan McRae [Wed, 5 Feb 2014 11:14:59 +0000 (21:14 +1000)] 
Revert "Async-signal safe TLS."

This reverts commit 7f507ee17aee720fa423fa38502bc3caa0dd03d7.

Conflicts:
ChangeLog
nptl/tst-tls7.c
nptl/tst-tls7mod.c

11 years agoFix comment in kernel-features.h.
Carlos O'Donell [Wed, 5 Feb 2014 15:33:42 +0000 (10:33 -0500)] 
Fix comment in kernel-features.h.

Use "was" not "were."

11 years agoFix tst-setgetname for Linux kernels < 2.6.33.
Carlos O'Donell [Wed, 5 Feb 2014 15:10:34 +0000 (10:10 -0500)] 
Fix tst-setgetname for Linux kernels < 2.6.33.

Support for /proc/self/task/$tid/comm as added in Linux 2.6.33,
therefore since the test tst-setgetname relies on this functionality
to operate we must skip the test in kernels < 2.6.33. We wrap the
checks with __ASSUME_PROC_PID_TASK_COMM such that in the future when
we move arch_minimum_kernel to 2.6.33 we can remove this code.

11 years agomicroblaze: Update libm-test-ulps
David Holsgrove [Mon, 3 Feb 2014 23:30:34 +0000 (09:30 +1000)] 
microblaze: Update libm-test-ulps

Update libm-test-ulps for microblaze, and remove unneeded copy
libm-test-ulps_new.

ports/ChangeLog.microblaze

 2014-02-04  David Holsgrove <david.holsgrove@xilinx.com>

   * sysdeps/microblaze/libm-test-ulps: Update.
   * sysdeps/microblaze/libm-test-ulps_new: Deleted redundant file.

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
11 years agomicroblaze BZ #15705: Define MMAP2_PAGE_SHIFT
David Holsgrove [Mon, 3 Feb 2014 23:26:15 +0000 (09:26 +1000)] 
microblaze BZ #15705: Define MMAP2_PAGE_SHIFT

Define MMAP2_PAGE_SHIFT to -1 for microblaze so the correct shift
for the syscall is determined dynamically using getpagesize

ports/ChangeLog.microblaze

 2014-02-04  David Holsgrove <david.holsgrove@xilinx.com>

   * sysdeps/unix/sysv/linux/microblaze/mmap64.c: New file.

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
11 years agomicroblaze: Use <fenv.h> fallback functions
David Holsgrove [Mon, 3 Feb 2014 23:22:42 +0000 (09:22 +1000)] 
microblaze: Use <fenv.h> fallback functions

Delete redundant fegetround.c and fesetround.c for microblaze
and use the fallback functions instead.

ports/ChangeLog.microblaze

 2014-02-04  David Holsgrove <david.holsgrove@xilinx.com>

    * sysdeps/microblaze/fegetround.c: Delete redundant file.
    * sysdeps/microblaze/fesetround.c: Likewise.

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
11 years agoUpdate NEWS for #16398
Siddhesh Poyarekar [Wed, 5 Feb 2014 07:20:22 +0000 (12:50 +0530)] 
Update NEWS for #16398

11 years agoFix infinite loop in ftell when writing wide char data (BZ #16398)
Siddhesh Poyarekar [Wed, 5 Feb 2014 07:19:00 +0000 (12:49 +0530)] 
Fix infinite loop in ftell when writing wide char data (BZ #16398)

ftell tries to avoid flushing the buffer when it is in write mode by
converting the wide char data and placing it into the binary buffer.
If the output buffer space is full and there is data to write, the
code reverts to flushing the buffer.  This breaks when there is space
in the buffer but it is not enough to convert the next character in
the wide data buffer, due to which __codecvt_do_out returns a
__codecvt_partial status.  In this case, ftell keeps running in an
infinite loop.

The fix here is to detect the __codecvt_partial status in addition to
checking if the buffer is full.  I have also added a test case that
demonstrates the infinite loop.

11 years agoUpdate contrib.texi
Siddhesh Poyarekar [Wed, 5 Feb 2014 06:52:58 +0000 (12:22 +0530)] 
Update contrib.texi

This may not be a complete list of new contributors added to the list,
so I'd love it if more people look at contributions and suggest
additions.

11 years agoAdjust sparc ULPs.
David S. Miller [Wed, 5 Feb 2014 04:54:58 +0000 (20:54 -0800)] 
Adjust sparc ULPs.

* sysdeps/sparc/fpu/libm-test-ulps: Update for some 64-bit differences from
32-bit.

11 years agoPowerPC: powerpc64le abilist for 2.17
Adhemerval Zanella [Tue, 4 Feb 2014 11:49:34 +0000 (09:49 -0200)] 
PowerPC: powerpc64le abilist for 2.17

This patch is the abifiles for powerpc64le based on GLIBC 2.17.

11 years agoPowerPC: Change powerpc64le start ABI to 2.17.
Adhemerval Zanella [Tue, 4 Feb 2014 11:49:08 +0000 (09:49 -0200)] 
PowerPC: Change powerpc64le start ABI to 2.17.

11 years agoabilist-pattern configurability
Adhemerval Zanella [Tue, 4 Feb 2014 11:48:47 +0000 (09:48 -0200)] 
abilist-pattern configurability

This patch creates implicit rules to match the abifiles if
abilist-pattern is defined in the architecture Makefile. This allows
machine specific Makefiles to define different abifiles names
(for instance *-le.abilist for powerpc64le).

11 years agoUpdate x86_64 ULPs (AMD family 21, model 2)
Eric Wong [Tue, 4 Feb 2014 00:33:57 +0000 (10:33 +1000)] 
Update x86_64 ULPs (AMD family 21, model 2)

Tested on an AMD FX-8320 CPU

11 years agoUpdate x86_64 ULPs (AMD Family 10h)
Eric Wong [Mon, 3 Feb 2014 23:41:18 +0000 (09:41 +1000)] 
Update x86_64 ULPs (AMD Family 10h)

11 years agoRemove excessive redundant ChangeLog header lines.
Roland McGrath [Mon, 3 Feb 2014 22:37:53 +0000 (14:37 -0800)] 
Remove excessive redundant ChangeLog header lines.

11 years ago[hppa] Regenerate libm-test-ulps.
Carlos O'Donell [Mon, 3 Feb 2014 21:21:13 +0000 (16:21 -0500)] 
[hppa] Regenerate libm-test-ulps.

Regenerate libm-test-ulps from scratch.

11 years agoFix manual build warnings.
Carlos O'Donell [Mon, 3 Feb 2014 17:43:25 +0000 (12:43 -0500)] 
Fix manual build warnings.

The mixed use of automatic and manual node next, previous,
and top specification causes warning when building the manual.
This fix explicitly specifies the node's next, previous and top
values to fix the warning.

11 years ago* manual/macros.texi: Add comments before MTASC-safety macros.
Alexandre Oliva [Mon, 3 Feb 2014 19:26:08 +0000 (17:26 -0200)] 
* manual/macros.texi: Add comments before MTASC-safety macros.