about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/aarch64
Commit message (Collapse)AuthorAgeFilesLines
* Implement the mlock2 functionFlorian Weimer2017-11-271-0/+1
| | | | | | Fallback using mlock is provided if the flags argument is zero. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Add _Float64x function aliases.Joseph Myers2017-11-272-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch continues filling out TS 18661-3 support by adding *f64x function aliases on platforms with _Float64x support. (It so happens the set of such platforms is exactly the same as the set of platforms with _Float128 support, although on x86_64, x86 and ia32 the _Float64x format is Intel extended rather than binary128.) The API provided corresponds exactly to that provided for _Float128, mostly coming from TS 18661-3. As these functions always alias those for another type (long double, _Float128 or both), __* function names are not provided, as in other cases of alias types. Given the preparation done in previous patches, this one just enables the feature via Makeconfig and bits/floatn.h, adds symbol versions, and updates documentation and ABI baselines. The symbol versions are present unconditionally as GLIBC_2.27 in the relevant Versions files, as it's OK for those to specify versions for functions that may not be present in some configurations; no additional complexity is needed unless in future some configuration gains support for this type that didn't have such support in 2.27. The Makeconfig additions for ia64 and x86 aren't strictly needed, as those configurations also get float64x-alias-fcts definitions from sysdeps/ieee754/float128/Makeconfig, but still seem appropriate given that _Float64x is not _Float128 for those configurations. A libm-test-ulps update for x86 is included. This is because bits/mathinline.h does not have _Float64x support added and for two functions the use of out-of-line functions results in increased ulps (ifloat64x shares ulps with ildouble / ifloat128 as appropriate). Given that we'd like generally to eliminate bits/mathinline.h optimizations, preferring to have such optimizations in GCC instead, it seems reasonable not to add such support there for new types. GCC support for _FloatN / _FloatNx built-in functions is limited, but has been improved in GCC 8, and at some point I hope the full set of libm built-in functions in GCC, and other optimizations with per-floating-type aspects, will be enabled for all _FloatN / _FloatNx types. Tested for x86_64 and x86, and with build-many-glibcs.py, with both GCC 6 and GCC 7. * sysdeps/ia64/Makeconfig (float64x-alias-fcts): New variable. * sysdeps/ieee754/float128/Makeconfig (float64x-alias-fcts): Likewise. * sysdeps/ieee754/ldbl-128/Makeconfig (float64x-alias-fcts): Likewise. * sysdeps/x86/Makeconfig: New file. * bits/floatn-common.h (__HAVE_FLOAT64X): Remove macro. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * bits/floatn.h (__HAVE_FLOAT64X): New macro. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * sysdeps/ia64/bits/floatn.h (__HAVE_FLOAT64X): Likewise. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * sysdeps/ieee754/ldbl-128/bits/floatn.h (__HAVE_FLOAT64X): Likewise. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * sysdeps/mips/ieee754/bits/floatn.h (__HAVE_FLOAT64X): Likewise. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * sysdeps/powerpc/bits/floatn.h (__HAVE_FLOAT64X): Likewise. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * sysdeps/x86/bits/floatn.h (__HAVE_FLOAT64X): Likewise. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * manual/math.texi (Mathematics): Document support for _Float64x. * math/Versions (GLIBC_2.27): Add _Float64x functions. * stdlib/Versions (GLIBC_2.27): Likewise. * wcsmbs/Versions (GLIBC_2.27): Likewise. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.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/powerpc/powerpc64/libc-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise. * sysdeps/i386/fpu/libm-test-ulps: Likewise. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise.
* Linux: Add memfd_create system call wrapperFlorian Weimer2017-11-231-0/+1
| | | | | | | | | | | | | | The system call is somewhat obscure because it is closely related to file descriptor sealing. However, it is also the recommended way to create alias mappings, which is why it has more general use. No emulation is provided. Except for the name of the /proc/self/fd links, it would be possible to implement an approximation using O_TMPFILE and tmpfs, but this does not appear to be worth the added complexity. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
* aarch64: Optimized memset for falkorSiddhesh Poyarekar2017-11-202-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic memset reads dczid_el0 on every memset. This has a significant impact on falkor for a range of sizes because reading dczid_el0 is slow. The DZP bit in the dczid_el0 register does not change dynamically, so it is safe to read once during program startup. With this patch dczid_el0 is read once during startup and zva_size is cached. This is used to invoke the falkor-specific memset; the generic memset routine remains unchanged. The gains due to this are significant for falkor, with run time reductions as high as 48%. Here's a sample from the falkor tests: Function: memset Variant: walk simple_memset __memset_falkor __memset_generic ===================================================================== length=256, char=0: 139.96 (-698.28%) 9.07 ( 48.26%) 17.53 length=257, char=0: 140.50 (-699.03%) 9.53 ( 45.80%) 17.58 length=258, char=0: 140.96 (-703.95%) 9.58 ( 45.36%) 17.53 length=259, char=0: 141.56 (-705.16%) 9.53 ( 45.79%) 17.58 length=260, char=0: 142.15 (-710.76%) 9.57 ( 45.39%) 17.53 length=261, char=0: 142.50 (-710.39%) 9.53 ( 45.78%) 17.58 length=262, char=0: 142.97 (-715.09%) 9.57 ( 45.42%) 17.54 length=263, char=0: 143.51 (-716.18%) 9.53 ( 45.80%) 17.58 length=264, char=0: 143.93 (-720.55%) 9.58 ( 45.39%) 17.54 length=265, char=0: 144.56 (-722.07%) 9.53 ( 45.80%) 17.59 length=266, char=0: 144.98 (-726.42%) 9.58 ( 45.42%) 17.54 length=267, char=0: 145.53 (-727.53%) 9.53 ( 45.80%) 17.59 length=268, char=0: 146.25 (-731.81%) 9.53 ( 45.79%) 17.58 length=269, char=0: 146.52 (-735.39%) 9.53 ( 45.66%) 17.54 length=270, char=0: 146.97 (-735.81%) 9.53 ( 45.80%) 17.58 length=271, char=0: 147.54 (-741.08%) 9.58 ( 45.38%) 17.54 length=512, char=0: 268.26 (-1307.85%) 12.06 ( 36.71%) 19.05 length=513, char=0: 268.73 (-1273.89%) 13.56 ( 30.68%) 19.56 length=514, char=0: 269.31 (-1276.89%) 13.56 ( 30.68%) 19.56 length=515, char=0: 269.73 (-1279.05%) 13.56 ( 30.68%) 19.56 length=516, char=0: 270.34 (-1282.24%) 13.56 ( 30.67%) 19.56 length=517, char=0: 270.83 (-1284.71%) 13.56 ( 30.66%) 19.56 length=518, char=0: 271.20 (-1286.54%) 13.56 ( 30.67%) 19.56 length=519, char=0: 271.67 (-1288.67%) 13.65 ( 30.24%) 19.56 length=520, char=0: 272.14 (-1291.04%) 13.65 ( 30.22%) 19.56 length=521, char=0: 272.66 (-1293.69%) 13.65 ( 30.23%) 19.56 length=522, char=0: 273.14 (-1296.13%) 13.65 ( 30.20%) 19.56 length=523, char=0: 273.64 (-1298.75%) 13.65 ( 30.23%) 19.56 length=524, char=0: 274.34 (-1302.16%) 13.66 ( 30.20%) 19.57 length=525, char=0: 274.64 (-1297.78%) 13.56 ( 30.99%) 19.65 length=526, char=0: 275.20 (-1300.04%) 13.56 ( 31.01%) 19.66 length=527, char=0: 275.66 (-1302.86%) 13.56 ( 30.99%) 19.65 length=1024, char=0: 524.46 (-2169.75%) 20.12 ( 12.92%) 23.11 length=1025, char=0: 525.14 (-2124.63%) 21.62 ( 8.40%) 23.61 length=1026, char=0: 525.59 (-2125.36%) 21.88 ( 7.37%) 23.62 length=1027, char=0: 525.98 (-2127.14%) 21.62 ( 8.46%) 23.62 length=1028, char=0: 526.68 (-2131.10%) 21.62 ( 8.42%) 23.61 length=1029, char=0: 527.10 (-2131.70%) 21.79 ( 7.73%) 23.62 length=1030, char=0: 527.54 (-2118.51%) 21.62 ( 9.10%) 23.78 length=1031, char=0: 527.98 (-2136.37%) 21.62 ( 8.43%) 23.61 length=1032, char=0: 528.70 (-2139.38%) 21.62 ( 8.43%) 23.61 length=1033, char=0: 529.25 (-2124.37%) 21.62 ( 9.11%) 23.79 length=1034, char=0: 529.48 (-2142.95%) 21.62 ( 8.43%) 23.61 length=1035, char=0: 530.11 (-2145.13%) 21.62 ( 8.44%) 23.61 length=1036, char=0: 530.76 (-2147.10%) 21.79 ( 7.73%) 23.62 length=1037, char=0: 531.03 (-2149.45%) 21.62 ( 8.42%) 23.61 length=1038, char=0: 531.64 (-2151.87%) 21.62 ( 8.42%) 23.61 length=1039, char=0: 531.99 (-2151.63%) 21.80 ( 7.75%) 23.63 * sysdeps/aarch64/memset-reg.h: New file. * sysdeps/aarch64/memset.S: Use it. (__memset): Rename to MEMSET macro. [ZVA_MACRO]: Use zva_macro. * sysdeps/aarch64/multiarch/Makefile (sysdep_routines): Add memset_generic and memset_falkor. * sysdeps/aarch64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add memset ifuncs. * sysdeps/aarch64/multiarch/init-arch.h (INIT_ARCH): New local variable zva_size. * sysdeps/aarch64/multiarch/memset.c: New file. * sysdeps/aarch64/multiarch/memset_generic.S: New file. * sysdeps/aarch64/multiarch/memset_falkor.S: New file. * sysdeps/aarch64/multiarch/rtld-memset.S: New file. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (DCZID_DZP_MASK): New macro. (DCZID_BS_MASK): Likewise. (init_cpu_features): Read and set zva_size. * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (struct cpu_features): New member zva_size.
* Add AArch64 HWCAP_DCPOP from Linux 4.14.Joseph Myers2017-11-171-0/+1
| | | | | | | | | | This patch adds the HWCAP_DCPOP macro from Linux 4.14 to the AArch64 bits/hwcap.h. Tested (compilation only) for aarch64 with build-many-glibcs.py. * sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h (HWCAP_DCPOP): New macro.
* Add jmp_buf-macros.hH.J. Lu2017-11-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verify that sizes, alignments and field offsets of jmp_buf as well as sigjmp_buf are unchanged regardless how struct __jmp_buf_tag is defined. Since jmp_buf is target specific, jmp_buf-macros.h is added for each Linux target. A new target must provides its own jmp_buf-macros.h. TODO: Hurd needs to provide a jmp_buf-macros.h. Tested with build-many-glibcs.py. * include/setjmp.h [!_ISOMAC]: Include <stddef.h> and <jmp_buf-macros.h>. [!_ISOMAC] (STR_HELPER): New. [!_ISOMAC] (STR): Likewise. [!_ISOMAC] (TEST_SIZE): Likewise. [!_ISOMAC] (TEST_ALIGN): Likewise. [!_ISOMAC] (TEST_OFFSET): Likewise. [!_ISOMAC] Add _Static_assert to check sizes, alignments and field offsets of jmp_buf as well as sigjmp_buf. * sysdeps/unix/sysv/linux/aarch64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/alpha/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/arm/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/hppa/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/i386/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/ia64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/m68k/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/nios2/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/sh/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/jmp_buf-macros.h: Likewise.
* aarch64: Guess L1 cache linesize for aarch64Richard Henderson2017-11-031-0/+55
| | | | | | | Using the cache hierarchy linesize minimum in CTR_EL0. See the comment within the code for rationale. * sysdeps/unix/sysv/linux/aarch64/sysconf.c: New file.
* Add _Float128 function aliases.Joseph Myers2017-10-182-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for *f128 function aliases on platforms where long double has the binary128 format (and thus GCC 7 provides the _Float128 type with the same ABI as long double but as a distinct type in terms of C type compatibility). This is the same API as provided in glibc 2.26 for powerpc64le / x86_64 / x86 / ia64 where _Float128 has a different format from long double, with the bulk of the API coming from TS 18661-3. All the functions alias the corresponding long double functions, and __* function names are not provided since those are only needed once for each floating-point format, not more than once for different types with the same format (so for example, -ffinite-math-only maps foof128 to __fool_finite, while type-generic macros end up calling e.g. __issignalingl for _Float128 arguments on such platforms). The preparation for this feature was done in previous patches, so this one just needs to add the relevant makefile and header definitions, and update macro definitions of libm_alias_ldouble_other_r, to turn on the feature, and update documentation and ABI baselines. Tested (a) for x86_64, (b) for aarch64, (c) with build-many-glibcs.py with both GCC 6 and GCC 7. * sysdeps/ieee754/ldbl-128/Makeconfig: New file. * sysdeps/ieee754/ldbl-128/bits/floatn.h: Likewise. * sysdeps/ieee754/ldbl-128/float128-abi.h: Likewise. * sysdeps/generic/libm-alias-ldouble.h: Include <bits/floatn.h>. [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (libm_alias_ldouble_other_r): Also create _Float128 alias. * sysdeps/ieee754/ldbl-opt/libm-alias-ldouble.h: Include <bits/floatn.h>. [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (libm_alias_ldouble_other_r): Also create _Float128 alias. * manual/math.texi (Mathematics): Document additional architecture support for _Float128. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.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/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
* Linux: Consolidate {RTLD_}SINGLE_THREAD_P definitionAdhemerval Zanella2017-10-112-48/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current GLIBC has two ways to implement the single thread optimization on syscalls to avoid calling the cancellation path: either by using global variables (__{libc,pthread}_multiple_thread) or by accessing the TCB field (defined by TLS_MULTIPLE_THREADS_IN_TCB). Both the variables and the macros to acces its value are defined in the architecture sysdep-cancel.h header. This patch consolidates its definition on only one header, sysdeps/unix/sysv/linux/sysdep-cancel.h, and adds a new define (SINGLE_THREAD_BY_GLOBAL) which the architecture defines if it prefer to use the global variables instead of the TCB field. This is an optimization, so if the architecture does not define it, the TCB method will be used as default. Checked on x86_64-linux-gnu and on a build with major touched ABIs (aarch64-linux-gnu, alpha-linux-gnu, arm-linux-gnueabihf, hppa-linux-gnu, i686-linux-gnu, m68k-linux-gnu, microblaze-linux-gnu, mips-linux-gnu, mips64-linux-gnu, powerpc-linux-gnu, powerpc64le-linux-gnu, s390-linux-gnu, s390x-linux-gnu, sh4-linux-gnu, sparcv9-linux-gnu, sparc64-linux-gnu, tilegx-linux-gnu). * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Remove file. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Define. * sysdeps/unix/sysv/linux/aarch64/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise. * sysdeps/unix/sysv/linux/arm/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise.
* New symbol version for logf, log2f and powf without SVID compatSzabolcs Nagy2017-10-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the logf, log2f and powf error handling semantics to only set errno accoring to POSIX rules. New symbol version is introduced at GLIBC_2.27. The old wrappers are kept for compat symbols. ia64 needed assembly change to have the new and compat versioned symbol map to the same function. All linux libm abilists are updated. * math/Versions (logf): New libm symbol at GLIBC_2.27. (log2f): Likewise. (powf): Likewise. * math/w_log2f.c: New file. * math/w_logf.c: New file. * math/w_powf.c: New file. * math/w_log2f_compat.c (__log2f_compat): For compat symbol only. * math/w_logf_compat.c (__logf_compat): Likewise. * math/w_powf_compat.c (__powf_compat): Likewise. * sysdeps/ia64/fpu/e_log2f.S: Add versioned symbols. * sysdeps/ia64/fpu/e_logf.S: Likewise. * sysdeps/ia64/fpu/e_powf.S: Likewise. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Update. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
* Hide internal __ioctl function [BZ #18822]H.J. Lu2017-10-011-0/+1
| | | | | | | | | | | | | | | | | | Hide internal __ioctl function to allow direct access within libc.so and libc.a without using GOT nor PLT. __GI___ioctl is defined when sysdeps/unix/syscalls.list is used to generate ioctl. Otherwise libc_hidden_def is needed explicitly. [BZ #18822] * include/sys/ioctl.h (__ioctl): Add libc_hidden_proto. * misc/ioctl.c (__ioctl): Add libc_hidden_def. * sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise. * sysdeps/unix/sysv/linux/aarch64/ioctl.S (__ioctl): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Likewise. * sysdeps/unix/sysv/linux/powerpc/ioctl.c (__ioctl): Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S (__ioctl): Likewise.
* posix: Add compat glob symbol to not follow dangling symbolsAdhemerval Zanella2017-09-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch follows commit 5554304f0 (posix: Allow glob to match dangling symlinks [BZ #866]) by adding a compat symbol that follow previous semantic of not following dangling symlinks and thus avoiding call gl_lstat with GLOB_ALTDIRFUNC. It avoids failure with old binaries that not set the alternate function pointer for lstat (GNUmake for instance). The following scenario, for instance, fails with current GNUmake because glibc will access unitialized memory when calling gl_lstat: $ cat src/t/t.c int main () { return 0; } $ cat Makefile SRC = $(wildcard src/*/t.c) OBJ = $(patsubst src/%.c, obj/%.o, $(SRC)) prog: $(OBJ) $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) $(OBJ) -o prog obj/%.o: src/%.c $(CC) $(CFLAGS) -c $< -o $@ $ make This works as expected with the patch applied. Since it is for generic ABI, default compat symbols are added with override for Linux due LFS. Now we have two compat symbols for glob on Linux: 1. sysdeps/unix/sysv/linux/oldglob.c which implements glob64 with the old dirent layout. For this implementation I also set it to not follow dangling symlinks (which is the safest path). 2. sysdeps/unix/sysv/linux/glob{64}-lstat-compat.c which implements the compat symbol for dangling symlinks. As for generic glob, the implementation uses XSTAT_IS_XSTAT64 to define whether both __glob_lstat_compat and __glob64_lstat_compat should be different implementations. For archictures that define XSTAT_IS_XSTAT64, __glob_lstat_compat is aliased to __glob64_lstat_compat. 3. sysdeps/unix/sysv/linux/alpha/oldglob.c with a different glob_t layout. As for 1. this patch changes it to not follow dangling symlinks. The patch also bumps _GNU_GLOB_INTERFACE_VERSION to 2 to advertise the new semantic. On GNUmake, for instance, it will force to it use its internal glob implementation instead and avoiding triggering the same failure on builds against newer GLIBCs. Checked on x86_64-linux-gnu and i686-linux-gnu. I also checked with a build against the major ABIs required to check for the abilist. The changes should also work on gnulib (I run gnulib-tool.py check glob and it shown no regressions). [BZ #22183] * include/gnu-versions.h (_GNU_GLOB_INTERFACE_VERSION): Increase version to 2. * posix/Makefile (routines): Add glob-lstat-compat and glob64-lstat-compat. * posix/Versions (GLIBC_2.27, glob, glob64): Add symbol version. * posix/glob-lstat-compat.c: New file. * posix/glob64-lstat-compat.c: Likewise. * posix/tst-glob_lstat_compat.c: Likewise. * sysdeps/unix/sysv/linux/glob-lstat-compat.c: Likewise. * sysdeps/unix/sysv/linux/alpha/glob-lstat-compat.c: Likewise. * sysdeps/unix/sysv/linux/glob64-lstat-compat.c: Likewise. * sysdeps/unix/sysv/linux/alpha/glob.c: Remove file. * posix/glob.c (glob_lstat): New function. (glob): Rename to __glob and add versioned symbol to 2.27. (glob_in_dir): Use glob_lstat. * posix/glob64.c (glob64): Add GLOB_ATTRIBUTE. * sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/glob.c (glob): Add versioned symbol for 2.27. * sysdeps/unix/sysv/linux/glob64.c (glob64): Likewise. * sysdeps/unix/sysv/linux/oldglob.c (GLOB_NO_LSTAT): Define. * sysdeps/unix/sysv/linux/alpha/oldglob.c (__old_glob): Do not use gl_lstat on glob call. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Add GLIBC_2.27 glob and glob64 symbols. * sysdeps/unix/sysv/linux/alpha/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/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/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/tile/tilegx/tilegx32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
* New expf and exp2f version without SVID compat wrapperSzabolcs Nagy2017-09-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the expf and exp2f error handling semantics to only set errno accoring to POSIX rules. New symbol version is introduced at GLIBC_2.27. The old wrappers are kept for compat symbols. Internal calls to __expf now get the new error semantics, this seems to only affect sysdeps/i386/fpu/s_expm1f.S where the errno-only behaviour should be correct. ia64 needed assembly change to have the new and compat versioned symbol map to the same function. All linux libm abilists are updated. * math/Versions (expf): New libm symbol at GLIBC_2.27. (exp2f): Likewise. * math/w_exp2f.c: New file. * math/w_expf.c: New file. * math/w_exp2f_compat.c (__exp2f_compat): For compat symbol only. * math/w_expf_compat.c (__expf_compat): Likewise. * sysdeps/ia64/fpu/e_exp2f.S: Add versioned symbols. * sysdeps/ia64/fpu/e_expf.S: Likewise. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Update. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
* Add thunderx2t99 and thunderx2t99p1 CPU names to tunables listSteve Ellcey2017-09-081-3/+5
| | | | | | | * manual/tunables.texi (glibc.tune.cpu): Add thunderx2t99 and thunderx2t99p1 to list of cpu names. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list): Add thunderx2t99 and thunderx2t99p1 entries to cpu_list.
* Fix glibc.tune.cpu tunable handlingSteve Ellcey2017-09-081-1/+1
| | | | | * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (get_midr_from_mcpu): Use strcmp instead of tunable_is_name.
* Remove NO_CANCELLATION macroAdhemerval Zanella2017-08-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NO_CANCELLATION macro is used currently on generic headers to define non cancellable syscalls and on Linux fcntl to implement the non cancellable variation. Former should be single-handled by not-cancel.h header and former could be simplified build both cancellable and non cancellable for default objects and alias the non-cancellable to default one for rtld ones (since Linux already support cancellation as default). This patch thus removes the NO_CANCELLATION macro and its usage. The generic non cancellable fcntl is route to internal fcntl. Checked on x86_64-linux-gnu and i686-linux-gnu. Also checked with a build again major ABIs. * sysdeps/generic/not-cancel.h (NO_CANCELLATION): Remove macro. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (NO_CANCELLATION): Likewise * sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/not-cancel.h (__fcntl_nocancel): Add hidden prototype. * sysdeps/unix/sysv/linux/fcntl.c (__fcntl_nocancel): Define only for !IS_IN (rtld) and remove NO_CANCELLATION usage.
* Fix mcontext_t sigcontext namespace (bug 21457).Joseph Myers2017-08-302-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch completes the ucontext.h namespace fixes by fixing issues related to the use of struct sigcontext as mcontext_t, and inclusion of <bits/sigcontext.h> even when struct sigcontext is not so used. Inclusion of <bits/sigcontext.h> by <sys/ucontext.h> is removed; the way to get the sigcontext structure is by including <signal.h> (in a context where __USE_MISC is defined); the sysdeps/generic version of sys/ucontext.h keeps the inclusion by necessity, with a comment about how this is not namespace-clean, but the only configuration that used it, MicroBlaze, gets its own version of the header in this patch. Where mcontext_t was typedefed to struct sigcontext, the contents of struct sigcontext are inserted (with appropriate namespace handling to prefix fields with __ when __USE_MISC is not defined); review should check that this has been done correctly in each case, whether the definition of struct sigcontext comes from glibc headers or from the Linux kernel. This changes C++ name mangling on affected architectures (which do not include x86_64/x86). Tested for x86_64, and with build-many-glibcs.py. 2017-08-14 Joseph Myers <joseph@codesourcery.com> [BZ #21457] * sysdeps/arm/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/generic/sys/ucontext.h: Add comment about use of struct sigcontext and namespace requirements. * sysdeps/i386/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/m68k/sys/ucontext.h: Likewise. * sysdeps/mips/sys/ucontext.h: Likewise. Include <bits/types.h>. * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym (oEXTENSION): Use __glibc_reserved1 instead of __reserved. * sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym: Use mcontext_t instead of struct sigcontext. * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/ia64/makecontext.c (__makecontext): Use mcontext_t instead of struct sigcontext. * sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym: Use mcontext_t instead of struct sigcontext. * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): New macro. (struct __ia64_fpreg_mcontext): New type. (mcontext_t): Define structure contents rather than using struct sigcontext. (_SC_GR0_OFFSET): Use mcontext_t instead of struct sigcontext. (uc_sigmask): Define using __ctx. (uc_stack): Likewise. * sysdeps/unix/sysv/linux/ia64/sys/procfs.h: Include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/microblaze/sys/ucontext.h: New file. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Do not include <bits/sigcontext.h>. Include <bits/types.h>. * conform/Makefile (test-xfail-XPG42/signal.h/conform): Remove. (test-xfail-XPG42/sys/wait.h/conform): Likewise. (test-xfail-XPG42/ucontext.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise.
* aarch64: Fix tst-makecontext3 in ILP32 mode.Steve Ellcey2017-08-301-5/+5
| | | | | * sysdeps/unix/sysv/linux/aarch64/makecontext.c (__makecontext): Use pointer to uint64_t instead of long int for sp.
* [AArch64] Fix procfs.h not to expose stdint.h typesSzabolcs Nagy2017-08-291-2/+1
| | | | | | | Commit 39e7a5a66828a60008543db5f03f46dc7081668b added stdint.h to sys/procfs.h, but it is included into signal.h by default and there is code that does not expect stdint.h to be visible there, so use __uint64_t instead of uint64_t.
* Remove abi-*-options compiler flagsFlorian Weimer2017-08-281-3/+0
| | | | | | These options are no longer needed since commit 2dba5ce7b8115d6a2789bf279892263621088e74 (<bits/syscall.h>: Use an arch-independent system call list on Linux).
* [AArch64] Fix elf_greg_t on ILP32Szabolcs Nagy2017-08-251-1/+2
| | | | Use uint64_t instead of unsigned long.
* Remove cancellation support for syscall generationAdhemerval Zanella2017-08-241-91/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the cancellation mark from the auto-generation syscall script. Now all the cancellable syscalls are done throught C code using the SYSCALL_CANCEL macro. It simplifies the assembly required to each architecture port, since the SYSCALL_CANCEL uses the already defined INLINE_SYSCALL macros, and allows a more straigh fix on cancellation machanism (since no more specific assembly fixes will be required). Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.A Also with build-many-glibc.py with remaning touched architectures. * sysdeps/unix/make-syscalls.sh: Remove cancellable tagging for syscall definitions. * sysdeps/unix/syscall-template.S (SYSCALL_CANCELLABLE): Remove definition. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (__local_enable_asynccancel): Likewise. [IS_IN (libpthread)] (__local_disable_asynccancel): Likewise. [IS_IN (libc)] (__local_enable_asynccancel): Likewise. [IS_IN (libc)] (__local_enable_asynccancel): Likewise. [IS_IN (librt)] (__local_disable_asynccancel): Likewise. [IS_IN (librt)] (__local_disable_asynccancel): Likewise. (CENABLE): Likewise. (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Remove defintion. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Remove file. * sysdeps/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h: New file. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Remove file. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h: New file. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
* ld.so: Introduce struct dl_exceptionFlorian Weimer2017-08-101-0/+2
| | | | | | This commit separates allocating and raising exceptions. This simplifies catching and re-raising them because it is no longer necessary to make a temporary, on-stack copy of the exception message.
* aarch64/sys/ptrace.h: fix typo in commentDmitry V. Levin2017-08-101-1/+1
| | | | | * sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h (enum __ptrace_request): Fix typo in comment.
* sys/ptrace.h: remove obsolete Linux PTRACE_SEIZE_DEVEL constant [BZ #21928]Dmitry V. Levin2017-08-091-6/+0
| | | | | | | | | | | | | | | | | | | Remove enum __ptrace_flags along with the only constant it contains, PTRACE_SEIZE_DEVEL, from Linux's sys/ptrace.h files. This temporary development constant shouldn't have been added to sys/ptrace.h in the first place. It was introduced in Linux by commit v3.1-rc1~308^2~28 as a temporary part of new experimental PTRACE_SEIZE interface. Later, as PTRACE_SEIZE stabilized and lost its experimental status, this flag was removed from Linux by commit v3.4-rc1~109^2~20. * sysdeps/unix/sysv/linux/sys/ptrace.h (enum __ptrace_flags, PTRACE_SEIZE_DEVEL): Remove. * sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/s390/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h: Likewise.
* Fix uc_* namespace (bug 21457).Joseph Myers2017-08-091-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The standard members of ucontext_t, in all standard versions with that type, are uc_link, uc_sigmask, uc_stack and uc_mcontext. The uc_* namespace is mostly reserved for additions to the structure. However, in XPG4.2, it's only reserved when <ucontext.h> is included, not when <signal.h> is included, while <signal.h> is required to define ucontext_t (but not allowed to make visible other symbols from <ucontext.h>). Thus, nonstandard members should avoid uc_* names. Some already do use __uc_*, but others don't; most architectures (all except ia64, I think) have a member uc_flags and some have additional members beyond that. This patch makes nonstandard members have an __ prefix unless __USE_MISC is defined. Members whose names indicate they are solely padding / reserved for future use are renamed unconditionally to use the __glibc_reserved1 naming convention. This is part of the preparation for a revised version of the mcontext_t / sigcontext patch to be able to eliminate all 13 of the miscellaneous XFAILs in conform/Makefile, rather than only 11 of them as at present (at least one further fix on top of this one will be needed for that as well). Tested for x86_64, and with build-many-glibcs.py. [BZ #21457] * sysdeps/arm/sys/ucontext.h (__ctx): Move undefine further down. (ucontext_t): Use __ctx with uc_flags. Rename uc_filler to __glibc_reserved1. * sysdeps/generic/sys/ucontext.h (__ctx): New macro. (ucontext_t): Use __ctx with uc_flags. * sysdeps/i386/sys/ucontext.h (__ctx): Move undefine further down. (__ctxt): Likewise. (ucontext_t): Use __ctx with uc_flags. Rename uc_filler to __glibc_reserved1. * sysdeps/m68k/sys/ucontext.h (__ctx): Move undefine further down. (ucontext_t): Use __ctx with uc_flags. Rename uc_filler to __glibc_reserved1. * sysdeps/mips/sys/ucontext.h (__ctx): Move undefine further down. (ucontext_t): Use __ctx with uc_flags. Rename uc_filler to __glibc_reserved1. * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h (__ctx): New macro. (ucontext_t): Use __ctx with uc_flags. * sysdeps/unix/sysv/linux/alpha/sys/ucontext.h (__ctx): New macro. (ucontext_t): Use __ctx with uc_flags. * sysdeps/unix/sysv/linux/arm/sys/ucontext.h (__ctx): New macro. (ucontext_t): Use __ctx with uc_flags and uc_regspace. * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h (__ctx): New macro. (ucontext_t): Use __ctx with uc_flags. * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h (__ctx): Move undefine further down. (ucontext_t): Use __ctx with uc_flags. Rename uc_filler to __glibc_reserved1. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h (__ctx): Move undefine further down. (ucontext_t): Use __ctx with uc_flags. * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h (__ctx): Move undefine further down. (ucontext_t): Use __ctx with uc_flags. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (ucontext_t): Use __ctx with uc_flags, uc_regs_ptr, uc_regs and uc_reg_space. Rename uc_pad to __glibc_reserved1. * sysdeps/unix/sysv/linux/s390/sys/ucontext.h (__ctx): Move undefine further down. (ucontext_t): Use __ctx with uc_flags. * sysdeps/unix/sysv/linux/sh/sys/ucontext.h (__ctx): Move undefine further down. (ucontext_t): Use __ctx with uc_flags. * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h (ucontext_t): Use __ctx with uc_flags. * sysdeps/unix/sysv/linux/tile/sys/ucontext.h (__ctx): New macro. (ucontext_t): Use __ctx with uc_flags. * sysdeps/unix/sysv/linux/x86/sys/ucontext.h (ucontext_t): Use __ctx with uc_flags.
* aarch64: Optimized memcpy for Qualcomm Falkor processorSiddhesh Poyarekar2017-08-092-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an optimized implementation of the memcpy routine that gives a significant gain in performance for all sizes of copies on the Qualcomm Falkor processor. A detailed rationale of the implementation is written in a comment in the patch. This implementation improves time for copies up to 128 bytes by up to 15% and for larger copies by up to 35% in the glibc microbenchmark. The memcpy-random benchmark sees improvements in all sizes in the range of 13%-18%. Here are the full numbers extracted from the glibc microbenchmark using the commands: ../benchtests/scripts/compare_strings.py benchtests/bench-memcpy.out \ ../benchtests/scripts/benchout_strings.schema.json \ -base=__memcpy_generic length align1 align2 ../benchtests/scripts/compare_strings.py benchtests/bench-memcpy-large.out \ ../benchtests/scripts/benchout_strings.schema.json \ -base=__memcpy_generic length align1 align2 ../benchtests/scripts/compare_strings.py benchtests/bench-memcpy-random.out \ ../benchtests/scripts/benchout_strings.schema.json \ -base=__memcpy_generic max-size Function: memcpy __memcpy_thunderx __memcpy_falkor __memcpy_generic Variant: default ================================================================================ length=1,align1=0,align2=0: 33.59 (-115.00%) 15.62 (0.00%) 15.62 length=1,align1=0,align2=0: 16.41 (-10.53%) 14.06 (5.26%) 14.84 length=1,align1=0,align2=0: 14.84 (0.00%) 14.84 (0.00%) 14.84 length=1,align1=0,align2=0: 15.62 (-5.26%) 14.06 (5.26%) 14.84 length=2,align1=0,align2=0: 15.62 (-5.26%) 14.06 (5.26%) 14.84 length=2,align1=1,align2=0: 15.62 (-5.26%) 14.06 (5.26%) 14.84 length=2,align1=0,align2=1: 14.84 (0.00%) 14.06 (5.26%) 14.84 length=2,align1=1,align2=1: 14.84 (-5.56%) 14.06 (0.00%) 14.06 length=4,align1=0,align2=0: 14.06 (0.00%) 14.06 (0.00%) 14.06 length=4,align1=2,align2=0: 14.06 (-5.88%) 14.06 (-5.88%) 13.28 length=4,align1=0,align2=2: 14.06 (0.00%) 14.06 (0.00%) 14.06 length=4,align1=2,align2=2: 14.06 (-5.88%) 14.06 (-5.88%) 13.28 length=8,align1=0,align2=0: 14.84 (-5.56%) 13.28 (5.56%) 14.06 length=8,align1=3,align2=0: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=8,align1=0,align2=3: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=8,align1=3,align2=3: 13.28 (-6.25%) 13.28 (-6.25%) 12.50 length=16,align1=0,align2=0: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=16,align1=4,align2=0: 13.28 (0.00%) 12.50 (5.88%) 13.28 length=16,align1=0,align2=4: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=16,align1=4,align2=4: 13.28 (-6.25%) 12.50 (0.00%) 12.50 length=32,align1=0,align2=0: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=32,align1=5,align2=0: 13.28 (0.00%) 12.50 (5.88%) 13.28 length=32,align1=0,align2=5: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=32,align1=5,align2=5: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=64,align1=0,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=64,align1=6,align2=0: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=64,align1=0,align2=6: 14.06 (5.26%) 14.06 (5.26%) 14.84 length=64,align1=6,align2=6: 14.84 (-11.77%) 14.06 (-5.88%) 13.28 length=128,align1=0,align2=0: 17.19 (-4.76%) 14.84 (9.52%) 16.41 length=128,align1=7,align2=0: 16.41 (4.55%) 15.62 (9.09%) 17.19 length=128,align1=0,align2=7: 16.41 (0.00%) 14.06 (14.29%) 16.41 length=128,align1=7,align2=7: 16.41 (4.55%) 15.62 (9.09%) 17.19 length=256,align1=0,align2=0: 21.88 (-3.70%) 21.09 (0.00%) 21.09 length=256,align1=8,align2=0: 21.09 (-3.85%) 21.09 (-3.85%) 20.31 length=256,align1=0,align2=8: 20.31 (-4.00%) 20.31 (-4.00%) 19.53 length=256,align1=8,align2=8: 21.88 (-7.69%) 20.31 (0.00%) 20.31 length=512,align1=0,align2=0: 28.91 (-2.78%) 28.91 (-2.78%) 28.12 length=512,align1=9,align2=0: 30.47 (-2.63%) 30.47 (-2.63%) 29.69 length=512,align1=0,align2=9: 29.69 (0.00%) 29.69 (0.00%) 29.69 length=512,align1=9,align2=9: 28.12 (-2.86%) 28.12 (-2.86%) 27.34 length=1024,align1=0,align2=0: 44.53 (0.00%) 44.53 (0.00%) 44.53 length=1024,align1=10,align2=0: 50.00 (0.00%) 50.00 (0.00%) 50.00 length=1024,align1=0,align2=10: 49.22 (1.56%) 50.78 (-1.56%) 50.00 length=1024,align1=10,align2=10: 44.53 (-1.79%) 43.75 (0.00%) 43.75 length=2048,align1=0,align2=0: 77.34 (-1.02%) 76.56 (0.00%) 76.56 length=2048,align1=11,align2=0: 89.84 (0.00%) 89.84 (0.00%) 89.84 length=2048,align1=0,align2=11: 89.84 (0.00%) 89.84 (0.00%) 89.84 length=2048,align1=11,align2=11: 75.78 (0.00%) 75.78 (0.00%) 75.78 length=4096,align1=0,align2=0: 141.41 (-0.56%) 140.62 (0.00%) 140.62 length=4096,align1=12,align2=0: 171.09 (-0.46%) 170.31 (0.00%) 170.31 length=4096,align1=0,align2=12: 170.31 (0.00%) 170.31 (0.00%) 170.31 length=4096,align1=12,align2=12: 140.62 (0.00%) 140.62 (0.00%) 140.62 length=8192,align1=0,align2=0: 278.91 (-0.28%) 275.78 (0.84%) 278.12 length=8192,align1=13,align2=0: 338.28 (0.23%) 335.94 (0.92%) 339.06 length=8192,align1=0,align2=13: 338.28 (0.00%) 455.47 (-34.64%) 338.28 length=8192,align1=13,align2=13: 278.12 (-0.28%) 275.78 (0.56%) 277.34 length=16384,align1=0,align2=0: 535.94 (-0.15%) 531.25 (0.73%) 535.16 length=16384,align1=14,align2=0: 659.38 (0.12%) 659.38 (0.12%) 660.16 length=16384,align1=0,align2=14: 659.38 (0.00%) 657.03 (0.36%) 659.38 length=16384,align1=14,align2=14: 535.16 (0.44%) 532.81 (0.87%) 537.50 length=32768,align1=0,align2=0: 1260.94 (10.68%) 1121.88 (20.53%) 1411.72 length=32768,align1=15,align2=0: 1368.75 (10.02%) 1376.56 (9.50%) 1521.09 length=32768,align1=0,align2=15: 1333.59 (10.91%) 1373.44 (8.25%) 1496.88 length=32768,align1=15,align2=15: 1256.25 (13.96%) 1125.78 (22.90%) 1460.16 length=65536,align1=0,align2=0: 2853.91 (30.11%) 2589.06 (36.60%) 4083.59 length=65536,align1=16,align2=0: 2850.00 (30.14%) 2589.84 (36.52%) 4079.69 length=65536,align1=0,align2=16: 2853.12 (30.60%) 2589.84 (37.00%) 4110.94 length=65536,align1=16,align2=16: 2850.78 (30.07%) 2589.06 (36.49%) 4076.56 length=0,align1=0,align2=0: 15.62 (-5.26%) 16.41 (-10.53%) 14.84 length=0,align1=0,align2=0: 14.84 (-5.56%) 14.84 (-5.56%) 14.06 length=0,align1=0,align2=0: 14.84 (0.00%) 14.84 (0.00%) 14.84 length=0,align1=0,align2=0: 16.41 (-16.67%) 14.84 (-5.56%) 14.06 length=1,align1=0,align2=0: 15.62 (4.76%) 15.62 (4.76%) 16.41 length=1,align1=1,align2=0: 15.62 (0.00%) 14.84 (5.00%) 15.62 length=1,align1=0,align2=1: 14.84 (0.00%) 14.84 (0.00%) 14.84 length=1,align1=1,align2=1: 14.84 (0.00%) 14.06 (5.26%) 14.84 length=2,align1=0,align2=0: 14.84 (0.00%) 14.06 (5.26%) 14.84 length=2,align1=2,align2=0: 14.84 (0.00%) 14.06 (5.26%) 14.84 length=2,align1=0,align2=2: 14.84 (-5.56%) 14.06 (0.00%) 14.06 length=2,align1=2,align2=2: 14.84 (0.00%) 14.06 (5.26%) 14.84 length=3,align1=0,align2=0: 14.84 (0.00%) 14.84 (0.00%) 14.84 length=3,align1=3,align2=0: 14.84 (-5.56%) 14.06 (0.00%) 14.06 length=3,align1=0,align2=3: 15.62 (-11.11%) 14.06 (0.00%) 14.06 length=3,align1=3,align2=3: 14.84 (0.00%) 14.06 (5.26%) 14.84 length=4,align1=0,align2=0: 17.97 (-27.78%) 14.06 (0.00%) 14.06 length=4,align1=4,align2=0: 13.28 (5.56%) 14.06 (0.00%) 14.06 length=4,align1=0,align2=4: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=4,align1=4,align2=4: 13.28 (5.56%) 13.28 (5.56%) 14.06 length=5,align1=0,align2=0: 13.28 (5.56%) 13.28 (5.56%) 14.06 length=5,align1=5,align2=0: 14.06 (0.00%) 14.06 (0.00%) 14.06 length=5,align1=0,align2=5: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=5,align1=5,align2=5: 14.06 (-5.88%) 14.06 (-5.88%) 13.28 length=6,align1=0,align2=0: 14.06 (-5.88%) 14.06 (-5.88%) 13.28 length=6,align1=6,align2=0: 14.06 (0.00%) 14.06 (0.00%) 14.06 length=6,align1=0,align2=6: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=6,align1=6,align2=6: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=7,align1=0,align2=0: 14.84 (-11.77%) 14.06 (-5.88%) 13.28 length=7,align1=7,align2=0: 13.28 (0.00%) 14.06 (-5.88%) 13.28 length=7,align1=0,align2=7: 14.06 (0.00%) 14.06 (0.00%) 14.06 length=7,align1=7,align2=7: 14.06 (0.00%) 14.06 (0.00%) 14.06 length=8,align1=0,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=8,align1=8,align2=0: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=8,align1=0,align2=8: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=8,align1=8,align2=8: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=9,align1=0,align2=0: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=9,align1=9,align2=0: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=9,align1=0,align2=9: 13.28 (0.00%) 14.06 (-5.88%) 13.28 length=9,align1=9,align2=9: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=10,align1=0,align2=0: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=10,align1=10,align2=0: 14.06 (-5.88%) 14.06 (-5.88%) 13.28 length=10,align1=0,align2=10: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=10,align1=10,align2=10: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=11,align1=0,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=11,align1=11,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=11,align1=0,align2=11: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=11,align1=11,align2=11: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=12,align1=0,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=12,align1=12,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=12,align1=0,align2=12: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=12,align1=12,align2=12: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=13,align1=0,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=13,align1=13,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=13,align1=0,align2=13: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=13,align1=13,align2=13: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=14,align1=0,align2=0: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=14,align1=14,align2=0: 13.28 (5.56%) 13.28 (5.56%) 14.06 length=14,align1=0,align2=14: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=14,align1=14,align2=14: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=15,align1=0,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=15,align1=15,align2=0: 14.06 (-5.88%) 14.06 (-5.88%) 13.28 length=15,align1=0,align2=15: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=15,align1=15,align2=15: 13.28 (0.00%) 14.06 (-5.88%) 13.28 length=16,align1=0,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=16,align1=16,align2=0: 13.28 (5.56%) 14.06 (0.00%) 14.06 length=16,align1=0,align2=16: 14.84 (-11.77%) 13.28 (0.00%) 13.28 length=16,align1=16,align2=16: 13.28 (-6.25%) 12.50 (0.00%) 12.50 length=17,align1=0,align2=0: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=17,align1=17,align2=0: 14.84 (-11.77%) 12.50 (5.88%) 13.28 length=17,align1=0,align2=17: 14.84 (-5.56%) 12.50 (11.11%) 14.06 length=17,align1=17,align2=17: 14.84 (-11.77%) 12.50 (5.88%) 13.28 length=18,align1=0,align2=0: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=18,align1=18,align2=0: 13.28 (5.56%) 12.50 (11.11%) 14.06 length=18,align1=0,align2=18: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=18,align1=18,align2=18: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=19,align1=0,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=19,align1=19,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=19,align1=0,align2=19: 14.84 (-5.56%) 12.50 (11.11%) 14.06 length=19,align1=19,align2=19: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=20,align1=0,align2=0: 14.84 (-11.77%) 12.50 (5.88%) 13.28 length=20,align1=20,align2=0: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=20,align1=0,align2=20: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=20,align1=20,align2=20: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=21,align1=0,align2=0: 14.84 (-5.56%) 12.50 (11.11%) 14.06 length=21,align1=21,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=21,align1=0,align2=21: 14.84 (-11.77%) 12.50 (5.88%) 13.28 length=21,align1=21,align2=21: 13.28 (5.56%) 13.28 (5.56%) 14.06 length=22,align1=0,align2=0: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=22,align1=22,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=22,align1=0,align2=22: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=22,align1=22,align2=22: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=23,align1=0,align2=0: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=23,align1=23,align2=0: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=23,align1=0,align2=23: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=23,align1=23,align2=23: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=24,align1=0,align2=0: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=24,align1=24,align2=0: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=24,align1=0,align2=24: 14.84 (-11.77%) 12.50 (5.88%) 13.28 length=24,align1=24,align2=24: 14.06 (-5.88%) 13.28 (0.00%) 13.28 length=25,align1=0,align2=0: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=25,align1=25,align2=0: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=25,align1=0,align2=25: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=25,align1=25,align2=25: 13.28 (0.00%) 13.28 (0.00%) 13.28 length=26,align1=0,align2=0: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=26,align1=26,align2=0: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=26,align1=0,align2=26: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=26,align1=26,align2=26: 14.06 (0.00%) 13.28 (5.56%) 14.06 length=27,align1=0,align2=0: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=27,align1=27,align2=0: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=27,align1=0,align2=27: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=27,align1=27,align2=27: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=28,align1=0,align2=0: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=28,align1=28,align2=0: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=28,align1=0,align2=28: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=28,align1=28,align2=28: 14.84 (-11.77%) 13.28 (0.00%) 13.28 length=29,align1=0,align2=0: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=29,align1=29,align2=0: 13.28 (0.00%) 12.50 (5.88%) 13.28 length=29,align1=0,align2=29: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=29,align1=29,align2=29: 13.28 (5.56%) 12.50 (11.11%) 14.06 length=30,align1=0,align2=0: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=30,align1=30,align2=0: 13.28 (5.56%) 12.50 (11.11%) 14.06 length=30,align1=0,align2=30: 14.06 (-5.88%) 12.50 (5.88%) 13.28 length=30,align1=30,align2=30: 13.28 (0.00%) 12.50 (5.88%) 13.28 length=31,align1=0,align2=0: 13.28 (0.00%) 12.50 (5.88%) 13.28 length=31,align1=31,align2=0: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=31,align1=0,align2=31: 13.28 (0.00%) 12.50 (5.88%) 13.28 length=31,align1=31,align2=31: 14.06 (0.00%) 12.50 (11.11%) 14.06 length=48,align1=0,align2=0: 14.06 (0.00%) 14.06 (0.00%) 14.06 length=48,align1=3,align2=0: 14.06 (0.00%) 14.06 (0.00%) 14.06 length=48,align1=0,align2=3: 14.06 (-5.88%) 14.06 (-5.88%) 13.28 length=48,align1=3,align2=3: 13.28 (5.56%) 14.06 (0.00%) 14.06 length=80,align1=0,align2=0: 15.62 (-11.11%) 14.84 (-5.56%) 14.06 length=80,align1=5,align2=0: 15.62 (-11.11%) 16.41 (-16.67%) 14.06 length=80,align1=0,align2=5: 14.06 (0.00%) 15.62 (-11.11%) 14.06 length=80,align1=5,align2=5: 15.62 (-5.26%) 17.19 (-15.79%) 14.84 length=96,align1=0,align2=0: 14.06 (0.00%) 14.84 (-5.56%) 14.06 length=96,align1=6,align2=0: 14.84 (-5.56%) 16.41 (-16.67%) 14.06 length=96,align1=0,align2=6: 14.06 (0.00%) 14.84 (-5.56%) 14.06 length=96,align1=6,align2=6: 14.84 (-5.56%) 17.19 (-22.22%) 14.06 length=112,align1=0,align2=0: 17.19 (-4.76%) 14.06 (14.29%) 16.41 length=112,align1=7,align2=0: 17.19 (0.00%) 16.41 (4.55%) 17.19 length=112,align1=0,align2=7: 16.41 (0.00%) 14.84 (9.52%) 16.41 length=112,align1=7,align2=7: 17.19 (0.00%) 17.19 (0.00%) 17.19 length=144,align1=0,align2=0: 17.19 (-10.00%) 17.97 (-15.00%) 15.62 length=144,align1=9,align2=0: 17.19 (-4.76%) 18.75 (-14.29%) 16.41 length=144,align1=0,align2=9: 20.31 (-8.33%) 18.75 (0.00%) 18.75 length=144,align1=9,align2=9: 18.75 (-4.35%) 18.75 (-4.35%) 17.97 length=160,align1=0,align2=0: 18.75 (-4.35%) 17.97 (0.00%) 17.97 length=160,align1=10,align2=0: 18.75 (4.00%) 18.75 (4.00%) 19.53 length=160,align1=0,align2=10: 19.53 (-4.17%) 17.97 (4.17%) 18.75 length=160,align1=10,align2=10: 18.75 (-4.35%) 18.75 (-4.35%) 17.97 length=176,align1=0,align2=0: 18.75 (-4.35%) 17.19 (4.35%) 17.97 length=176,align1=11,align2=0: 19.53 (0.00%) 19.53 (0.00%) 19.53 length=176,align1=0,align2=11: 19.53 (-4.17%) 18.75 (0.00%) 18.75 length=176,align1=11,align2=11: 18.75 (0.00%) 17.97 (4.17%) 18.75 length=192,align1=0,align2=0: 18.75 (0.00%) 17.97 (4.17%) 18.75 length=192,align1=12,align2=0: 21.09 (-8.00%) 18.75 (4.00%) 19.53 length=192,align1=0,align2=12: 18.75 (0.00%) 18.75 (0.00%) 18.75 length=192,align1=12,align2=12: 18.75 (0.00%) 17.97 (4.17%) 18.75 length=208,align1=0,align2=0: 17.97 (0.00%) 20.31 (-13.04%) 17.97 length=208,align1=13,align2=0: 19.53 (7.41%) 21.09 (0.00%) 21.09 length=208,align1=0,align2=13: 23.44 (-11.11%) 21.09 (0.00%) 21.09 length=208,align1=13,align2=13: 21.09 (-3.85%) 21.09 (-3.85%) 20.31 length=224,align1=0,align2=0: 21.09 (-8.00%) 20.31 (-4.00%) 19.53 length=224,align1=14,align2=0: 23.44 (-11.11%) 20.31 (3.70%) 21.09 length=224,align1=0,align2=14: 21.09 (3.57%) 20.31 (7.14%) 21.88 length=224,align1=14,align2=14: 20.31 (0.00%) 19.53 (3.85%) 20.31 length=240,align1=0,align2=0: 20.31 (-4.00%) 19.53 (0.00%) 19.53 length=240,align1=15,align2=0: 22.66 (0.00%) 20.31 (10.34%) 22.66 length=240,align1=0,align2=15: 20.31 (-4.00%) 20.31 (-4.00%) 19.53 length=240,align1=15,align2=15: 21.88 (0.00%) 21.09 (3.57%) 21.88 length=272,align1=0,align2=0: 20.31 (0.00%) 28.12 (-38.46%) 20.31 length=272,align1=17,align2=0: 22.66 (0.00%) 27.34 (-20.69%) 22.66 length=272,align1=0,align2=17: 25.78 (-10.00%) 28.12 (-20.00%) 23.44 length=272,align1=17,align2=17: 22.66 (-3.57%) 27.34 (-25.00%) 21.88 length=288,align1=0,align2=0: 23.44 (-7.14%) 27.34 (-25.00%) 21.88 length=288,align1=18,align2=0: 22.66 (0.00%) 27.34 (-20.69%) 22.66 length=288,align1=0,align2=18: 23.44 (-3.45%) 25.00 (-10.35%) 22.66 length=288,align1=18,align2=18: 22.66 (-3.57%) 21.88 (0.00%) 21.88 length=304,align1=0,align2=0: 21.88 (0.00%) 21.88 (0.00%) 21.88 length=304,align1=19,align2=0: 23.44 (-3.45%) 22.66 (0.00%) 22.66 length=304,align1=0,align2=19: 22.66 (0.00%) 22.66 (0.00%) 22.66 length=304,align1=19,align2=19: 22.66 (-3.57%) 21.88 (0.00%) 21.88 length=320,align1=0,align2=0: 22.66 (-3.57%) 21.88 (0.00%) 21.88 length=320,align1=20,align2=0: 22.66 (0.00%) 22.66 (0.00%) 22.66 length=320,align1=0,align2=20: 22.66 (0.00%) 22.66 (0.00%) 22.66 length=320,align1=20,align2=20: 22.66 (-3.57%) 21.88 (0.00%) 21.88 length=336,align1=0,align2=0: 21.88 (0.00%) 24.22 (-10.71%) 21.88 length=336,align1=21,align2=0: 22.66 (0.00%) 25.00 (-10.35%) 22.66 length=336,align1=0,align2=21: 25.78 (0.00%) 25.00 (3.03%) 25.78 length=336,align1=21,align2=21: 25.00 (0.00%) 23.44 (6.25%) 25.00 length=352,align1=0,align2=0: 24.22 (0.00%) 24.22 (0.00%) 24.22 length=352,align1=22,align2=0: 25.00 (0.00%) 25.00 (0.00%) 25.00 length=352,align1=0,align2=22: 25.00 (-3.23%) 25.00 (-3.23%) 24.22 length=352,align1=22,align2=22: 25.00 (-3.23%) 24.22 (0.00%) 24.22 length=368,align1=0,align2=0: 25.00 (-3.23%) 23.44 (3.23%) 24.22 length=368,align1=23,align2=0: 25.00 (0.00%) 24.22 (3.12%) 25.00 length=368,align1=0,align2=23: 25.00 (-3.23%) 25.00 (-3.23%) 24.22 length=368,align1=23,align2=23: 25.00 (-6.67%) 23.44 (0.00%) 23.44 length=384,align1=0,align2=0: 24.22 (0.00%) 24.22 (0.00%) 24.22 length=384,align1=24,align2=0: 25.00 (0.00%) 24.22 (3.12%) 25.00 length=384,align1=0,align2=24: 25.00 (0.00%) 25.78 (-3.12%) 25.00 length=384,align1=24,align2=24: 24.22 (-3.33%) 23.44 (0.00%) 23.44 length=400,align1=0,align2=0: 25.00 (-3.23%) 26.56 (-9.68%) 24.22 length=400,align1=25,align2=0: 25.78 (-3.12%) 27.34 (-9.38%) 25.00 length=400,align1=0,align2=25: 27.34 (0.00%) 27.34 (0.00%) 27.34 length=400,align1=25,align2=25: 26.56 (0.00%) 25.78 (2.94%) 26.56 length=416,align1=0,align2=0: 26.56 (-3.03%) 25.78 (0.00%) 25.78 length=416,align1=26,align2=0: 28.12 (-2.86%) 27.34 (0.00%) 27.34 length=416,align1=0,align2=26: 27.34 (-2.94%) 28.12 (-5.88%) 26.56 length=416,align1=26,align2=26: 25.78 (0.00%) 26.56 (-3.03%) 25.78 length=432,align1=0,align2=0: 27.34 (-2.94%) 25.78 (2.94%) 26.56 length=432,align1=27,align2=0: 28.12 (-2.86%) 27.34 (0.00%) 27.34 length=432,align1=0,align2=27: 27.34 (0.00%) 28.12 (-2.86%) 27.34 length=432,align1=27,align2=27: 25.78 (0.00%) 25.78 (0.00%) 25.78 length=448,align1=0,align2=0: 26.56 (-3.03%) 25.78 (0.00%) 25.78 length=448,align1=28,align2=0: 27.34 (0.00%) 27.34 (0.00%) 27.34 length=448,align1=0,align2=28: 27.34 (0.00%) 28.12 (-2.86%) 27.34 length=448,align1=28,align2=28: 25.78 (0.00%) 25.78 (0.00%) 25.78 length=464,align1=0,align2=0: 25.78 (0.00%) 28.12 (-9.09%) 25.78 length=464,align1=29,align2=0: 28.12 (-2.86%) 29.69 (-8.57%) 27.34 length=464,align1=0,align2=29: 30.47 (0.00%) 30.47 (0.00%) 30.47 length=464,align1=29,align2=29: 28.12 (0.00%) 27.34 (2.78%) 28.12 length=480,align1=0,align2=0: 29.69 (-5.56%) 28.12 (0.00%) 28.12 length=480,align1=30,align2=0: 31.25 (-2.56%) 29.69 (2.56%) 30.47 length=480,align1=0,align2=30: 29.69 (0.00%) 30.47 (-2.63%) 29.69 length=480,align1=30,align2=30: 28.12 (0.00%) 28.12 (0.00%) 28.12 length=496,align1=0,align2=0: 28.12 (0.00%) 27.34 (2.78%) 28.12 length=496,align1=31,align2=0: 30.47 (-2.63%) 29.69 (0.00%) 29.69 length=496,align1=0,align2=31: 29.69 (0.00%) 30.47 (-2.63%) 29.69 length=496,align1=31,align2=31: 28.12 (-2.86%) 28.12 (-2.86%) 27.34 length=1024,align1=0,align2=0: 44.53 (0.00%) 44.53 (0.00%) 44.53 length=1024,align1=32,align2=0: 44.53 (-1.79%) 44.53 (-1.79%) 43.75 length=1024,align1=0,align2=32: 44.53 (-1.79%) 43.75 (0.00%) 43.75 length=1024,align1=32,align2=32: 43.75 (1.75%) 43.75 (1.75%) 44.53 length=1056,align1=0,align2=0: 46.88 (-1.69%) 46.88 (-1.69%) 46.09 length=1056,align1=33,align2=0: 53.12 (0.00%) 52.34 (1.47%) 53.12 length=1056,align1=0,align2=33: 52.34 (0.00%) 53.12 (-1.49%) 52.34 length=1056,align1=33,align2=33: 46.09 (0.00%) 46.88 (-1.69%) 46.09 length=1088,align1=0,align2=0: 46.88 (-1.69%) 46.09 (0.00%) 46.09 length=1088,align1=34,align2=0: 52.34 (0.00%) 52.34 (0.00%) 52.34 length=1088,align1=0,align2=34: 53.12 (-3.03%) 53.12 (-3.03%) 51.56 length=1088,align1=34,align2=34: 46.09 (0.00%) 46.88 (-1.69%) 46.09 length=1120,align1=0,align2=0: 49.22 (-1.61%) 48.44 (0.00%) 48.44 length=1120,align1=35,align2=0: 54.69 (1.41%) 55.47 (0.00%) 55.47 length=1120,align1=0,align2=35: 57.03 (0.00%) 55.47 (2.74%) 57.03 length=1120,align1=35,align2=35: 48.44 (0.00%) 49.22 (-1.61%) 48.44 length=1152,align1=0,align2=0: 47.66 (1.61%) 48.44 (0.00%) 48.44 length=1152,align1=36,align2=0: 55.47 (-1.43%) 55.47 (-1.43%) 54.69 length=1152,align1=0,align2=36: 58.59 (-1.35%) 55.47 (4.05%) 57.81 length=1152,align1=36,align2=36: 48.44 (0.00%) 49.22 (-1.61%) 48.44 length=1184,align1=0,align2=0: 53.12 (-3.03%) 50.78 (1.52%) 51.56 length=1184,align1=37,align2=0: 61.72 (-2.60%) 57.03 (5.19%) 60.16 length=1184,align1=0,align2=37: 62.50 (-1.27%) 57.03 (7.60%) 61.72 length=1184,align1=37,align2=37: 53.12 (-1.49%) 50.78 (2.99%) 52.34 length=1216,align1=0,align2=0: 53.91 (-4.55%) 50.78 (1.52%) 51.56 length=1216,align1=38,align2=0: 60.94 (0.00%) 57.03 (6.41%) 60.94 length=1216,align1=0,align2=38: 60.16 (0.00%) 57.81 (3.90%) 60.16 length=1216,align1=38,align2=38: 52.34 (-1.52%) 50.00 (3.03%) 51.56 length=1248,align1=0,align2=0: 54.69 (-2.94%) 53.12 (0.00%) 53.12 length=1248,align1=39,align2=0: 64.06 (-1.23%) 60.16 (4.94%) 63.28 length=1248,align1=0,align2=39: 60.94 (-2.63%) 60.16 (-1.32%) 59.38 length=1248,align1=39,align2=39: 53.12 (0.00%) 52.34 (1.47%) 53.12 length=1280,align1=0,align2=0: 52.34 (-1.52%) 52.34 (-1.52%) 51.56 length=1280,align1=40,align2=0: 61.72 (3.66%) 59.38 (7.32%) 64.06 length=1280,align1=0,align2=40: 60.94 (-2.63%) 60.16 (-1.32%) 59.38 length=1280,align1=40,align2=40: 52.34 (-1.52%) 52.34 (-1.52%) 51.56 length=1312,align1=0,align2=0: 54.69 (-1.45%) 55.47 (-2.90%) 53.91 length=1312,align1=41,align2=0: 63.28 (0.00%) 62.50 (1.23%) 63.28 length=1312,align1=0,align2=41: 62.50 (0.00%) 62.50 (0.00%) 62.50 length=1312,align1=41,align2=41: 53.91 (0.00%) 54.69 (-1.45%) 53.91 length=1344,align1=0,align2=0: 54.69 (0.00%) 54.69 (0.00%) 54.69 length=1344,align1=42,align2=0: 62.50 (0.00%) 62.50 (0.00%) 62.50 length=1344,align1=0,align2=42: 62.50 (-1.27%) 62.50 (-1.27%) 61.72 length=1344,align1=42,align2=42: 53.91 (0.00%) 53.91 (0.00%) 53.91 length=1376,align1=0,align2=0: 65.62 (-16.67%) 68.75 (-22.22%) 56.25 length=1376,align1=43,align2=0: 71.88 (-9.52%) 73.44 (-11.90%) 65.62 length=1376,align1=0,align2=43: 72.66 (-12.05%) 74.22 (-14.46%) 64.84 length=1376,align1=43,align2=43: 64.06 (-13.89%) 67.97 (-20.83%) 56.25 length=1408,align1=0,align2=0: 57.03 (-1.39%) 68.75 (-22.22%) 56.25 length=1408,align1=44,align2=0: 65.62 (-1.20%) 73.44 (-13.25%) 64.84 length=1408,align1=0,align2=44: 64.84 (0.00%) 74.22 (-14.46%) 64.84 length=1408,align1=44,align2=44: 56.25 (-1.41%) 68.75 (-23.94%) 55.47 length=1440,align1=0,align2=0: 67.97 (-14.47%) 64.84 (-9.21%) 59.38 length=1440,align1=45,align2=0: 74.22 (-10.47%) 68.75 (-2.33%) 67.19 length=1440,align1=0,align2=45: 72.66 (-6.90%) 69.53 (-2.30%) 67.97 length=1440,align1=45,align2=45: 65.62 (-13.51%) 58.59 (-1.35%) 57.81 length=1472,align1=0,align2=0: 66.41 (-14.86%) 58.59 (-1.35%) 57.81 length=1472,align1=46,align2=0: 73.44 (-9.30%) 67.19 (0.00%) 67.19 length=1472,align1=0,align2=46: 70.31 (-4.65%) 67.97 (-1.16%) 67.19 length=1472,align1=46,align2=46: 57.81 (0.00%) 58.59 (-1.35%) 57.81 length=1504,align1=0,align2=0: 60.94 (0.00%) 60.94 (0.00%) 60.94 length=1504,align1=47,align2=0: 71.09 (-1.11%) 70.31 (0.00%) 70.31 length=1504,align1=0,align2=47: 70.31 (-1.12%) 70.31 (-1.12%) 69.53 length=1504,align1=47,align2=47: 60.94 (-1.30%) 60.16 (0.00%) 60.16 length=1536,align1=0,align2=0: 62.50 (-3.90%) 60.16 (0.00%) 60.16 length=1536,align1=48,align2=0: 60.94 (-1.30%) 60.16 (0.00%) 60.16 length=1536,align1=0,align2=48: 61.72 (-3.95%) 60.16 (-1.32%) 59.38 length=1536,align1=48,align2=48: 60.94 (-1.30%) 60.16 (0.00%) 60.16 length=1568,align1=0,align2=0: 80.47 (-27.16%) 63.28 (0.00%) 63.28 length=1568,align1=49,align2=0: 86.72 (-18.09%) 72.66 (1.06%) 73.44 length=1568,align1=0,align2=49: 74.22 (-3.26%) 74.22 (-3.26%) 71.88 length=1568,align1=49,align2=49: 62.50 (0.00%) 61.72 (1.25%) 62.50 length=1600,align1=0,align2=0: 62.50 (-1.27%) 62.50 (-1.27%) 61.72 length=1600,align1=50,align2=0: 73.44 (0.00%) 71.88 (2.13%) 73.44 length=1600,align1=0,align2=50: 72.66 (0.00%) 73.44 (-1.08%) 72.66 length=1600,align1=50,align2=50: 62.50 (-1.27%) 62.50 (-1.27%) 61.72 length=1632,align1=0,align2=0: 64.84 (0.00%) 64.84 (0.00%) 64.84 length=1632,align1=51,align2=0: 75.78 (0.00%) 75.00 (1.03%) 75.78 length=1632,align1=0,align2=51: 78.91 (0.00%) 75.78 (3.96%) 78.91 length=1632,align1=51,align2=51: 64.84 (-2.47%) 64.84 (-2.47%) 63.28 length=1664,align1=0,align2=0: 64.84 (-1.22%) 64.84 (-1.22%) 64.06 length=1664,align1=52,align2=0: 75.78 (0.00%) 75.00 (1.03%) 75.78 length=1664,align1=0,align2=52: 80.47 (-0.98%) 75.78 (4.90%) 79.69 length=1664,align1=52,align2=52: 64.06 (-1.23%) 65.62 (-3.70%) 63.28 length=1696,align1=0,align2=0: 69.53 (-3.49%) 72.66 (-8.14%) 67.19 length=1696,align1=53,align2=0: 80.47 (-0.98%) 82.03 (-2.94%) 79.69 length=1696,align1=0,align2=53: 80.47 (0.96%) 82.03 (-0.96%) 81.25 length=1696,align1=53,align2=53: 68.75 (-2.33%) 72.66 (-8.14%) 67.19 length=1728,align1=0,align2=0: 67.97 (0.00%) 72.66 (-6.90%) 67.97 length=1728,align1=54,align2=0: 80.47 (-0.98%) 82.81 (-3.92%) 79.69 length=1728,align1=0,align2=54: 78.91 (-1.00%) 82.03 (-5.00%) 78.12 length=1728,align1=54,align2=54: 68.75 (0.00%) 72.66 (-5.68%) 68.75 length=1760,align1=0,align2=0: 77.34 (-12.50%) 68.75 (0.00%) 68.75 length=1760,align1=55,align2=0: 91.41 (-8.33%) 79.69 (5.56%) 84.38 length=1760,align1=0,align2=55: 88.28 (-10.78%) 80.47 (-0.98%) 79.69 length=1760,align1=55,align2=55: 77.34 (-11.24%) 68.75 (1.12%) 69.53 length=1792,align1=0,align2=0: 78.12 (-14.94%) 68.75 (-1.15%) 67.97 length=1792,align1=56,align2=0: 88.28 (-4.63%) 79.69 (5.56%) 84.38 length=1792,align1=0,align2=56: 88.28 (-9.71%) 80.47 (0.00%) 80.47 length=1792,align1=56,align2=56: 77.34 (-11.24%) 68.75 (1.12%) 69.53 length=1824,align1=0,align2=0: 72.66 (7.92%) 70.31 (10.89%) 78.91 length=1824,align1=57,align2=0: 85.94 (5.17%) 82.03 (9.48%) 90.62 length=1824,align1=0,align2=57: 82.03 (3.67%) 82.81 (2.75%) 85.16 length=1824,align1=57,align2=57: 70.31 (-1.12%) 70.31 (-1.12%) 69.53 length=1856,align1=0,align2=0: 70.31 (-1.12%) 70.31 (-1.12%) 69.53 length=1856,align1=58,align2=0: 83.59 (-0.94%) 82.03 (0.94%) 82.81 length=1856,align1=0,align2=58: 178.12 (-115.09%) 82.81 (0.00%) 82.81 length=1856,align1=58,align2=58: 70.31 (-1.12%) 70.31 (-1.12%) 69.53 length=1888,align1=0,align2=0: 73.44 (-1.08%) 78.91 (-8.60%) 72.66 length=1888,align1=59,align2=0: 85.94 (0.00%) 89.84 (-4.55%) 85.94 length=1888,align1=0,align2=59: 84.38 (0.00%) 89.06 (-5.56%) 84.38 length=1888,align1=59,align2=59: 72.66 (-1.09%) 78.12 (-8.70%) 71.88 length=1920,align1=0,align2=0: 72.66 (-1.09%) 78.12 (-8.70%) 71.88 length=1920,align1=60,align2=0: 85.94 (0.00%) 89.84 (-4.55%) 85.94 length=1920,align1=0,align2=60: 85.16 (0.00%) 89.06 (-4.59%) 85.16 length=1920,align1=60,align2=60: 72.66 (-1.09%) 78.91 (-9.78%) 71.88 length=1952,align1=0,align2=0: 75.00 (-1.05%) 75.00 (-1.05%) 74.22 length=1952,align1=61,align2=0: 88.28 (0.00%) 87.50 (0.88%) 88.28 length=1952,align1=0,align2=61: 87.50 (0.00%) 88.28 (-0.89%) 87.50 length=1952,align1=61,align2=61: 74.22 (0.00%) 74.22 (0.00%) 74.22 length=1984,align1=0,align2=0: 75.00 (-1.05%) 73.44 (1.05%) 74.22 length=1984,align1=62,align2=0: 89.06 (-0.89%) 87.50 (0.88%) 88.28 length=1984,align1=0,align2=62: 87.50 (0.00%) 88.28 (-0.89%) 87.50 length=1984,align1=62,align2=62: 74.22 (0.00%) 74.22 (0.00%) 74.22 length=2016,align1=0,align2=0: 77.34 (-1.02%) 76.56 (0.00%) 76.56 length=2016,align1=63,align2=0: 91.41 (-0.86%) 90.62 (0.00%) 90.62 length=2016,align1=0,align2=63: 89.84 (0.00%) 90.62 (-0.87%) 89.84 length=2016,align1=63,align2=63: 77.34 (-1.02%) 76.56 (0.00%) 76.56 length=4096,align1=0,align2=0: 141.41 (-0.56%) 146.88 (-4.44%) 140.62 Function: memcpy __memcpy_thunderx __memcpy_falkor __memcpy_generic Variant: large ================================================================================ length=65543,align1=0,align2=0: 4018.75 (3.09%) 2634.38 (36.47%) 4146.88 length=65551,align1=0,align2=3: 4425.00 (-6.47%) 3134.38 (24.59%) 4156.25 length=65567,align1=3,align2=0: 2909.38 (29.95%) 3134.38 (24.53%) 4153.12 length=65599,align1=3,align2=5: 4415.62 (-6.16%) 3134.38 (24.64%) 4159.38 length=131079,align1=0,align2=0: 5765.62 (30.38%) 5240.62 (36.72%) 8281.25 length=131087,align1=0,align2=3: 8831.25 (-6.56%) 6271.88 (24.32%) 8287.50 length=131103,align1=3,align2=0: 5793.75 (29.05%) 6268.75 (23.23%) 8165.62 length=131135,align1=3,align2=5: 5806.25 (29.97%) 6259.38 (24.50%) 8290.62 length=262151,align1=0,align2=0: 11850.00 (28.91%) 10762.50 (35.43%) 16668.80 length=262159,align1=0,align2=3: 12043.80 (27.72%) 12700.00 (23.78%) 16662.50 length=262175,align1=3,align2=0: 12046.90 (27.90%) 12687.50 (24.07%) 16709.40 length=262207,align1=3,align2=5: 11984.40 (28.08%) 12678.10 (23.91%) 16662.50 length=524295,align1=0,align2=0: 24825.00 (25.00%) 24268.80 (27.34%) 33400.00 length=524303,align1=0,align2=3: 35731.20 (-6.53%) 25678.10 (23.44%) 33540.60 length=524319,align1=3,align2=0: 25893.80 (22.71%) 25725.00 (23.22%) 33503.10 length=524351,align1=3,align2=5: 25887.50 (22.86%) 25690.60 (23.45%) 33559.40 length=1048583,align1=0,align2=0: 50621.90 (0.30%) 50600.00 (0.34%) 50771.90 length=1048591,align1=0,align2=3: 53206.20 (0.54%) 51081.20 (4.51%) 53493.80 length=1048607,align1=3,align2=0: 53221.90 (0.32%) 51975.00 (2.66%) 53393.80 length=1048639,align1=3,align2=5: 53240.60 (0.36%) 51953.10 (2.77%) 53431.20 length=2097159,align1=0,align2=0: 103744.00 (-2.00%) 102447.00 (-1.00%) 102425.00 length=2097167,align1=0,align2=3: 108588.00 (-1.00%) 105159.00 (2.00%) 107606.00 length=2097183,align1=3,align2=0: 107678.00 (0.00%) 105250.00 (2.00%) 108125.00 length=2097215,align1=3,align2=5: 107906.00 (1.00%) 105841.00 (3.00%) 109475.00 length=4194311,align1=0,align2=0: 202994.00 (0.00%) 202500.00 (1.00%) 204809.00 length=4194319,align1=0,align2=3: 213350.00 (0.00%) 205997.00 (3.00%) 213384.00 length=4194335,align1=3,align2=0: 212653.00 (0.00%) 206444.00 (3.00%) 212900.00 length=4194367,align1=3,align2=5: 213044.00 (0.00%) 206084.00 (3.00%) 213847.00 length=8388615,align1=0,align2=0: 401294.00 (0.00%) 401231.00 (0.00%) 401944.00 length=8388623,align1=0,align2=3: 480872.00 (-14.00%) 406444.00 (3.00%) 422900.00 length=8388639,align1=3,align2=0: 422147.00 (0.00%) 407750.00 (3.00%) 422803.00 length=8388671,align1=3,align2=5: 442003.00 (-5.00%) 407125.00 (3.00%) 423509.00 length=16777223,align1=0,align2=0: 799809.00 (0.00%) 800000.00 (0.00%) 801756.00 length=16777231,align1=0,align2=3: 841184.00 (0.00%) 808525.00 (4.00%) 843775.00 length=16777247,align1=3,align2=0: 841166.00 (0.00%) 810147.00 (3.00%) 843147.00 length=16777279,align1=3,align2=5: 972569.00 (-16.00%) 808588.00 (4.00%) 843731.00 length=33554439,align1=0,align2=0: 1842240.00 (-0.01%) 1863590.00 (-1.17%) 1841990.00 length=33554447,align1=0,align2=3: 2103470.00 (-2.74%) 1919460.00 (6.25%) 2047440.00 length=33554463,align1=3,align2=0: 2075690.00 (-1.07%) 1930040.00 (6.02%) 2053720.00 length=33554495,align1=3,align2=5: 2110590.00 (-2.82%) 1924440.00 (6.25%) 2052650.00 Function: memcpy __memcpy_thunderx __memcpy_falkor __memcpy_generic Variant: random ================================================================================ max-size=4096: 44061.90 (5.85%) 38568.20 (17.59%) 46799.90 max-size=8192: 42790.90 (5.27%) 38158.90 (15.52%) 45171.50 max-size=16384: 44912.10 (2.25%) 38710.40 (15.75%) 45945.00 max-size=32768: 43577.90 (1.23%) 37975.10 (13.93%) 44120.00 max-size=65536: 44375.50 (1.04%) 38474.20 (14.20%) 44840.60 * manual/tunables.texi (Tunable glibc.tune.cpu): Add falkor. * sysdeps/aarch64/multiarch/Makefile (sysdep_routines): Add memcpy_falkor. * sysdeps/aarch64/multiarch/ifunc-impl-list.c (MAX_IFUNC): Bump. (__libc_ifunc_impl_list): Add __memcpy_falkor. * sysdeps/aarch64/multiarch/memcpy.c: Likewise. * sysdeps/aarch64/multiarch/memcpy_falkor.S: New file. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list): Add falkor. * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_FALKOR): New macro.
* [AArch64] Update dl-procinfo for new HWCAP flags in Linux 4.12Szabolcs Nagy2017-07-192-4/+6
| | | | | | | | | Follow up to commit 512d245bc30cca893db6979f42f058e734f345c3. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c: (_dl_aarch64_cap_flags): Update. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h (_DL_HWCAP_COUNT, _DL_HWCAP_LAST): Update.
* [AArch64] Fix out of bound array access regressionSzabolcs Nagy2017-07-181-30/+8
| | | | | | Partially revert ea01a4da219011f4a4db97eef3c5bfc2f6e8fc6b "aarch64: Add hwcap string routines" because _dl_procinfo cannot be future proof and avoid oob access in _dl_hwcap_string.
* Add HWCAP_ macros from Linux 4.12 to AArch64 bits/hwcap.h.Szabolcs Nagy2017-07-171-0/+3
| | | | | | | | This patch adds the HWCAP_JSCVT, HWCAP_FCMA and HWCAP_LRCPC macros from Linux 4.12 to the AArch64 bits/hwcap.h. * sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h (HWCAP_FCMA): New macro. (HWCAP_JSCVT, HWCAP_LRCPC): Likewise.
* Fix typo in glibc.tune.cpu nameSiddhesh Poyarekar2017-07-011-1/+1
|
* tunables, aarch64: New tunable to override cpuSiddhesh Poyarekar2017-06-301-6/+41
| | | | | | | | | | | | | | | | | | | | Add a new tunable (glibc.tune.cpu) to override CPU identification on aarch64. This is useful in two cases: one where it is desirable to pretend to be another CPU for purposes of testing or because routines written for that CPU are beneficial for specific workloads and second where the underlying kernel does not support emulation of MRS to get the MIDR of the CPU. * elf/dl-tunables.h (tunable_is_name): Move from... * elf/dl-tunables.c (is_name): ... here. (parse_tunables, __tunables_init): Adjust. * manual/tunables.texi: Document glibc.tune.cpu. * sysdeps/aarch64/dl-tunables.list: New file. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (struct cpu_list): New type. (cpu_list): New list of CPU names and their MIDR. (get_midr_from_mcpu): New function. (init_cpu_features): Override MIDR if necessary.
* Rename struct ucontext tag (bug 21457).Joseph Myers2017-06-263-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ucontext_t type has a tag struct ucontext. As with previous such issues for siginfo_t and stack_t, this tag is not permitted by POSIX (is not in a reserved namespace), and so namespace conformance means breaking C++ name mangling for this type. In this case, the type does need to have some tag rather than just a typedef name, because it includes a pointer to itself. This patch uses struct ucontext_t as the new tag, so the type is mangled as ucontext_t (the POSIX *_t reservation applies in all namespaces, not just the namespace of ordinary identifiers). Another reserved name such as struct __ucontext could of course be used. Because of other namespace issues, this patch does not by itself fix bug 21457 or allow any XFAILs to be removed. Tested for x86_64, and with build-many-glibcs.py. [BZ #21457] * sysdeps/arm/sys/ucontext.h (struct ucontext): Rename to struct ucontext_t. * sysdeps/generic/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/i386/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/m68k/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/mips/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/alpha/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/arm/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/s390/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/sh/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/tile/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/unix/sysv/linux/x86/sys/ucontext.h (struct ucontext): Likewise. * sysdeps/powerpc/powerpc32/backtrace.c (struct rt_signal_frame_32): Likewise. * sysdeps/powerpc/powerpc64/backtrace.c (struct signal_frame_64): Likewise. * sysdeps/unix/sysv/linux/aarch64/kernel_rt_sigframe.h (struct kernel_rt_sigframe): Likewise. * sysdeps/unix/sysv/linux/aarch64/sigcontextinfo.h (SIGCONTEXT): Likewise. * sysdeps/unix/sysv/linux/arm/register-dump.h (register_dump): Likewise. * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h (SIGCONTEXT): Likewise. * sysdeps/unix/sysv/linux/hppa/profil-counter.h (__profil_counter): Likewise. * sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h (SIGCONTEXT): Likewise. * sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h (struct kernel_rt_sigframe): Likewise. * sysdeps/unix/sysv/linux/nios2/kernel_rt_sigframe.h (struct kernel_rt_sigframe): Likewise. * sysdeps/unix/sysv/linux/nios2/sigcontextinfo.h (SIGCONTEXT): Likewise. * sysdeps/unix/sysv/linux/sh/makecontext.S (__makecontext): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/makecontext.c (__start_context): Likewise. * sysdeps/unix/sysv/linux/tile/sigcontextinfo.h (SIGCONTEXT): Likewise. * sysdeps/unix/sysv/linux/x86_64/register-dump.h (register_dump): Likewise. * sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h (SIGCONTEXT): Likewise.
* Call exit directly in clone (BZ #21512)Adhemerval Zanella2017-06-261-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On aarch64, alpha, arm, hppa, mips, nios2, powerpc, sh, sparc, tile, and x86_64 the clone syscall jumps to _exit after the child execution and the function ends the process execution by calling exit_group. This behavior have a small issue where threads created with CLONE_THREAD using clone syscall directly will eventually exit the whole group altogether instead of just the thread created. Also, s390, microblaze, ia64, i386, and m68k differs by calling exit syscall directly. This patch changes all architectures to call the exit syscall directly, as for s390, microblaze, ia64, i386, and m68k. This do not have change glibc internal behavior in any sort, since the only usage of clone implementation in posix_spawn calls _exit directly in the created child (fork uses a direct call to clone). Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, powerpc-linux-gnu, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. [BZ #21512] * sysdeps/unix/sysv/linux/aarch64/clone.S (__clone): Call exit syscall instead of jump to _exit. (CLONE_VM_BIT): Remove unused define. (CLONE_VM): Likewise. (CLONE_THREAD_BIT): Likewise. (CLONE_THREAD): Likewise. * sysdeps/unix/sysv/linux/alpha/clone.S (__clone): Likewise. (CLONE_VM): Remove unused define. * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Likewise. (CLONE_VM): Remove unused define. (CLONE_THREAD): Likewise. * sysdeps/unix/sysv/linux/i386/clone.S (CLONE_VM): Likewise. * sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Call exit syscall instead of jump to _exit. * sysdeps/unix/sysv/linux/hppa/clone.S (__clone): Likewise. * sysdeps/unix/sysv/linux/mips/clone.S (__clone): Likewise. (CLONE_VM): Remove unused define. (CLONE_THREAD): Likewise. * sysdeps/unix/sysv/linux/nios2/clone.S (__clone): Likewise. (CLONE_VM): Remove unused define. * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S (__clone): Likewise. (CLONE_VM): Remove unused define. (CLONE_THREAD): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S (__clone): Likewise. (CLONE_VM): Remove unused define. (CLONE_THREAD): Likewise. * sysdeps/unix/sysv/linux/sh/clone.S (__clone): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone): Likewise. (CLONE_VM): Remove unused define. * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__clone): Likewise. (CLONE_VM): Remove unused define. * sysdeps/unix/sysv/linux/tile/clone.S (__clone): Likewise. * sysdeps/unix/sysv/linux/x86_64/clone.S (__clone): Likewise. (CLONE_VM): Remove unused define. * sysdeps/unix/sysv/linux/Makefile (tests): Add tst-clone3. * sysdeps/unix/sysv/linux/tst-clone3.c: New file. Fix
* aarch64: Fix undefined behavior in _dl_procinfoSiddhesh Poyarekar2017-06-091-3/+3
| | | | | | | | | 1 << 31 is undefined, so replace it with a cleaner check. Also remove magic numbers in comments. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h: Remove mention of magic numbers in comments. (_dl_procinfo): Fix undefined behavior
* aarch64: Add hwcap string routinesSiddhesh Poyarekar2017-06-072-8/+65
| | | | | | | | | | | | | Add support for routines in dl-procinfo.h to show string versions of HWCAP entries when a program is invoked with the LD_SHOW_AUXV environment variable set and also to aid in path resolution for ldconfig. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c (_dl_aarch64_cap_flags): New array. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h (_dl_hwcap_string, _dl_string_hwcap, _dl_procinfo): Implement functions.
* aarch64: Allow overriding HWCAP_CPUID feature check using HWCAP_MASKSiddhesh Poyarekar2017-06-072-4/+50
| | | | | | | | | | | | | | | | Now that LD_HWCAP_MASK (or glibc.tune.hwcap_mask) is read early enough to influence cpu feature check in aarch64, use it to influence multiarch selection. Setting LD_HWCAP_MASK such that it clears HWCAP_CPUID will now disable multiarch for the binary. HWCAP_CPUID is also now set in HWCAP_IMPORTANT so that it is set by default. With this patch, this feature is only usable with dyanmically linked binaries because LD_HWCAP_MASK is not read for static binaries. A future patch fixes that. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (init_cpu_features): Use glibc.tune.hwcap_mask. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h: New file.
* posix: Implement preadv2 and pwritev2Adhemerval Zanella2017-05-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support of preadv2 and pwritev2 which are similar to preadv/pwritev but with an extra flag argument. As for preadv/pwritev both interfaces are added a non-standard GNU API. For default 'posix' implementation trying to emulate the Linux supported flags is troublesome: * We can not temporary change the file state of the O_DSYNC and O_SYNC flags to emulate RWF_{D}SYNC (attempts to change the state of using fcntl are silently ignored). * IOCB_HIPRI requires the file opened in O_DIRECT and uses an internal semantic not provided by any other flag (O_NONBLOCK for instance). So default sysdeps/posix implementations fails with EOPNOTSUPP for any non supported flag (which are none currently) calls generic preadv/pwritev. Basically this implementation supports only preadv2 called as preadv (with flags sets to 0). The Linux one uses the preadv2/pwritev2 syscall if defined, otherwise it call preadv/writev. Instead of using the previous __ASSUME_* to unconditionally issue the syscall (and avoid building the fallback routine), it call pread/write if the preadv2/pwritev2 syscalls fails. The idea is just avoid adding another __ASSUME_* and checking each architecture on every kernel bump and simplify code conditionals. Checked on x86_64-linux-gnu and on i686-linux-gnu and a check with run-built-tests=no on aarch64-linux-gnu, alpha-linux-gnu, arm-linux-gnueabihf, ia64-linux-gnu, m68k-linux-gnu, microblaze-linux-gnu, mips{64,64n32}-linux-gnu, nios2-linux-gnu, powerpc{64,64le}-linux-gnu, s390{x}-linux-gnu, sparc{64,v9}-linux-gnu, tile{gx,pro}-linux-gnu, and sh4-linux-gnu (all using gcc 6.3). * NEWS: Add note about pwritev2 and preadv2 inclusion. * misc/Makefile (routines): Add preadv2, preadv64v2, pwritev2, and pwritev64v2. (tests): Add tst-preadvwritev2 and tst-preadvwritev64v2. * misc/Versions (GLIBC_2.26): Add preadv2, preadv64v2, pwritev2, and pwritev64v2. * misc/preadv2.c: New file. * misc/preadv64v2.c: Likewise. * misc/pwritev2.c: Likewise. * misc/pwritev64v2.c: Likewise. * misc/tst-preadvwritev2.c: Likewise. * misc/tst-preadvwritev64v2.c: Likewise. * manual/llio.texi: Add preadv2 and pwritev2 documentation. * misc/sys/uio.h [__USE_GNU && !__USE_FILE_OFFSET64] (preadv2): New prototype. [__USE_GNU && !__USE_FILE_OFFSET64] (pwritev2): Likewise. [__USE_GNU && __USE_FILE_OFFSET64] (preadv64v2): Likewise. [__USE_GNU && __USE_FILE_OFFSET64] (pwritev64v2): Likewise. * misc/tst-preadvwritev-common.c (PREADV): Define if not defined. (PWRITEV): Likewise. (do_test_with_offset): Use PREADV and PWRITEV macros and check for ENOSYS. * nptl/tst-cancel4.c (tf_pwritev2): New test. (tf_preadv2): Likewise. (tf_fsync): Add tf_pwritev2 and tf_preadv2. * sysdeps/posix/preadv2.c: Likewise. * sysdeps/posix/preadv64v2.c: Likewise. * sysdeps/posix/pwritev2.c: Likewise. * sysdeps/posix/pwritev64v2.c: Likewise. * sysdeps/unix/sysv/linux/kernel-features.h: Add comment for syscall support in kernel. * sysdeps/unix/sysv/linux/preadv2.c: Likewise. * sysdeps/unix/sysv/linux/preadv64v2.c: Likewise. * sysdeps/unix/sysv/linux/pwritev2.c: Likewise. * sysdeps/unix/sysv/linux/pwritev64v2.c: Likewise. * sysdeps/unix/sysv/linux/preadv.c (preadv): Add libc_hidden_def. * sysdeps/unix/sysv/linux/preadv64.c (preadv64): Likewise. * sysdeps/unix/sysv/linux/pwritev.c (pwritev): Likewise. * sysdeps/unix/sysv/linux/pwritev64.c (pwritev64): Likewise. * sysdeps/unix/sysv/linux/bits/uio.h: Add supported preadv2/pwritev2 support flags on Linux. * sysdeps/unix/sysv/linux/aarch64/libc.abilist (GLIBC_2.26): Add preadv2, preadv64v2, pwritev2, pwritev64v2. * sysdeps/unix/sysv/linux/alpha/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/nios2/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/sysv/linux/tile/tilegx/tilegx32/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/sysv/linux/tile/tilegx/tilegx64/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist (GLIBC_2.26): Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist (GLIBC_2.26): Likewise.
* Delay initialization of CPU features struct in static binariesSiddhesh Poyarekar2017-05-311-18/+5
| | | | | | | | | | | | | | | | | | | | | Allow the CPU features structure set up to be overridden by tunables by delaying it to until after tunables are initialized. The initialization is already delayed in dynamically linked glibc, it is only in static binaries that the initialization is set early to allow it to influence IFUNC relocations that happen in libc-start. It is a bit too early however and there is a good place between tunables initialization and IFUNC relocations where this can be done. Verified that this does not regress the testsuite. * csu/libc-start.c [!ARCH_INIT_CPU_FEATURES]: Define ARCH_INIT_CPU_FEATURES. (LIBC_START_MAIN): Call it. * sysdeps/unix/sysv/linux/aarch64/libc-start.c (__libc_start_main): Remove. (ARCH_INIT_CPU_FEATURES): New macro. * sysdeps/x86/libc-start.c (__libc_start_main): Remove. (ARCH_INIT_CPU_FEATURES): New macro.
* Add reallocarray functionDennis Wölfing2017-05-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reallocarray function is an extension from OpenBSD. It is an integer-overflow-safe replacement for realloc(p, X*Y) and malloc(X*Y) (realloc(NULL, X*Y)). It can therefore help in preventing certain security issues in code. This is an updated version of a patch originally submitted by Rüdiger Sonderfeld in May 2014 [1]. Checked on i686-linux-gnu and x86_64-linux-gnu. [1] <https://sourceware.org/ml/libc-alpha/2014-05/msg00481.html>. 2017-05-30 Dennis Wölfing <denniswoelfing@gmx.de> Rüdiger Sonderfeld <ruediger@c-plusplus.de> * include/stdlib.h (__libc_reallocarray): New declaration. * malloc/Makefile (routines): Add reallocarray. (tests): Add tst-reallocarray.c. * malloc/Versions: Add reallocarray and __libc_reallocarray. * malloc/malloc-internal.h (check_mul_overflow_size_t): New inline function. * malloc/malloc.h (reallocarray): New declaration. * stdlib/stdlib.h (reallocarray): Likewise. * malloc/reallocarray.c: New file. * malloc/tst-reallocarray.c: New test file. * manual/memory.texi: Document reallocarray. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Add reallocarray. * 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/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/tile/tilegx/tilegx32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tilepro/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
* Fix sys/ucontext.h namespace from signal.h etc. inclusion (bug 21457).Joseph Myers2017-05-231-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The various sys/ucontext.h headers include <signal.h> and all the headers split out of <bits/sigstack.h>. (Except that the powerpc version does not include <signal.h>.) None of the standard versions defining ucontext.h require or permit such inclusions; rather, they all say that the stack_t and sigset_t types from signal.h are defined. This patch fixes the headers to include just the bits/ headers for those types (and the existing includes of bits/sigcontext.h). Since bits/types/sigset_t.h is now being included instead of bits/types/__sigset_t.h, __sigset_t uses in the headers are replaced by direct use of the public sigset_t type. sysdeps/unix/sysv/linux/x86/bits/sigcontext.h was relying on the prior inclusion of <signal.h> to define types such as __uint32_t, so gets a bits/types.h include added to provide those types. Although one could keep some or all of the includes under a __USE_MISC conditional, that seems unnecessary to me, especially given the lack of a <signal.h> include in the powerpc version meaning that portable programs already cannot rely on such an include. Tested for x86_64 and x86, and with build-many-glibcs.py. As with other such fixes, more namespace issues remain so this does not permit any XFAILs to be removed or bugs to be closed. [BZ #21457] * sysdeps/arm/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/generic/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/i386/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/m68k/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/mips/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h>. * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Do not include <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/x86/bits/sigcontext.h: Include <bits/types.h>. * sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Do not include <signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or <bits/ss_flags.h>. Include <bits/types/sigset_t.h> instead of <bits/types/__sigset_t.h>. (ucontext_t): Use sigset_t instead of __sigset_t.
* Remove __need macros from signal.h.Zack Weinberg2017-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The types affected are __sig_atomic_t, sig_atomic_t, __sigset_t, sigset_t, sigval_t, sigevent_t, and siginfo_t. __sig_atomic_t is a scalar, so it's now directly available from bits/types.h. The others get bits/types/ headers. Side effects include: There have been small changes to which non-signal headers expose which subset of the signal-related types. A couple of architectures' nested siginfo_t fields had to be renamed to prevent undesired macro expansion. Internal code that wants to manipulate signal masks must now include <sigsetops.h> (which is not installed) and should be aware that __sigaddset, __sigandset, __sigdelset, __sigemptyset, and __sigorset no longer return a value (unlike the public API). Relatedly, the public signal.h no longer declares any of those functions. The obsolete sigmask() macro no longer has a system-specific definition -- in the cases where it matters, it didn't work anyway. New Linux architectures should create bits/siginfo-arch.h and/or bits/siginfo-consts-arch.h to customize their siginfo_t, rather than duplicating everything in bits/siginfo.h (which no longer exists). Add new __SI_* macros if necessary. Ports to other operating systems are strongly encouraged to generalize this scheme further. * bits/sigevent-consts.h * bits/siginfo-consts.h * bits/types/__sigset_t.h * bits/types/sigevent_t.h * bits/types/siginfo_t.h * sysdeps/unix/sysv/linux/bits/sigevent-consts.h * sysdeps/unix/sysv/linux/bits/siginfo-consts.h * sysdeps/unix/sysv/linux/bits/types/__sigset_t.h * sysdeps/unix/sysv/linux/bits/types/sigevent_t.h * sysdeps/unix/sysv/linux/bits/types/siginfo_t.h: New system-dependent bits headers. * sysdeps/unix/sysv/linux/bits/siginfo-arch.h * sysdeps/unix/sysv/linux/bits/siginfo-consts-arch.h * sysdeps/unix/sysv/linux/ia64/bits/siginfo-arch.h * sysdeps/unix/sysv/linux/ia64/bits/siginfo-consts-arch.h * sysdeps/unix/sysv/linux/mips/bits/siginfo-arch.h * sysdeps/unix/sysv/linux/sparc/bits/siginfo-arch.h * sysdeps/unix/sysv/linux/tile/bits/siginfo-arch.h * sysdeps/unix/sysv/linux/tile/bits/siginfo-consts-arch.h * sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h: New Linux-only system-dependent bits headers. * signal/bits/types/sig_atomic_t.h * signal/bits/types/sigset_t.h * signal/bits/types/sigval_t.h: New non-system-dependent bits headers. * sysdeps/generic/sigsetops.h * sysdeps/unix/sysv/linux/sigsetops.h: New internal headers. * include/bits/types/sig_atomic_t.h * include/bits/types/sigset_t.h * include/bits/types/sigval_t.h: New wrappers. * signal/sigsetops.h * bits/siginfo.h * bits/sigset.h * sysdeps/unix/sysv/linux/bits/siginfo.h * sysdeps/unix/sysv/linux/bits/sigset.h * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h * sysdeps/unix/sysv/linux/mips/bits/siginfo.h * sysdeps/unix/sysv/linux/s390/bits/siginfo.h * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h * sysdeps/unix/sysv/linux/tile/bits/siginfo.h * sysdeps/unix/sysv/linux/x86/bits/siginfo.h: Deleted. * signal/Makefile, sysdeps/unix/sysv/linux/Makefile: Update lists of installed headers. * posix/bits/types.h: Define __sig_atomic_t here. * signal/signal.h: Use the new bits headers; no need to handle __need_sig_atomic_t nor __need_sigset_t. Don't use __sigmask to define sigmask. * include/signal.h: No need to handle __need_sig_atomic_t nor __need_sigset_t. Don't define __sigemptyset. * io/sys/poll.h, setjmp/setjmp.h * sysdeps/arm/sys/ucontext.h, sysdeps/generic/sys/ucontext.h * sysdeps/i386/sys/ucontext.h, sysdeps/m68k/sys/ucontext.h * sysdeps/mach/hurd/i386/bits/sigcontext.h * sysdeps/mips/sys/ucontext.h, sysdeps/powerpc/novmxsetjmp.h * sysdeps/pthread/bits/sigthread.h * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h * sysdeps/unix/sysv/linux/mips/sys/ucontext.h * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h * sysdeps/unix/sysv/linux/s390/sys/ucontext.h * sysdeps/unix/sysv/linux/sh/sys/ucontext.h * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h * sysdeps/unix/sysv/linux/tile/sys/ucontext.h * sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Use bits/types/__sigset_t.h. * misc/sys/select.h, posix/spawn.h * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h * sysdeps/unix/sysv/linux/sys/epoll.h * sysdeps/unix/sysv/linux/sys/signalfd.h: Use bits/types/sigset_t.h. * resolv/netdb.h, rt/mqueue.h: Use bits/types/sigevent_t.h. * rt/aio.h: Use bits/types/sigevent_t.h and bits/sigevent-consts.h. * socket/sys/socket.h: Don't include bits/sigset.h. * login/utmp_file.c, shadow/lckpwdf.c, signal/sigandset.c * signal/sigisempty.c, stdlib/abort.c, sysdeps/posix/profil.c * sysdeps/posix/sigignore.c, sysdeps/posix/sigintr.c * sysdeps/posix/signal.c, sysdeps/posix/sigset.c * sysdeps/posix/sprofil.c, sysdeps/posix/sysv_signal.c * sysdeps/unix/sysv/linux/nptl-signals.h: Include sigsetops.h. * signal/sigaddset.c, signal/sigandset.c, signal/sigdelset.c * signal/sigorset.c, stdlib/abort.c, sysdeps/posix/sigignore.c * sysdeps/posix/signal.c, sysdeps/posix/sigset.c: __sigaddset, __sigandset, __sigdelset, __sigemptyset, __sigorset now return no value. * signal/sigaddset.c, signal/sigdelset.c, signal/sigismem.c Include <errno.h>, <signal.h>, and <sigsetops.h> instead of "sigsetops.h". * signal/sigsetops.c: Explicitly define __sigismember, __sigaddset, and __sigdelset as compatibility symbols. * signal/Versions: Correct commentary on __sigpause, __sigaddset, __sigdelset, __sigismember. * inet/rcmd.c: Include sigsetops.h. Convert old code using __sigblock/__sigsetmask to use __sigprocmask and friends.
* Split up bits/sigstack.h.Joseph Myers2017-05-192-27/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bits/sigstack.h contains four things: the legacy struct sigstack type, the preferred stack_t type, the SS_* enum values and macros for signal stack sizes. These vary in different ways between glibc configurations; in particular, the stack sizes vary much more than any of the other pieces. Furthermore, these pieces have different standard namespace rules for when they should be visible (not currently visible in conform/ results both because the relevant tests are XFAILed for sys/ucontext.h namespace issues, and because some of the expectations are incorrect in the same way as the headers, e.g. neither expectations nor headers reflect that current POSIX no longer has either the sigstack function or the sigstack structure). To reduce duplication of identical definitions, and facilitate namespace fixes without requiring the same feature test macro conditions to be repeated in many versions of the same header, this patch splits bits/sigstack.h up into four headers. It keeps the stack size macros, while new bits/types/struct_sigstack.h, bits/types/stack_t.h and bits/ss_flags.h are added for the other pieces. bits/types/struct_sigstack.h is the same everywhere, bits/types/stack_t.h has three variants different in the order of the structure elements (generic = MIPS Linux, and other Linux), and bits/ss_flags.h has generic and Linux variants. This patch includes the new headers everywhere that included <bits/sigstack.h>, so should cause no difference to what any public header defines. Subsequent namespace fixes would then remove or condition some of those includes. There should be no conflicts with Zack's changes to signal.h types, beyond the trivial conflict of both making additions to signal/Makefile's headers list; the two patches affect disjoint sets of types and other definitions. Tested for x86_64 and x86, and with build-many-glibcs.py. * bits/ss_flags.h: New file. * bits/types/stack_t.h: Likewise. * include/bits/types/struct_sigstack.h: Likewise. * signal/bits/types/struct_sigstack.h: Likewise. * sysdeps/unix/sysv/linux/bits/ss_flags.h: Likewise. * sysdeps/unix/sysv/linux/bits/types/stack_t.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h: Likewise. * signal/Makefile (headers): Add bits/types/struct_sigstack.h, bits/types/stack_t.h and bits/ss_flags.h. * signal/signal.h [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]: Include <bits/types/struct_sigstack.h>, <bits/types/stack_t.h> and <bits/ss_flags.h>. * bits/sigstack.h (struct sigstack): Remove. (stack_t): Likewise. (SS_ONSTACK): Likewise. (SS_DISABLE): Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h (struct sigstack): Likewise. (stack_t): Likewise. (SS_ONSTACK): Likewise. (SS_DISABLE): Likewise. * sysdeps/unix/sysv/linux/alpha/bits/sigstack.h (struct sigstack): Likewise. (stack_t): Likewise. (SS_ONSTACK): Likewise. (SS_DISABLE): Likewise. * sysdeps/unix/sysv/linux/bits/sigstack.h (struct sigstack): Likewise. (stack_t): Likewise. (SS_ONSTACK): Likewise. (SS_DISABLE): Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigstack.h: Likewise. * sysdeps/unix/sysv/linux/ia64/bits/sigstack.h (struct sigstack): Likewise. (stack_t): Likewise. (SS_ONSTACK): Likewise. (SS_DISABLE): Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h (struct sigstack): Likewise. (stack_t): Likewise. (SS_ONSTACK): Likewise. (SS_DISABLE): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigstack.h (struct sigstack): Likewise. (stack_t): Likewise. (SS_ONSTACK): Likewise. (SS_DISABLE): Likewise. * sysdeps/arm/sys/ucontext.h: Include <bits/types/struct_sigstack.h>, <bits/types/stack_t.h> and <bits/ss_flags.h>. * sysdeps/generic/sys/ucontext.h: Likewise. * sysdeps/i386/sys/ucontext.h: Likewise. * sysdeps/m68k/sys/ucontext.h: Likewise. * sysdeps/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Likewise.
* Condition some sys/ucontext.h contents on __USE_MISC (bug 21457).Joseph Myers2017-05-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the fixes for namespace issues arising from sys/ucontext.h, this patch conditions various definitions, that are not needed for defining mcontext_t / ucontext_t, on __USE_MISC, so they do not appear in strict POSIX modes. This patch is non-exhaustive; that is, it only conditions straightforward cases and there may be more such definitions that can be conditioned for these and other architectures, to be dealt with later in separate patches. Also, using __USE_MISC is the minimum change for these definitions where they conflict with POSIX; some headers already have __USE_GNU conditionals on similar definitions of names for registers. The patch specifically does not do anything with definitions in bits/sigcontext.h, and nor does it condition any inclusions of bits/sigcontext.h even where in fact that is not needed on some architectures for the definitions of mcontext_t / ucontext_t. As other namespace issues in these headers remain, this patch does not fix bug 21457, nor allow any XFAILs to be removed. Tested with build-many-glibcs.py. [BZ #21457] * sysdeps/arm/sys/ucontext.h (R0): Condition on [__USE_MISC]. (R1): Likewise. (R2): Likewise. (R3): Likewise. (R4): Likewise. (R5): Likewise. (R6): Likewise. (R7): Likewise. (R8): Likewise. (R9): Likewise. (R10): Likewise. (R11): Likewise. (R12): Likewise. (R13): Likewise. (R14): Likewise. (R15): Likewise. * sysdeps/i386/sys/ucontext.h (REG_GS): Likewise. (REG_FS): Likewise. (REG_ES): Likewise. (REG_DS): Likewise. (REG_EDI): Likewise. (REG_ESI): Likewise. (REG_EBP): Likewise. (REG_ESP): Likewise. (REG_EBX): Likewise. (REG_EDX): Likewise. (REG_ECX): Likewise. (REG_EAX): Likewise. (REG_TRAPNO): Likewise. (REG_ERR): Likewise. (REG_EIP): Likewise. (REG_CS): Likewise. (REG_EFL): Likewise. (REG_UESP): Likewise. (REG_SS): Likewise. * sysdeps/m68k/sys/ucontext.h (R_D0): Likewise. (R_D1): Likewise. (R_D2): Likewise. (R_D3): Likewise. (R_D4): Likewise. (R_D5): Likewise. (R_D6): Likewise. (R_D7): Likewise. (R_A0): Likewise. (R_A1): Likewise. (R_A2): Likewise. (R_A3): Likewise. (R_A4): Likewise. (R_A5): Likewise. (R_A6): Likewise. (R_A7): Likewise. (R_SP): Likewise. (R_PC): Likewise. (R_PS): Likewise. (fpregset_t): Likewise. (MCONTEXT_VERSION): Likewise. * sysdeps/mips/sys/ucontext.h (CTX_R0): Likewise. (CTX_AT): Likewise. (CTX_V0): Likewise. (CTX_V1): Likewise. (CTX_A0): Likewise. (CTX_A1): Likewise. (CTX_A2): Likewise. (CTX_A3): Likewise. (CTX_T0): Likewise. (CTX_T1): Likewise. (CTX_T2): Likewise. (CTX_T3): Likewise. (CTX_T4): Likewise. (CTX_T5): Likewise. (CTX_T6): Likewise. (CTX_T7): Likewise. (CTX_S0): Likewise. (CTX_S1): Likewise. (CTX_S2): Likewise. (CTX_S3): Likewise. (CTX_S4): Likewise. (CTX_S5): Likewise. (CTX_S6): Likewise. (CTX_S7): Likewise. (CTX_T8): Likewise. (CTX_T9): Likewise. (CTX_K0): Likewise. (CTX_K1): Likewise. (CTX_GP): Likewise. (CTX_SP): Likewise. (CTX_S8): Likewise. (CTX_RA): Likewise. (CTX_MDLO): Likewise. (CTX_MDHI): Likewise. (CTX_CAUSE): Likewise. (CTX_EPC): Likewise. * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Condition inclusion of <sys/procfs.h> on [__USE_MISC]. (greg_t): Condition on [__USE_MISC]. (gregset_t): Likewise. (fpregset_t): Likewise. * sysdeps/unix/sysv/linux/arm/sys/ucontext.h (greg_t): Likewise. (NGREG): Likewise. (gregset_t): Likewise. (REG_R0): Likewise. (REG_R1): Likewise. (REG_R2): Likewise. (REG_R3): Likewise. (REG_R4): Likewise. (REG_R5): Likewise. (REG_R6): Likewise. (REG_R7): Likewise. (REG_R8): Likewise. (REG_R9): Likewise. (REG_R10): Likewise. (REG_R11): Likewise. (REG_R12): Likewise. (REG_R13): Likewise. (REG_R14): Likewise. (REG_R15): Likewise. (struct _libc_fpstate): Likewise. (fpregset_t): Likewise. * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h (NGREG): Likewise. (NFPREG): Likewise. (gregset_t): Likewise. (fpregset_t): Likewise. * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h (R_D0): Likewise. (R_D1): Likewise. (R_D2): Likewise. (R_D3): Likewise. (R_D4): Likewise. (R_D5): Likewise. (R_D6): Likewise. (R_D7): Likewise. (R_A0): Likewise. (R_A1): Likewise. (R_A2): Likewise. (R_A3): Likewise. (R_A4): Likewise. (R_A5): Likewise. (R_A6): Likewise. (R_A7): Likewise. (R_SP): Likewise. (R_PC): Likewise. (R_PS): Likewise. (fpregset_t): Likewise. (MCONTEXT_VERSION): Likewise. * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h (MCONTEXT_VERSION): Likewise. * sysdeps/unix/sysv/linux/sh/sys/ucontext.h (REG_R0): Likewise. (REG_R1): Likewise. (REG_R2): Likewise. (REG_R3): Likewise. (REG_R4): Likewise. (REG_R5): Likewise. (REG_R6): Likewise. (REG_R7): Likewise. (REG_R8): Likewise. (REG_R9): Likewise. (REG_R10): Likewise. (REG_R11): Likewise. (REG_R12): Likewise. (REG_R13): Likewise. (REG_R14): Likewise. (REG_R15): Likewise. * sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Condition inclusion of <arch/abi.h> on [__USE_MISC]. (greg_t): Condition on [__USE_MISC]. (NGREG): Likewise. (gregset_t): Likewise.
* Add HWCAP_ASIMDRDM from Linux 4.11 to AArch64 bits/hwcap.h.Joseph Myers2017-05-031-0/+1
| | | | | | | | | | This patch adds the HWCAP_ASIMDRDM macro from Linux 4.11 to the AArch64 bits/hwcap.h. Tested (compilation only) with build-many-glibcs.py. * sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h (HWCAP_ASIMDRDM): New macro.
* Consolidate Linux mmap implementation (BZ#21270)Adhemerval Zanella2017-04-121-34/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch consolidates all Linux mmap implementations on default sysdeps/unix/sysv/linux/mmap{64}.c one. To accomodate all required architecture specific requeriments a new internal header is created (mmap_internal.h) where each architecture add its specific code requirements. Currently only x86_64 (to define MMAP_PREPARE to add MAP_32BITS), s390 (which have a different kernel ABI for mmap), m68k (which have variable minimum page sizes), and MIPS n32 (which zero extend the offset to handle negative one correctly) redefine the new header. The patch also fixes BZ#21270 where default mmap64 on architectures which uses mmap2 silent truncates large offsets value (larger than 1 << (page shift + 8 * sizeof (off_t)) or 1<<44 on architectures with 4096 bytes page size). The new consolidate implementation returns EINVAL as allowed by POSIX. It also adds a tests for on current tst-mmap-offset one. I have run a full make check on x86_64, x86_64-32, i686, aarch64, armhf, powerpc, powerpc64le, sparc64, and sparcv9 without any regressions. I also ran some basic tests (tst-mmap-offset) on sh4, m68k, and on qemu simulated MIPS32 and MIPS64. [BZ #21270] * posix/tst-mmap-offset.c (do_prepare): New function. (do_test): Rename to do_test_bz18877 and use FAIL_RET. (do_test_bz21270): New function. * sysdeps/unix/sysv/linux/aarch64/mmap.c: Remove file. * sysdeps/unix/sysv/linux/arm/mmap.c: Remove file. * sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c: Likewise. * sysdeps/unix/sysv/linux/hppa/mmap.c: Likewise. * sysdeps/unix/sysv/linux/i386/mmap.c: Likewise. * sysdeps/unix/sysv/linux/m68k/mmap.S: Likewise. * sysdeps/unix/sysv/linux/m68k/mmap64.c: Likewise. * sysdeps/unix/sysv/linux/microblaze/mmap.S: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/mmap.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/mmap.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/mmap64.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/mmap.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/mmap.S: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/mmap.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/mmap64.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/mmap.c: Likewise. * sysdeps/unix/sysv/linux/mmap_internal.h: New file. * sysdeps/unix/sysv/linux/m68k/mmap_internal.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/mmap_internal.h: Likewise. * sysdeps/unix/sysv/linux/s390/mmap_internal.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/mmap_internal.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Remove mmap from auto-generation list. * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mmap.c: New file. * sysdeps/unix/sysv/linux/mmap64.c (__mmap64): Add check for invalid offsets and support for mmap2 syscall.
* Add ifunc support for aarch64.Steve Ellcey2017-03-155-0/+186
| | | | | | | | | | | * sysdeps/aarch64/dl-machine.h: Include cpu-features.c. (DL_PLATFORM_INIT): New define. (dl_platform_init): New function. * sysdeps/aarch64/ldsodefs.h: Include cpu-features.h. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c: New file. * sysdeps/unix/sysv/linux/aarch64/cpu-features.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c: Likewise. * sysdeps/unix/sysv/linux/aarch64/libc-start.c: Likewise.
* Consolidate Linux send implementationAdhemerval Zanella2017-03-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch consolidates the send Linux syscall implementation on sysdeps/unix/sysv/linux/send{to}.c. The changes are: 1. Remove send from auto-generation syscalls.list on the architecture that uses __NR_send. 2. Define __NR_send for architectures that supports it. It was done instead of defining in default kernel-features.h because current Linux practice for new ports are to implement only __NR_sendto [1] and it will require adding new kernel-features for ports that do not require it (aarch64 for instance). 3. Remove __ASSUME_SENDTO_FOR_SEND_SYSCALL and decide to use __NR_sendto for send generation based on __ASSUME_SENDTO_SYSCALL. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/sysdep.h (HAVE_INTERNAL_SEND_SYMBOL): Define. * sysdeps/unix/sysv/linux/aarch64/sysdep.h (HAVE_INTERNAL_SEND_SYMBOL): Undefine. * sysdeps/unix/sysv/linux/nios2/sysdep.h (HAVE_INTERNAL_SEND_SYMBOL): Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h (HAVE_INTERNAL_SEND_SYMBOL): Likewise. * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__ASSUME_RECV_SYSCALL): Define. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/hppa/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/i386/kernel-features.h (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Remove define. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/s390/kernel-features.h (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove send from auto-generation list. * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewike. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/send.c: Simplify includes. (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Replace by __ASSUME_SENDTO_SYSCALL. * sysdeps/unix/sysv/linux/x86_64/send.c: Remove file. * sysdeps/unix/sysv/linux/mips/mips64/send.c: Likewise. * sysdeps/unix/sysv/linux/generic/send.c: Likewise.
* aarch64: fix errno address calculation in SYSCALL_ERROR_HANDLERAdhemerval Zanella2017-02-081-1/+1
| | | | | | | | | | | | | | | This patch fixes the last regression in LTP lite scenario (mmap16) comparing to lp64 in my source trees [1, 2]. The fix has been suggested back in 2015 [3] but was never applied. Checked on aarch64-linux-gnu. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: use PTR_REG() for offset calculation in SYSCALL_ERROR_HANDLER(). [1] https://github.com/norov/glibc/tree/dev9 [2] https://github.com/norov/linux/tree/ilp32-20170203 [3] https://sourceware.org/ml/libc-alpha/2015-03/msg00587.html
* Add Linux PTRACE_EVENT_STOPKir Kolyshkin2017-02-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | Add PTRACE_EVENT_STOP value to Linux's sys/ptrace.h, modify related comments accordingly. This constant initially appeared in Linux 3.1 (kernel commit 3544d72a, "ptrace: implement PTRACE_SEIZE") but its value has changed later in Linux 3.4 (kernel commit 5cdf389a, "ptrace: renumber PTRACE_EVENT_STOP so that future new options and events can match"). The comment is also taken from the above commit. This constant is used by e.g. strace, CRIU, Mozilla RR. * sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h (__ptrace_eventcodes): Add PTRACE_EVENT_STOP. * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/s390/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/tile/sys/ptrace.h: Likewise.