aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
AgeCommit message (Collapse)AuthorFilesLines
2013-08-16CVE-2013-4237, BZ #14699: Buffer overflow in readdir_rFlorian Weimer6-14/+34
* 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.
2013-08-13Fix cbrtl for ldbl-96Andreas Schwab1-1/+1
2013-07-23PowerPC: use _dl_static_init to set GLRO(gl_pagesize)Adhemerval Zanella4-0/+129
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.
2013-07-22S/390: ULPs update.Andreas Krebbel1-141/+6285
2013-07-21CVE-2013-2207, BZ #15755: Disable pt_chown.Carlos O'Donell2-5/+8
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.
2013-07-20Update Sparc ULPs.David S. Miller1-0/+5
* sysdeps/sparc/fpu/libm-test-ulps: Update ULPs to handle minor difference between 32-bit and 64-bit.
2013-07-16BZ #15711: Avoid circular dependency for syscall.hCarlos O'Donell1-2/+9
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.
2013-07-07Full from-scratch rebuild of sparc ULPs.David S. Miller1-238/+73
* sysdeps/sparc/fpu/libm-test-ulps: Regenerate from scratch.
2013-07-05Update x86 and x86_64 ulps on AMD FX-8350 with GCC 4.8.1.Jeroen Albers2-16/+523
2013-07-04Update powerpc-fpu ULPs.Adhemerval Zanella1-22/+146
2013-07-04Sync sys/ptrace with Linux 3.10Andreas Jaeger4-5/+80
2013-07-03Update i386 ULPs.Allan McRae1-0/+80
* sysdeps/i386/fpu/libm-test-ulps: Update.
2013-07-02Update sparc ULPs.David S. Miller1-0/+46
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2013-07-02Update x86_64 ULPs.Markus Trippelsdorf1-2/+318
2013-07-02Regenerate x86 and x86_64 ulps.Joseph Myers2-1593/+129
2013-07-02Enable static 32-bit SSE4.2 strcasecmp/strncasecmpH.J. Lu2-6/+0
2013-06-28Skip SSE4.2 versions on Intel SilvermontLiubov Dmitrieva5-15/+37
SSE2/SSSE3 versions are faster than SSE4.2 versions on Intel Silvermont.
2013-06-28PowerPC: Define AT_HWCAP2 bits and AT_HWCAP2 handling for POWER8.Ryan S. Arnold5-22/+67
2013-06-28Add GLRO(dl_hwcap2) for new AT_HWCAP2 auxv_t a_type.Ryan S. Arnold8-7/+27
2013-06-28Consistently use page_shift in sysdeps/unix/sysv/linux/mmap64.c.Joseph Myers1-1/+1
2013-06-26Fix buffers overrun in x86_64 memcmp-ssse3.SLiubov Dmitrieva1-4/+2
2013-06-24[BZ #10283] localedef: align fixed maps to SHMLBAMike Frysinger1-0/+26
Many Linux arches require fixed mmaps to be aligned higher than pagesize, so use the SHMLBA define as it represents this quantity exactly. This fixes spurious errors seen on those arches like: cannot map archive header: Invalid argument URL: http://sourceware.org/bugzilla/show_bug.cgi?id=10283 Reported-by: CHIKAMA Masaki <masaki.chikama@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-06-24PowerPC: Enable POWER8 platform sans hwcap bits.Ryan S. Arnold6-3/+16
2013-06-22Include <string.h> in sysdeps/unix/sysv/linux/libc_fatal.c.Joseph Myers1-0/+1
2013-06-21Add sh4 implementation of fegetexceptflag.Kaz Kojima1-0/+38
2013-06-17Rewrite sysd-rules generation using an awk script.Roland McGrath1-1/+1
2013-06-15Fix spurious "inexact" exceptions from dbl-64 sqrt (bug 15631).Joseph Myers1-2/+15
2013-06-15New API to set default thread attributesSiddhesh Poyarekar10-0/+40
This patch introduces two new convenience functions to set the default thread attributes used for creating threads. This allows a programmer to set the default thread attributes just once in a process and then run pthread_create without additional attributes.
2013-06-14Set fast unaligned load flag for new Intel microarchitectureLiubov Dmitrieva1-0/+7
I have small patch for new Intel Silvermont machines. http://newsroom.intel.com/community/intel_newsroom/blog/2013/05/06/intel-launches-low-power-high-performance-silvermont-microarchitecture I checked this on my machine and see that strcpy, ... unaligned versions are faster than ssse3 versions.
2013-06-15Add rtld-memset.S for x86_64Siddhesh Poyarekar2-1/+37
Resolves: BZ #15627 Add an assembler version of rtld-memset to avoid using SSE registers.
2013-06-13Improve precision of clock() function on LinuxSiddhesh Poyarekar1-20/+16
Resolves #12515. Use CLOCK_PROCESS_CPUTIME_ID instead of times to get better precision in the value returned by clock.
2013-06-12Fix unsafe compiler optimizationAdhemerval Zanella2-1/+8
GCC 4.8 enables -ftree-loop-distribute-patterns at -O3 by default and this optimization may transform loops into memset/memmove calls. Without proper handling this may generate unexpected PLT calls on GLIBC. This patch fixes by create memset/memmove alias to internal GLIBC __GI_memset/__GI_memmove symbols.
2013-06-12Set/restore rounding mode only when neededSiddhesh Poyarekar2-14/+214
The most common use case of math functions is with default rounding mode, i.e. rounding to nearest. Setting and restoring rounding mode is an unnecessary overhead for this, so I've added support for a context, which does the set/restore only if the FP status needs a change. The code is written such that only x86 uses these. Other architectures should be unaffected by it, but would definitely benefit if the set/restore has as much overhead relative to the rest of the code, as the x86 bits do. Here's a summary of the performance improvement due to these improvements; I've only mentioned functions that use the set/restore and have benchmark inputs for x86_64: Before: cos(): ITERS:4.69335e+08: TOTAL:28884.6Mcy, MAX:4080.28cy, MIN:57.562cy, 16248.6 calls/Mcy exp(): ITERS:4.47604e+08: TOTAL:28796.2Mcy, MAX:207.721cy, MIN:62.385cy, 15543.9 calls/Mcy pow(): ITERS:1.63485e+08: TOTAL:28879.9Mcy, MAX:362.255cy, MIN:172.469cy, 5660.86 calls/Mcy sin(): ITERS:3.89578e+08: TOTAL:28900Mcy, MAX:704.859cy, MIN:47.583cy, 13480.2 calls/Mcy tan(): ITERS:7.0971e+07: TOTAL:28902.2Mcy, MAX:1357.79cy, MIN:388.58cy, 2455.55 calls/Mcy After: cos(): ITERS:6.0014e+08: TOTAL:28875.9Mcy, MAX:364.283cy, MIN:45.716cy, 20783.4 calls/Mcy exp(): ITERS:5.48578e+08: TOTAL:28764.9Mcy, MAX:191.617cy, MIN:51.011cy, 19071.1 calls/Mcy pow(): ITERS:1.70013e+08: TOTAL:28873.6Mcy, MAX:689.522cy, MIN:163.989cy, 5888.18 calls/Mcy sin(): ITERS:4.64079e+08: TOTAL:28891.5Mcy, MAX:6959.3cy, MIN:36.189cy, 16062.8 calls/Mcy tan(): ITERS:7.2354e+07: TOTAL:28898.9Mcy, MAX:1295.57cy, MIN:380.698cy, 2503.7 calls/Mcy So the improvements are: cos: 27.9089% exp: 22.6919% pow: 4.01564% sin: 19.1585% tan: 1.96086% The downside of the change is that it will have an adverse performance impact on non-default rounding modes, but I think the tradeoff is justified.
2013-06-11Add exception information to math-tests.h and use it in libm-test.inc.Joseph Myers1-0/+18
2013-06-11PowerPC: Merge ports/ dl-procinfo.[ch] with base.Ryan S. Arnold2-11/+35
2013-06-11Fix symbol definitions for __clock_* functionsSiddhesh Poyarekar6-14/+15
__clock_gettime and other __clock_* functions could result in an extra PLT reference within libc.so if it actually gets used. None of the code currently uses them, which is why this probably went unnoticed.
2013-06-10Add rounding mode information to math-tests.h and use it in libm-test.inc.Joseph Myers1-0/+18
2013-06-08Avoid trailing whitespace in sysdeps/gnu/errlist.c.Joseph Myers2-10/+10
2013-06-08Use (void) in no-arguments function definitions.Joseph Myers21-27/+27
2013-06-07Avoid use of "register" as optimization hint.Joseph Myers7-16/+16
2013-06-06Fix leading whitespaces.Ondrej Bilka42-83/+83
2013-06-05Remove trailing whitespace.Joseph Myers156-800/+800
2013-06-05Skip modifying exception mask and flags in SET_RESTORE_ROUND_53BITSiddhesh Poyarekar1-6/+6
We only need to set/restore rounding mode to ensure correct computation for non-default rounding modes.
2013-05-31Link extra-libs consistently with libc and ld.so.Joseph Myers2-6/+0
2013-05-30 [BZ #14256]Jeff Law1-5/+6
* manual/errno.texi (ESTALE): Update to account for more than just NFS file systems. * sysdeps/gnu/errlist.c: Regenerated.
2013-05-29Avoid crashing in LD_DEBUG when program name is unavailableSiddhesh Poyarekar10-21/+15
Resolves: #15465 The program name may be unavailable if the user application tampers with argc and argv[]. Some parts of the dynamic linker caters for this while others don't, so this patch consolidates the check and fallback into a single macro and updates all users.
2013-05-28Update powerpc libm-test ULPs.Adhemerval Zanella1-0/+37
2013-05-26_dl_skip_args declaration cleanup.Thomas Schwinge1-1/+0
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start:go): Don't declare _dl_skip_args. Continuation of commit 8347c74cc5c972aa9e57747177b1f5f4b1cbcac8.
2013-05-26_dl_non_dynamic_init declaration cleanup.Thomas Schwinge1-3/+0
* sysdeps/mach/hurd/i386/init-first.c (_dl_non_dynamic_init): Don't declare. Continuation of commit bc16e260d0e74b36e48d30edc6ea4f1152700c09.
2013-05-24Fix ldbl-96 hypotl of subnormals (bug 15529).Joseph Myers1-1/+1