about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
* S390: Unify 31/64bit memcpy.Stefan Liebler2018-12-189-281/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of memcpy/mempcpy for s390-32 (31bit) and s390-64 (64bit) is nearly the same. This patch unifies it for maintability reasons. __mem[p]cpy_z10 and __mem[p]cpy_z196 differs between 31 and 64bit: -31bit needs .machinemode "zarch_nohighgprs" and llgfr %r4,%r4 -lr vs lgr; lgr can be also used on 31bit as this ifunc variant is only called if we are on a zarch machine. __mem[p]cpy_default differs between 31 and 64bit: -Some 31bit vs 64bit instructions (e.g. ltr vs ltgr. Solved with 31/64 specific instruction macros). -The address of mvc instruction is setup in different ways (larl vs bras). Solved with #if defined __s390x__. __memcpy_mvcle differs between 31 and 64bit: -lr vs lgr; ahi vs aghi; Solved with 31/64bit specific instruction macros. Otherwise 31/64bit implementation has the same structure of the code. ChangeLog: * sysdeps/s390/s390-64/memcpy.S: Move to ... * sysdeps/s390/memcpy.S: ... here. Adjust to be usable for 31/64bit. * sysdeps/s390/s390-32/memcpy.S: Delete File. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add memcpy. * sysdeps/s390/s390-32/multiarch/Makefile: Delete file. * sysdeps/s390/s390-64/multiarch/Makefile: Likewise. * sysdeps/s390/s390-64/multiarch/memcpy-s390x.S: Move to ... * sysdeps/s390/multiarch/memcpy-s390x.S: ... here. Adjust to be usable for 31/64bit. * sysdeps/s390/s390-32/multiarch/memcpy-s390.S: Delete File. * sysdeps/s390/s390-64/multiarch/memcpy.c: Move to ... * sysdeps/s390/multiarch/memcpy.c: ... here. * sysdeps/s390/s390-32/multiarch/memcpy.c: Delete File.
* S390: Refactor memcmp ifunc handling.Stefan Liebler2018-12-187-148/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves all ifunc variants for memcmp to sysdeps/s390/memcmp-z900.S. The configure-check/preprocessor logic in sysdeps/s390/ifunc-memcmp.h decides if ifunc is needed at all and which ifunc variants should be available. E.g. if the compiler/assembler already supports z196 by default, the older ifunc variants are not included. If we only need the newest ifunc variant, then we can skip ifunc at all. Therefore the ifunc-resolvers and __libc_ifunc_impl_list are adjusted in order to handle only the available ifunc variants. ChangeLog: * sysdeps/s390/ifunc-memcmp.h: New File. * sysdeps/s390/memcmp.S: Move to ... * sysdeps/s390/memcmp-z900.S ... here. Move implementations from memcmp-s390x.s to here. * sysdeps/s390/multiarch/memcmp-s390x.S: Delete File. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Remove memcmp variants. * sysdeps/s390/Makefile (sysdep_routines): Add memcmp variants. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Adjust ifunc variants for memcmp. * sysdeps/s390/multiarch/memcmp.c: Move ifunc resolver to ... * sysdeps/s390/memcmp.c: ... here. Adjust ifunc variants for memcmp.
* S390: Unify 31/64bit memcmp.Stefan Liebler2018-12-189-219/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of memcmp for s390-32 (31bit) and s390-64 (64bit) is nearly the same. This patch unifies it for maintability reasons. __memcmp_z10 and __memcmp_z196 differs between 31 and 64bit: -31bit needs .machinemode "zarch_nohighgprs" and llgfr %r4,%r4 -lr vs lgr and some other instructions: But lgr and co can be also used on 31bit as this ifunc variant is only called if we are on a zarch machine. __memcmp_default differs between 31 and 64bit: -Some 31bit vs 64bit instructions (e.g. ltr vs ltgr. Solved with 31/64 specific instruction macros). -The address of mvc instruction is setup in different ways (larl vs bras). Solved with #if defined __s390x__. Otherwise 31/64bit implementation has the same structure of the code. ChangeLog: * sysdeps/s390/s390-64/memcmp.S: Move to ... * sysdeps/s390/memcmp.S: ... here. Adjust to be usable for 31/64bit. * sysdeps/s390/s390-32/memcmp.S: Delete File. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add memcmp. * sysdeps/s390/s390-32/multiarch/Makefile (sysdep_routines): Remove memcmp. * sysdeps/s390/s390-64/multiarch/Makefile: Likewise. * sysdeps/s390/s390-64/multiarch/memcmp-s390x.S: Move to ... * sysdeps/s390/multiarch/memcmp-s390x.S: ... here. Adjust to be usable for 31/64bit. * sysdeps/s390/s390-32/multiarch/memcmp-s390.S: Delete File. * sysdeps/s390/s390-64/multiarch/memcmp.c: Move to ... * sysdeps/s390/multiarch/memcmp.c: ... here. * sysdeps/s390/s390-32/multiarch/memcmp.c: Delete File.
* S390: Implement bzero with memset.Stefan Liebler2018-12-186-68/+89
| | | | | | | | | | | | | | | | | This patch removes the bzero s390 implementation with mvcle and adds entry points for bzero in memset ifunc variants. Therefore an ifunc resolver is implemented for bzero, too. ChangeLog: * sysdeps/s390/s390-32/bzero.S: Delete file. * sysdeps/s390/s390-64/bzero.S: Likewise. * sysdeps/s390/Makefile (sysdep_routines): Add bzero. * sysdeps/s390/bzero.c: New file. * sysdeps/s390/memset-z900.S: Add bzero entry points. * sysdeps/s390/ifunc-memset.h: Add bzero function macros. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add bzero ifunc variants.
* S390: Refactor memset ifunc handling.Stefan Liebler2018-12-187-146/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves all ifunc variants for memset to sysdeps/s390/memset-z900.S. The configure-check/preprocessor logic in sysdeps/s390/ifunc-memset.h decides if ifunc is needed at all and which ifunc variants should be available. E.g. if the compiler/assembler already supports z196 by default, the older ifunc variants are not included. If we only need the newest ifunc variant, then we can skip ifunc at all. Therefore the ifunc-resolvers and __libc_ifunc_impl_list are adjusted in order to handle only the available ifunc variants. ChangeLog: * sysdeps/s390/ifunc-memset.h: New File. * sysdeps/s390/memset.S: Move to ... * sysdeps/s390/memset-z900.S ... here. Move implementations from memset-s390x.s to here. * sysdeps/s390/multiarch/memset-s390x.S: Delete File. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Remove memset variants. * sysdeps/s390/Makefile (sysdep_routines): Add memset variants. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Adjust ifunc variants for memset. * sysdeps/s390/multiarch/memset.c: Move ifunc resolver to ... * sysdeps/s390/memset.c: ... here. Adjust ifunc variants for memset.
* S390: Unify 31/64bit memset.Stefan Liebler2018-12-189-230/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of memset for s390-32 (31bit) and s390-64 (64bit) is nearly the same. This patch unifies it for maintability reasons. __memset_z10 and __memset_z196 differs between 31 and 64bit: -31bit needs .machinemode "zarch_nohighgprs" and llgfr %r4,%r4 -lr vs lgr and some other instructions: But lgr and co can be also used on 31bit as this ifunc variant is only called if we are on a zarch machine. __memset_default differs between 31 and 64bit: -Some 31bit vs 64bit instructions (e.g. ltr vs ltgr. Solved with 31/64 specific instruction macros). -The address of mvc instruction is setup in different ways (larl vs bras). Solved with #if defined __s390x__. Otherwise 31/64bit implementation has the same structure of the code. ChangeLog: * sysdeps/s390/s390-64/memset.S: Move to ... * sysdeps/s390/memset.S: ... here. Adjust to be usable for 31/64bit. * sysdeps/s390/s390-32/memset.S: Delete File. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add memset. * sysdeps/s390/s390-32/multiarch/Makefile (sysdep_routines): Remove memset. * sysdeps/s390/s390-64/multiarch/Makefile: Likewise. * sysdeps/s390/s390-64/multiarch/memset-s390x.S: Move to ... * sysdeps/s390/multiarch/memset-s390x.S: ... here. Adjust to be usable for 31/64bit. * sysdeps/s390/s390-32/multiarch/memset-s390.S: Delete File. * sysdeps/s390/s390-64/multiarch/memset.c: Move to ... * sysdeps/s390/multiarch/memset.c: ... here. * sysdeps/s390/s390-32/multiarch/memset.c: Delete File.
* S390: Use hwcap instead of dl_hwcap in ifunc-resolvers.Stefan Liebler2018-12-181-6/+6
| | | | | | | | | | | | | | | The renaming of hwcap arguments in ifunc-resolvers is needed in order to prepare for further commits which refactors ifunc handling for memset, memcmp, and memcpy. Now you are able to use s390_libc_ifunc_init which stores the stfle bits within the expression for an ifunc-resolver generated by s390_libc_ifunc_expr. ChangeLog: * sysdeps/s390/multiarch/ifunc-resolve.h (s390_libc_ifunc_init, s390_libc_ifunc, s390_vx_libc_ifunc2_redirected): Use hwcap instead of dl_hwcap.
* S390: Add configure check to detect z10 as mininum architecture level set.Stefan Liebler2018-12-182-0/+68
| | | | | | | | | | Add a configure check for z10 in the same way as done for z196. ChangeLog: * config.h.in (HAVE_S390_MIN_Z10_ZARCH_ASM_SUPPORT): New undefine. * sysdeps/s390/configure.ac: Add check for z10 support. * sysdeps/s390/configure: Regenerated.
* x86: Merge i386/x86_64 atomic-machine.hH.J. Lu2018-12-182-621/+165
| | | | | | | | | | Merge i386 and x86_64 atomic-machine.h to x86 atomic-machine.h. Tested on i686 and x86_64 as well as with build-many-glibcs.py. * sysdeps/i386/atomic-machine.h: Merged with ... * sysdeps/x86_64/atomic-machine.h: To ... * sysdeps/x86/atomic-machine.h: This. New file.
* Do not clobber r12 for ia64 syscalls.Joseph Myers2018-12-171-1/+1
| | | | | | | | | | | | | GCC mainline now gives errors for an asm that clobbers the stack pointer. According to <https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00932.html> GCC previously ignored such a clobber; thus, this patch removes it from the clobbers for ia64 syscalls. Tested with build-many-glibcs.py for ia64-linux-gnu. * sysdeps/unix/sysv/linux/ia64/sysdep.h (ASM_CLOBBERS_6_COMMON): Do not clobber r12.
* Add test that MAP_* constants agree with kernel.Joseph Myers2018-12-172-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the process of building up and using Python infrastructure for extracting and using values in headers, this patch adds a test that MAP_* constants from sys/mman.h agree with those in the Linux kernel headers. (Other sys/mman.h constants could be added to the test separately.) This set of constants has grown over time, so the generic code is enhanced to allow saying extra constants are OK on either side of the comparison (where the caller sets those parameters based on the Linux kernel headers version, compared with the version the headers were last updated from). Although the test is a custom Python file, my intention is to move in future to a single Python script for such tests and text files it takes as inputs, once there are enough examples to provide a guide to the common cases in such tests (I'd like to end up with most or all such sets of constants copied from kernel headers having such tests, and likewise for structure layouts from the kernel). The Makefile code is essentially the same as for tst-signal-numbers, but I didn't try to find an object file to depend on to represent the dependency on the headers used by the test (the conform/ tests don't try to represent such header dependencies at all, for example). Tested with build-many-glibcs.py, and also for x86_64 with older kernel headers. * scripts/glibcextract.py (compare_macro_consts): Take parameters to allow extra macros from first or second sources. * sysdeps/unix/sysv/linux/tst-mman-consts.py: New file. * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc] (tests-special): Add $(objpfx)tst-mman-consts.out. ($(objpfx)tst-mman-consts.out): New makefile target.
* Add statx conditionals for wordsize-32 *xstat.cMao Han2018-12-1713-6/+169
| | | | | | | | | | | | | | | | | | | | | | | Linux kernel have remove stat64 family from default syscall set, new implementations with statx is needed when __ARCH_WANT_STAT64 is not define. This patch add conditionals for relevant functions, using statx system call to get information and then copy to the return buf, ref to include/linux/fs.h from linux kernel. * sysdeps/unix/sysv/linux/Makefile: Add statx_cp.c. * sysdeps/unix/sysv/linux/fxstat64.c: Add conditionals for kernel without stat64 system call support. * sysdeps/unix/sysv/linux/fxstatat64.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/statx_cp.c: New file. * sysdeps/unix/sysv/linux/statx_cp.c: Likewise. * sysdeps/unix/sysv/linux/statx_cp.h: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/statx_cp.c: Likewise.
* Remove x86 mathinline.h asinh, acosh, atanh inlines.Joseph Myers2018-12-141-13/+0
| | | | | | | | | | | | | | | Continuing the removal of bits/mathinline.h inlines that would better be done by the compiler, this patch removes x86 inlines for asinh, acosh and atanh functions (only for fast-math, non-SSE 32-bit x86). I've filed <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88502> for adding such inlines as an optimization in GCC. Tested for x86_64 and x86. * sysdeps/x86/fpu/bits/mathinline.h (asinh): Remove inline definition. (acosh): Likewise. (atanh): Likewise.
* Do not clobber sp in _hurd_stack_setup.Joseph Myers2018-12-131-1/+1
| | | | | | | | | | | | | GCC mainline now gives errors for an asm that clobbers the stack pointer. According to <https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00932.html> GCC previously ignored such a clobber; thus, this patch removes it from _hurd_stack_setup. Tested with build-many-glibcs.py for i686-gnu. * sysdeps/mach/hurd/i386/init-first.c (_hurd_stack_setup): Do not clobber sp.
* x86: Add Hygon Dhyana support.Carlos O'Donell2018-12-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fix Hygon Dhyana processor CPU Vendor ID detection problem in glibc sysdep module, current glibc codes doesn't recognize Dhyana CPU Vendor ID("HygonGenuine") and set kind to arch_kind_other, which result to incorrect zero value for __cache_sysconf() syscall. As Hygon Dhyana share most architecture feature as AMD Family 17h, this patch add Hygon CPU Vendor ID check and setup kind to arch_kind_amd and reuse AMD code path, which lead to correct return value in __cache_sysconf() syscall. we run the glibc test suite for both Hygon Dhyana and AMD EPYC and found no failure case. Background: Chengdu Haiguang IC Design Co., Ltd (Hygon) is a Joint Venture between AMD and Haiguang Information Technology Co.,Ltd., aims at providing high performance x86 processor for China server market. Its first generation processor codename is Dhyana, which originates from AMD technology and shares most of the architecture with AMD's family 17h, but with different CPU Vendor ID("HygonGenuine")/Family series number(Family 18h). Related Hygon kernel patch can be found on http://lkml.kernel.org/r/5ce86123a7b9dad925ac583d88d2f921040e859b.1538583282.git.puwen@hygon.cn Signed-off-by: fanjinke <fanjinke@hygon.cn> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Remove x86 mathinline.h hypot inline.Joseph Myers2018-12-121-4/+0
| | | | | | | | | | | | | Continuing the removal of bits/mathinline.h inlines that would better be done by the compiler, this patch removes an x86 inline for hypot functions (only for fast-math, only for non-SSE 32-bit x86). I've filed <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88474> for adding such an inline as an optimization in GCC. Tested for x86_64 and x86. * sysdeps/x86/fpu/bits/mathinline.h (hypot): Remove inline definition.
* timespec_get (posix): Fix copyright headerFlorian Weimer2018-12-121-1/+1
| | | | | | | The “any later version” clause was missing. This change was approved in principle by the FSF in RT ticket #1316403. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* powerpc: Add missing CFI register information (bug #23614)Tulio Magno Quites Machado Filho2018-12-123-18/+38
| | | | | | | | | | | | | | Add CFI information about the offset of registers stored in the stack frame. [BZ #23614] * sysdeps/powerpc/powerpc64/addmul_1.S (FUNC): Add CFI offset for registers saved in the stack frame. * sysdeps/powerpc/powerpc64/lshift.S (__mpn_lshift): Likewise. * sysdeps/powerpc/powerpc64/mul_1.S (__mpn_mul_1): Likewise. Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
* Fix powf overflow handling in non-nearest rounding mode [BZ #23961]Szabolcs Nagy2018-12-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | The threshold value at which powf overflows depends on the rounding mode and the current check did not take this into account. So when the result was rounded away from zero it could become infinity without setting errno to ERANGE. Example: pow(0x1.7ac7cp+5, 23) is 0x1.fffffep+127 + 0.1633ulp If the result goes above 0x1.fffffep+127 + 0.5ulp then errno is set, which is fine in nearest rounding mode, but powf(0x1.7ac7cp+5, 23) is inf in upward rounding mode powf(-0x1.7ac7cp+5, 23) is -inf in downward rounding mode and the previous implementation did not set errno in these cases. The fix tries to avoid affecting the common code path or calling a function that may introduce a stack frame, so float arithmetics is used to check the rounding mode and the threshold is selected accordingly. [BZ #23961] * math/auto-libm-test-in: Add new test case. * math/auto-libm-test-out-pow: Regenerated. * sysdeps/ieee754/flt-32/e_powf.c (__powf): Fix overflow check.
* Move tst-signal-numbers to Python.Joseph Myers2018-12-103-90/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the tst-signal-numbers test from shell + awk to Python. As with gen-as-const, the point is not so much that shell and awk are problematic for this code, as that it's useful to build up general infrastructure in Python for use of a range of code involving extracting values from C headers. This patch moves some code from gen-as-const.py to a new glibcextract.py, which also gains functions relating to listing macros, and comparing the values of a set of macros from compiling two different pieces of code. It's not just signal numbers that should have such tests; pretty much any case where glibc copies constants from Linux kernel headers should have such tests that the values and sets of constants agree except where differences are known to be OK. Much the same also applies to structure layouts (although testing those without hardcoding lists of fields to test will be more complicated). Given this patch, another test for a set of macros would essentially be just a call to glibcextract.compare_macro_consts (plus boilerplate code - and we could move to having separate text files defining such tests, like the .sym inputs to gen-as-const, so that only a single Python script is needed for most such tests). Some such tests would of course need new features, e.g. where the set of macros changes in new kernel versions (so you need to allow new macro names on the kernel side if the kernel headers are newer than the version known to glibc, and extra macros on the glibc side if the kernel headers are older). tst-syscall-list.sh could become a Python script that uses common code to generate lists of macros but does other things with its own custom logic. There are a few differences from the existing shell + awk test. Because the new test evaluates constants using the compiler, no special handling is needed any more for one signal name being defined to another. Because asm/signal.h now needs to pass through the compiler, not just the preprocessor, stddef.h is included as well (given the asm/signal.h issue that it requires an externally provided definition of size_t). The previous code defined __ASSEMBLER__ with asm/signal.h; this is removed (__ASSEMBLY__, a different macro, eliminates the requirement for stddef.h on some but not all architectures). Tested for x86_64, and with build-many-glibcs.py. * scripts/glibcextract.py: New file. * scripts/gen-as-const.py: Do not import os.path, re, subprocess or tempfile. Import glibcexctract. (compute_c_consts): Remove. Moved to glibcextract.py. (gen_test): Update reference to compute_c_consts. (main): Likewise. * sysdeps/unix/sysv/linux/tst-signal-numbers.py: New file. * sysdeps/unix/sysv/linux/tst-signal-numbers.sh: Remove. * sysdeps/unix/sysv/linux/Makefile ($(objpfx)tst-signal-numbers.out): Use tst-signal-numbers.py. Redirect stderr as well as stdout.
* Enable VDSO for static linking on mipsRafael Ávila de Espíndola2018-12-105-10/+13
| | | | | | | | | | | | | | | | | I have tested that this builds and the resulting program still work. This was tested on gcc23.fsffrance.org, and for some reason the vdso there seems unused even when using shared libraries. [BZ #19767] * sysdeps/unix/sysv/linux/mips/init-first.c: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/mips/libc-vdso.h: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Define ALWAYS_USE_VSYSCALL. * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Define ALWAYS_USE_VSYSCALL. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Define ALWAYS_USE_VSYSCALL.
* compat getdents64: Use correct offset for retry [BZ #23972]Florian Weimer2018-12-102-3/+17
| | | | | d_off is the offset of the *next* entry, not the offset of the current entry.
* Move *-le.abilist to le/*.abilistAndreas Schwab2018-12-1027-4/+0
| | | | | Now that powerpc is using separate sysdep dirs for BE vs LE ABI, there is no need for abilist-pattern any more.
* Fix potential stack overflow [BZ #23490]Paul Pluzhnikov2018-12-081-2/+2
| | | | | Since we are expecting the exact "IBT" string, adjust stack buffer size and scanf format accordingly.
* hurd: Fix linknamespace of spawniSamuel Thibault2018-12-071-2/+2
| | | | | | | | | * include/unistd.h (__confstr): Add prototype and hidden prototype. * posix/confstr.c (confstr): Rename to __confstr. (__confstr): Add hidden def. (confstr): Add weak alias for __confstr. * sysdeps/mach/hurd/spawni.c (__spawni): Call __confstr instead of confstr.
* Add getcpuH.J. Lu2018-12-0731-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add #include <sched.h> int getcpu (unsigned int *cpu, unsigned int *node); to return currently used CPU and NUMA node. Tested on x86-64, x32 and i686 as well as with build-many-glibcs.py. * NEWS: Mention getcpu. * include/sched.h (__getcpu): New libc_hidden_proto. * manual/resource.texi: Document getcpu. * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add getcpu. * sysdeps/unix/sysv/linux/Versions (GLIBC_2.29): Add getcpu. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Add getcpu. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/bits/sched.h (getcpu): New prototype. * sysdeps/unix/sysv/linux/getcpu.c: New file. * sysdeps/unix/sysv/linux/tst-skeleton-affinity.c (test_size): Also check getcpu.
* hurd: Implement support for posix_spawn_file_actions_addfchdir_npSamuel Thibault2018-12-071-0/+44
|
* posix: New function posix_spawn_file_actions_addfchdir_np [BZ #17405]Florian Weimer2018-12-0729-0/+37
| | | | | | Along with posix_spawn_file_actions_addchdir, posix_spawn_file_actions_addfchdir is the subject of a change proposal for POSIX: <http://austingroupbugs.net/view.php?id=1208>
* Use PRINTF_LDBL_IS_DBL instead of __ldbl_is_dbl.Zack Weinberg2018-12-054-276/+238
| | | | | | | | | After all that prep work, nldbl-compat.c can now use PRINTF_LDBL_IS_DBL instead of __no_long_double to control the behavior of printf-like functions; this is the last thing we needed __no_long_double for, so it can go away entirely. Tested for powerpc and powerpc64le.
* Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319)Zack Weinberg2018-12-053-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The _chk variants of all of the printf functions become much simpler. This is the last thing that we needed _IO_acquire_lock_clear_flags2 for, so it can go as well. I took the opportunity to make the headers included and the names of all local variables consistent across all the affected files. Since we ultimately want to get rid of __no_long_double as well, it must be possible to get all of the nontrivial effects of the _chk functions by calling the _internal functions with appropriate flags. For most of the __(v)xprintf_chk functions, this is covered by PRINTF_FORTIFY plus some up-front argument checks that can be duplicated. However, __(v)sprintf_chk installs a custom jump table so that it can crash instead of overflowing the output buffer. This functionality is moved to __vsprintf_internal, which now has a 'maxlen' argument like __vsnprintf_internal; to get the unsafe behavior of ordinary (v)sprintf, pass -1 for that argument. obstack_printf_chk and obstack_vprintf_chk are no longer in the same file. As a side-effect of the unification of both fortified and non-fortified vdprintf initialization, this patch fixes bug 11319 for __dprintf_chk and __vdprintf_chk, which was previously fixed only for dprintf and vdprintf by the commit commit 7ca890b88e6ab7624afb1742a9fffb37ad5b3fc3 Author: Ulrich Drepper <drepper@redhat.com> Date: Wed Feb 24 16:07:57 2010 -0800 Fix reporting of I/O errors in *dprintf functions. This patch adds a test case to avoid regressions. Tested for powerpc and powerpc64le.
* Add __vsyslog_internal, with same flags as __v*printf_internal.Zack Weinberg2018-12-051-1/+1
| | | | | | | | | | __nldbl___vsyslog_chk will ultimately want to pass PRINTF_LDBL_IS_DBL down to __vfprintf_internal *as well as* possibly setting PRINTF_FORTIFY. To make that possible, we need a __vsyslog_internal that takes the same flags as printf. The code in misc/syslog.c does also get a little simpler. Tested for powerpc and powerpc64le.
* Add __v*printf_internal with flags argumentsZack Weinberg2018-12-051-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a lot more printf variants than there are scanf variants, and the code for setting up and tearing down their custom FILE variants around the call to __vf(w)printf is more complicated and variable. Therefore, I have added _internal versions of all the v*printf variants, rather than introducing helper routines so that they can all directly call __vf(w)printf_internal, as was done with scanf. As with the scanf changes, in this patch the _internal functions still look at the environmental mode bits and all callers pass 0 for the flags parameter. Several of the affected public functions had _IO_ name aliases that were not exported (but, in one case, appeared in libio.h anyway); I was originally planning to leave them as aliases to avoid having to touch internal callers, but it turns out ldbl_*_alias only work for exported symbols, so they've all been removed instead. It also turns out there were hardly any internal callers. _IO_vsprintf and _IO_vfprintf *are* exported, so those two stick around. Summary for the changes to each of the affected symbols: _IO_vfprintf, _IO_vsprintf: All internal calls removed, thus the internal declarations, as well as uses of libc_hidden_proto and libc_hidden_def, were also removed. The external symbol is now exposed via uses of ldbl_strong_alias to __vfprintf_internal and __vsprintf_internal, respectively. _IO_vasprintf, _IO_vdprintf, _IO_vsnprintf, _IO_vfwprintf, _IO_vswprintf, _IO_obstack_vprintf, _IO_obstack_printf: All internal calls removed, thus declaration in internal headers were also removed. They were never exported, so there are no aliases tying them to the internal functions. I.e.: entirely gone. __vsnprintf: Internal calls were always preceded by macros such as #define __vsnprintf _IO_vsnprintf, and #define __vsnprintf vsnprintf The macros were removed and their uses replaced with calls to the new internal function __vsnprintf_internal. Since there were no internal calls, the internal declaration was also removed. The external symbol is preserved with ldbl_weak_alias to ___vsnprintf. __vfwprintf: All internal calls converted into calls to __vfwprintf_internal, thus the internal declaration was removed. The function is now a wrapper that calls __vfwprintf_internal. The external symbol is preserved. __vswprintf: Similarly, but no external symbol. __vasprintf, __vdprintf, __vfprintf, __vsprintf: New internal wrappers. Not exported. vasprintf, vdprintf, vfprintf, vsprintf, vsnprintf, vfwprintf, vswprintf, obstack_vprintf, obstack_printf: These functions used to be aliases to the respective _IO_* function, they are now aliases to their respective __* functions. Tested for powerpc and powerpc64le.
* Use SCANF_LDBL_IS_DBL instead of __ldbl_is_dbl.Zack Weinberg2018-12-051-130/+121
| | | | | | | | | | Change the callers of __vfscanf_internal and __vfwscanf_internal that want to treat 'long double' as another name for 'double' (all of which happen to be in sysdeps/ieee754/ldbl-opt/nldbl-compat.c) to communicate this via the new flags argument, instead of the per-thread variable __no_long_double and its __ldbl_is_dbl wrapper macro. Tested for powerpc and powerpc64le.
* Add __vfscanf_internal and __vfwscanf_internal with flags arguments.Zack Weinberg2018-12-053-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two flags currently defined: SCANF_LDBL_IS_DBL is the mode used by __nldbl_ scanf variants, and SCANF_ISOC99_A is the mode used by __isoc99_ scanf variants. In this patch, the new functions honor these flag bits if they're set, but they still also look at the corresponding bits of environmental state, and callers all pass zero. The new functions do *not* have the "errp" argument possessed by _IO_vfscanf and _IO_vfwscanf. All internal callers passed NULL for that argument. External callers could theoretically exist, so I preserved wrappers, but they are flagged as compat symbols and they don't preserve the three-way distinction among types of errors that was formerly exposed. These functions probably should have been in the list of deprecated _IO_ symbols in 2.27 NEWS -- they're not just aliases for vfscanf and vfwscanf. (It was necessary to introduce ldbl_compat_symbol for _IO_vfscanf. Please check that part of the patch very carefully, I am still not confident I understand all of the details of ldbl-opt.) This patch also introduces helper inlines in libio/strfile.h that encapsulate the process of initializing an _IO_strfile object for reading. This allows us to call __vfscanf_internal directly from sscanf, and __vfwscanf_internal directly from swscanf, without duplicating the initialization code. (Previously, they called their v-counterparts, but that won't work if we want to control *both* C99 mode and ldbl-is-dbl mode using the flags argument to__vfscanf_internal.) It's still a little awkward, especially for wide strfiles, but it's much better than what we had. Tested for powerpc and powerpc64le.
* Enable VDSO for static linking on armRafael Ávila de Espíndola2018-12-033-10/+8
| | | | | | | | | | | | I have tested that this builds and the resulting program still work. The kernel in gcc117 (which I ussed for testing) seems to be missing https://patchwork.kernel.org/patch/10060431/, so the vdso is never used. [BZ #19767] * sysdeps/unix/sysv/linux/arm/init-first.c: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/arm/libc-vdso.h: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/arm/sysdep.h: Define ALWAYS_USE_VSYSCALL.
* posix: Fix segfault in maybe_script_executeAdhemerval Zanella2018-12-031-1/+1
| | | | | | | | | | | | This patch is essentially 28669f86f6 adjusted for the generic implementation. Checked on x86_64-linux-gnu with Linux spawni.c removed. The only failure is posix/tst-spawn3, which is expected. [BZ #23913] * sysdeps/posix/spawni.c (maybe_script_execute): Increment size of new_argv by one.
* x86: Extend CPUID support in struct cpu_featuresH.J. Lu2018-12-036-245/+1249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend CPUID support for all feature bits from CPUID. Add a new macro, CPU_FEATURE_USABLE, which can be used to check if a feature is usable at run-time, instead of HAS_CPU_FEATURE and HAS_ARCH_FEATURE. Add COMMON_CPUID_INDEX_D_ECX_1, COMMON_CPUID_INDEX_80000007 and COMMON_CPUID_INDEX_80000008 to check CPU feature bits in them. Tested on i686 and x86-64 as well as using build-many-glibcs.py with x86 targets. * sysdeps/x86/cacheinfo.c (intel_check_word): Updated for cpu_features_basic. (__cache_sysconf): Likewise. (init_cacheinfo): Likewise. * sysdeps/x86/cpu-features.c (get_extended_indeces): Also populate COMMON_CPUID_INDEX_80000007 and COMMON_CPUID_INDEX_80000008. (get_common_indices): Also populate COMMON_CPUID_INDEX_D_ECX_1. Use CPU_FEATURES_CPU_P (cpu_features, XSAVEC) to check if XSAVEC is available. Set the bit_arch_XXX_Usable bits. (init_cpu_features): Use _Static_assert on index_arch_Fast_Unaligned_Load. __get_cpuid_registers and __get_arch_feature. Updated for cpu_features_basic. Set stepping in cpu_features. * sysdeps/x86/cpu-features.h: (FEATURE_INDEX_1): Changed to enum. (FEATURE_INDEX_2): New. (FEATURE_INDEX_MAX): Changed to enum. (COMMON_CPUID_INDEX_D_ECX_1): New. (COMMON_CPUID_INDEX_80000007): Likewise. (COMMON_CPUID_INDEX_80000008): Likewise. (cpuid_registers): Likewise. (cpu_features_basic): Likewise. (CPU_FEATURE_USABLE): Likewise. (bit_arch_XXX_Usable): Likewise. (cpu_features): Use cpuid_registers and cpu_features_basic. (bit_arch_XXX): Reweritten. (bit_cpu_XXX): Likewise. (index_cpu_XXX): Likewise. (reg_XXX): Likewise. * sysdeps/x86/tst-get-cpu-features.c: Include <stdio.h> and <support/check.h>. (CHECK_CPU_FEATURE): New. (CHECK_CPU_FEATURE_USABLE): Likewise. (cpu_kinds): Likewise. (do_test): Print vendor, family, model and stepping. Check HAS_CPU_FEATURE and CPU_FEATURE_USABLE. (TEST_FUNCTION): Removed. Include <support/test-driver.c> instead of "../../test-skeleton.c". * sysdeps/x86_64/multiarch/sched_cpucount.c (__sched_cpucount): Check POPCNT instead of POPCOUNT. * sysdeps/x86_64/multiarch/test-multiarch.c (do_test): Likewise.
* htl: Fix comparing attr with default valuesSamuel Thibault2018-12-014-4/+4
| | | | | | | | | | | | | | | | Fortunately we were previously only missing an optimization. Thanks dcb <dcb314@hotmail.com> for the report [BZ #23032] * sysdeps/htl/pt-barrier-init.c (pthread_barrier_init): Fix comparing attr with __pthread_default_barrierattr. * sysdeps/htl/pt-cond-init.c (__pthread_cond_init): Fix comparing attr with __pthread_default_condattr. * sysdeps/htl/pt-mutex-init.c (_pthread_mutex_init): Fix comparing attr with __pthread_default_mutexattr. * sysdeps/htl/pt-rwlock-init.c (_pthread_rwlock_init): Fix comparing attr with __pthread_default_rwlockattr.
* Mutex: Add pthread mutex tunablesKemi Wang2018-12-012-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does not have any functionality change, we only provide a spin count tunes for pthread adaptive spin mutex. The tunable glibc.pthread.mutex_spin_count tunes can be used by system administrator to squeeze system performance according to different hardware capabilities and workload characteristics. The maximum value of spin count is limited to 32767 to avoid the overflow of mutex->__data.__spins variable with the possible type of short in pthread_mutex_lock (). The default value of spin count is set to 100 with the reference to the previous number of times of spinning via trylock. This value would be architecture-specific and can be tuned with kinds of benchmarks to fit most cases in future. I would extend my appreciation sincerely to H.J.Lu for his help to refine this patch series. * manual/tunables.texi (POSIX Thread Tunables): New node. * nptl/Makefile (libpthread-routines): Add pthread_mutex_conf. * nptl/nptl-init.c: Include pthread_mutex_conf.h (__pthread_initialize_minimal_internal) [HAVE_TUNABLES]: Call __pthread_tunables_init. * nptl/pthreadP.h (MAX_ADAPTIVE_COUNT): Remove. (max_adaptive_count): Define. * nptl/pthread_mutex_conf.c: New file. * nptl/pthread_mutex_conf.h: New file. * sysdeps/generic/adaptive_spin_count.h: New file. * sysdeps/nptl/dl-tunables.list: New file. * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Use max_adaptive_count () not MAX_ADAPTIVE_COUNT. * nptl/pthread_mutex_timedlock.c (__pthrad_mutex_timedlock): Likewise. Suggested-by: Andi Kleen <andi.kleen@intel.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Signed-off-by: Kemi.wang <kemi.wang@intel.com>
* Enable VDSO on i386 statically linked programsRafael Ávila de Espíndola2018-11-302-7/+8
| | | | | | | [BZ #19767] * sysdeps/unix/sysv/linux/i386/init-first.c: Don't check SHARED. * sysdeps/unix/sysv/linux/i386/sysdep.h (ALWAYS_USE_VSYSCALL): New.
* scripts/abilist.awk: Handle special _end symbol for HurdFlorian Weimer2018-11-301-1/+1
| | | | | | | | Hurd has this in libc.so: 0024db9c g D .bss 00000000 GLIBC_2.2.6 _end This g/D combination was not recognized before.
* posix: Use posix_spawn on systemAdhemerval Zanella2018-11-308-255/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch uses posix_spawn on system implementation. On Linux this has the advantage of much lower memory consumption (usually 32 Kb minimum for the mmap stack area). Although POSIX does not require, glibc system implementation aims to be thread and cancellation safe. The cancellation code is moved to generic implementation and enabled iff SIGCANCEL is defined (similar on how the cancellation handler is enabled on nptl-init.c). Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/spawni.c (__spawni_child): Use __sigismember instead of sigismember. * sysdeps/posix/system.c [SIGCANCEL] (cancel_handler_args, cancel_handler): New definitions. (CLEANUP_HANDLER, CLEANUP_RESET): Likewise. (DO_LOCK, DO_UNLOCK, INIT_LOCK, ADD_REF, SUB_REF): Remove. (do_system): Use posix_spawn instead of fork and execl and remove reentracy code. * sysdeps/generic/not-errno.h (__kill_noerrno): New prototype. * sysdeps/unix/sysv/linux/not-errno.h (__kill_noerrno): Likewise. * sysdeps/unix/sysv/linux/ia64/system.c: Remove file. * sysdeps/unix/sysv/linux/s390/system.c: Likewise. * sysdeps/unix/sysv/linux/sparc/system.c: Likewise. * sysdeps/unix/sysv/linux/system.c: Likewise.
* hurd: Fix returning value for fcntl(F_*LK*)Samuel Thibault2018-11-301-6/+4
| | | | | | | to avoid calling va_end again, etc. * sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Directly return value returned by __f_setlk.
* S390: Regenerate ULPs.Stefan Liebler2018-11-281-12/+8
| | | | | | | | | Regenerated ulps from scratch as builds with gcc 5.5 / 6.4 resulted in +1 ulps. ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.
* Fix Hurd build with read-only source directory.Joseph Myers2018-11-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for generating sysdeps/mach/hurd/bits/errno.h involves a stamp file and $(move-if-change). The temporary file (generated unconditionally) is generated in the source directory. This means that even if sysdeps/mach/hurd/bits/errno.h is up to date, and has an up to date timestamp, the build will fail if the source directory is read-only. Even with a writable source directory, multiple concurrent builds for i686-gnu with the same source directory could race to access the temporary file (which always has the same name). This patch uses the build directory for the temporary file instead to avoid those problems. (In the case where the file is out of date and the temporary file does need to be moved to the source directory, if there are multiple concurrent builds for i686-gnu with the same source directory, and the source and build directories are on different filesystems, it's possible there might still be races replacing the file in the source directory, depending on exactly how mv handles such cross-filesystem moves. This is certainly no worse than the present situation, where such a case would have races regardless of whether the file is out of date or whether different filesystems are in use.) Tested with a build-many-glibcs.py build for i686-gnu. * sysdeps/mach/hurd/Makefile ($(common-objpfx)stamp-errnos): Use $(hurd-objpfx)bits/errno.h-tmp, not $(hurd)/bits/errno.h-tmp.
* CVE-2018-19591: if_nametoindex: Fix descriptor for overlong name [BZ #23927]Florian Weimer2018-11-271-5/+6
|
* Enable VDSO for static linking on aarch64Rafael Ávila de Espíndola2018-11-273-10/+8
| | | | | | | | [BZ #19767] * sysdeps/unix/sysv/linux/aarch64/init-first.c: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/aarch64/libc-vdso.h: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/aarch64/sysdep.h (ALWAYS_USE_VSYSCALL): Define.
* Enable VDSO on powerpc statically linked programs (bug 19767)Rafael Ávila de Espíndola2018-11-264-9/+10
| | | | | | | | | | | | | [BZ #19767] * sysdeps/unix/sysv/linux/powerpc/init-first.c: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/powerpc/libc-vdso.h: Remove #ifdef SHARED. Include sysdep.h. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Define ALWAYS_USE_VSYSCALL. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Define ALWAYS_USE_VSYSCALL. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* Enable VDSO on x86_64 statically linked programs [BZ #19767]Rafael Ávila de Espíndola2018-11-237-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the required code already existed, and some of it was already running. AT_SYSINFO_EHDR is processed if NEED_DL_SYSINFO_DSO is defined, but it looks like it always is. The call to setup_vdso is also unconditional, so all that was left to do was setup the function pointers and use them. This patch just deletes some #ifdef to enable that. [BZ #19767] * nptl/Makefile (tests-static): Add tst-cond11-static. (tests): Likewise. * nptl/tst-cond11-static.c: New File. * sysdeps/unix/sysv/linux/Makefile (tests-static): Add tst-affinity-static. (tests): Likewise. * sysdeps/unix/sysv/linux/sysdep-vdso.h: Check USE_VSYSCALL instead of SHARED. * sysdeps/unix/sysv/linux/sysdep.h (ALWAYS_USE_VSYSCALL): New. (USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/tst-affinity-static.c: New file. * sysdeps/unix/sysv/linux/x86/libc-vdso.h: Check USE_VSYSCALL instead of SHARED. * sysdeps/unix/sysv/linux/x86_64/init-first.c: Don't check SHARED. * sysdeps/unix/sysv/linux/x86_64/sysdep.h (ALWAYS_USE_VSYSCALL): New.
* Fix Arm __ASSUME_COPY_FILE_RANGE (bug 23915).Joseph Myers2018-11-231-3/+4
| | | | | | | | | | | | | | | | | The generic kernel-features.h defines __ASSUME_COPY_FILE_RANGE for 4.5 and later kernels. However, for 32-bit Arm binaries running on 64-bit Arm kernels, the syscall was only wired up in the 4.7 kernel, although the 32-bit Arm kernel had the syscall from 4.5 onwards. This patch corrects the Arm kernel-features.h to undefine the macro for configured minimum kernel versions before 4.7. Tested (compilation only) with a build-many-glibcs.py build for arm-linux-gnueabi. [BZ #23915] * sysdeps/unix/sysv/linux/arm/kernel-features.h [__LINUX_KERNEL_VERSION < 0x040700] (__ASSUME_COPY_FILE_RANGE): Undefine.