This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/15128] dynamic loader may clobber floating-point parameters on AArch64


https://sourceware.org/bugzilla/show_bug.cgi?id=15128

--- Comment #21 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/plt/2.21 has been created
        at  1d0171e6e5c5a2f80e2e805c89908e7c5e9c78fb (commit)

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1d0171e6e5c5a2f80e2e805c89908e7c5e9c78fb

commit 1d0171e6e5c5a2f80e2e805c89908e7c5e9c78fb
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jul 29 04:49:38 2015 -0700

    Use SSE optimized strcmp in x86-64 ld.so

    Since ld.so preserves vector registers now, we can SSE optimized strcmp
    in x86-64 ld.so.

        * sysdeps/x86_64/strcmp.S: Remove "#if !IS_IN (libc)".

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=27299d1fa30a41c8cffd7170702c220f2ef52d0e

commit 27299d1fa30a41c8cffd7170702c220f2ef52d0e
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jul 29 03:56:14 2015 -0700

    Remove x86-64 rtld-xxx.c and rtld-xxx.S

    Since ld.so preserves vector registers now, we can use the regular,
    non-ifunc string and memory functions in ld.so.

        * sysdeps/x86_64/rtld-memcmp.c: Removed.
        * sysdeps/x86_64/rtld-memset.S: Likewise.
        * sysdeps/x86_64/rtld-strchr.S: Likewise.
        * sysdeps/x86_64/rtld-strlen.S: Likewise.
        * sysdeps/x86_64/multiarch/rtld-memcmp.c: Likewise.
        * sysdeps/x86_64/multiarch/rtld-memset.S: Likewise.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e4f5723190ac2871441093e6cdfe33c556ab4772

commit e4f5723190ac2871441093e6cdfe33c556ab4772
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jul 29 03:47:54 2015 -0700

    Replace %xmm8 with %xmm0

    Since ld.so preserves vector registers now, we can use %xmm0 to avoid
    the REX prefix.

        * sysdeps/x86_64/memset.S: Replace %xmm8 with %xmm0.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bb68a9b5305713b3493650bc4c322ab2f45240c5

commit bb68a9b5305713b3493650bc4c322ab2f45240c5
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jul 29 03:44:39 2015 -0700

    Replace %xmm[8-12] with %xmm[0-4]

    Since ld.so preserves vector registers now, we can use %xmm[0-4] to
    avoid the REX prefix.

        * sysdeps/x86_64/strlen.S: Replace %xmm[8-12] with %xmm[0-4].

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0136a228ed15d5cd267d0c2608c3b06962e8761e

commit 0136a228ed15d5cd267d0c2608c3b06962e8761e
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jul 28 18:56:18 2015 -0700

    Don't disable SSE in x86-64 ld.so

    Since ld.so preserves vector registers now, we can use SSE in ld.so.

        * sysdeps/i386/Makefile [$(subdir) == elf] (CFLAGS-.os): Add
        -mno-sse -mno-mmx for $(all-rtld-routines).
        [$(subdir) == elf] (tests-special): Add
        $(objpfx)tst-ld-sse-use.out.
        [$(subdir) == elf] ($(objpfx)tst-ld-sse-use.out): New rule.
        * sysdeps/x86/Makefile [$(subdir) == elf] (CFLAGS-.os): Removed.
        [$(subdir) == elf] (tests-special): Likewise.
        [$(subdir) == elf] ($(objpfx)tst-ld-sse-use.out): Likewise.
        * sysdeps/x86_64/Makefile [$(subdir) == elf] (CFLAGS-.os): Add
        -mno-mmx for $(all-rtld-routines).

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ba9897f7c66deae4ca166e176e61d25bd88f15cf

commit ba9897f7c66deae4ca166e176e61d25bd88f15cf
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Jul 11 13:25:25 2015 -0700

    Save and restore vector registers in x86-64 ld.so

    This patch initiaizes GLRO(dl_x86_xstate) in dl_platform_init to
    indicate if the processor supports SSE, AVX or AVX512.  It uses
    this information to properly save and restore vector registers in
    ld.so.  Now we can use SSE in ld.so and delete FOREIGN_CALL macros.
    We can also retire the rtld_must_xmm_save field and remove the
    rtld_savespace_sse field in tcbhead_t.  It is safe since they are
    internal to glibc.

        [BZ #15128]
        * sysdeps/x86_64/Makefile [$(subdir) == elf] (tests): Add
        ifuncmain8.
        (modules-names): Add ifuncmod8.
        ($(objpfx)ifuncmain8): New rule.
        * sysdeps/x86_64/dl-machine.h: Include <dl-procinfo.h> and
        <cpuid.h>.
        (elf_machine_runtime_setup): Use _dl_runtime_resolve_sse,
        _dl_runtime_resolve_avx, or _dl_runtime_resolve_avx512,
        _dl_runtime_profile_sse, _dl_runtime_profile_avx, or
        _dl_runtime_profile_avx512, based on HAS_ARCH_FEATURE.
        * sysdeps/x86_64/dl-trampoline.S: Rewrite.
        * sysdeps/x86_64/dl-trampoline.h: Likewise.
        * sysdeps/x86_64/ifuncmain8.c: New file.
        * sysdeps/x86_64/ifuncmod8.c: Likewise.
        * sysdeps/x86_64/nptl/tcb-offsets.sym (RTLD_SAVESPACE_SSE):
        Removed.
        * sysdeps/x86_64/nptl/tls.h (__128bits): Removed.
        (tcbhead_t): CHange rtld_must_xmm_save to __glibc_unused1.
        Remove rtld_savespace_sse and __padding.
        (RTLD_CHECK_FOREIGN_CALL): Removed.
        (RTLD_ENABLE_FOREIGN_CALL): Likewise.
        (RTLD_PREPARE_FOREIGN_CALL): Likewise.
        (RTLD_FINALIZE_FOREIGN_CALL): Likewise.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cd6c53d1724cbea49f9988d7427a3d3af3c32a25

commit cd6c53d1724cbea49f9988d7427a3d3af3c32a25
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Jul 12 14:41:20 2015 -0700

    Align stack when calling __errno_location

    We should align stack to 16 bytes when calling __errno_location.

        [BZ #18661]
        * sysdeps/x86_64/fpu/s_cosf.S (__cosf): Align stack to 16 bytes
        when calling __errno_location.
        * sysdeps/x86_64/fpu/s_sincosf.S (__sincosf): Likewise.
        * sysdeps/x86_64/fpu/s_sinf.S (__sinf): Likewise.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=587bbbd2d9b6d769bc7857f0ecf0f96ad8e02722

commit 587bbbd2d9b6d769bc7857f0ecf0f96ad8e02722
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Jul 12 14:40:25 2015 -0700

    Align stack to 16 bytes when calling __gettimeofday

    Subtract stack by 24 bytes instead of 16 bytes so that stack is aligned
    to 16 bytes when calling __gettimeofday.

        [BZ #18661]
        * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
        (__lll_timedwait_tid): Align stack to 16 bytes when calling
        __gettimeofday.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7b796bc60c397093ee02a7079423118c31a0df58

commit 7b796bc60c397093ee02a7079423118c31a0df58
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Jul 12 14:38:58 2015 -0700

    Align stack to 16 bytes when calling __setcontext

    Don't use pop to restore %rdi so that stack is aligned to 16 bytes
    when calling __setcontext.

        [BZ #18661]
        * sysdeps/unix/sysv/linux/x86_64/__start_context.S
        (__start_context): Don't use pop to restore %rdi so that stack
        is aligned to 16 bytes when calling __setcontext.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=aa2e81690321aa68c15b744ab999ee8b3dd5efe0

commit aa2e81690321aa68c15b744ab999ee8b3dd5efe0
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jul 29 03:41:58 2015 -0700

    Compile {memcpy,strcmp}-sse2-unaligned.S only for libc

    {memcpy,strcmp}-sse2-unaligned.S aren't needed in ld.so.

        * sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S: Compile
        only for libc.
        * sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S: Likewise.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=620df9822fd48998036a1cd10c0d3149d82db2e6

commit 620df9822fd48998036a1cd10c0d3149d82db2e6
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Aug 1 07:47:16 2015 -0700

    Update x86 elision-conf.c for <cpu-features.h>

    This patch updates x86 elision-conf.c to use the newly defined
    HAS_CPU_FEATURE from <cpu-features.h>.

        * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
        Replace HAS_RTM with HAS_CPU_FEATURE (RTM).

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9946830a08c1c5506a37f92042be65d7f45d4081

commit 9946830a08c1c5506a37f92042be65d7f45d4081
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jul 31 16:52:19 2015 -0700

    Update i686 multiarch functions for <cpu-features.h>

    This patch updates i686 multiarch functions to use the newly defined
    HAS_CPU_FEATURE, HAS_ARCH_FEATURE, LOAD_GOT_AND_RTLD_GLOBAL_RO and
    LOAD_FUNC_GOT_EAX from <cpu-features.h>.

        * sysdeps/i386/i686/fpu/multiarch/e_expf.c: Replace HAS_XXX
        with HAS_CPU_FEATURE/HAS_ARCH_FEATURE (XXX).
        * sysdeps/i386/i686/fpu/multiarch/s_cosf.c: Likewise.
        * sysdeps/i386/i686/fpu/multiarch/s_cosf.c: Likewise.
        * sysdeps/i386/i686/fpu/multiarch/s_sincosf.c: Likewise.
        * sysdeps/i386/i686/fpu/multiarch/s_sinf.c: Likewise.
        * sysdeps/i386/i686/multiarch/ifunc-impl-list.c: Likewise.
        * sysdeps/i386/i686/multiarch/s_fma.c: Likewise.
        * sysdeps/i386/i686/multiarch/s_fmaf.c: Likewise.
        * sysdeps/i386/i686/multiarch/bcopy.S: Remove __init_cpu_features
        call.  Merge SHARED and !SHARED.  Add LOAD_GOT_AND_RTLD_GLOBAL_RO.
        Use LOAD_FUNC_GOT_EAX to load function address.  Replace HAS_XXX
        with HAS_CPU_FEATURE/HAS_ARCH_FEATURE (XXX).
        * sysdeps/i386/i686/multiarch/bzero.S: Likewise.
        * sysdeps/i386/i686/multiarch/memchr.S: Likewise.
        * sysdeps/i386/i686/multiarch/memcmp.S: Likewise.
        * sysdeps/i386/i686/multiarch/memcpy.S: Likewise.
        * sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise.
        * sysdeps/i386/i686/multiarch/memmove.S: Likewise.
        * sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise.
        * sysdeps/i386/i686/multiarch/mempcpy.S: Likewise.
        * sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise.
        * sysdeps/i386/i686/multiarch/memrchr.S: Likewise.
        * sysdeps/i386/i686/multiarch/memset.S: Likewise.
        * sysdeps/i386/i686/multiarch/memset_chk.S: Likewise.
        * sysdeps/i386/i686/multiarch/rawmemchr.S: Likewise.
        * sysdeps/i386/i686/multiarch/strcasecmp.S: Likewise.
        * sysdeps/i386/i686/multiarch/strcat.S: Likewise.
        * sysdeps/i386/i686/multiarch/strchr.S: Likewise.
        * sysdeps/i386/i686/multiarch/strcmp.S: Likewise.
        * sysdeps/i386/i686/multiarch/strcpy.S: Likewise.
        * sysdeps/i386/i686/multiarch/strcspn.S: Likewise.
        * sysdeps/i386/i686/multiarch/strlen.S: Likewise.
        * sysdeps/i386/i686/multiarch/strncase.S: Likewise.
        * sysdeps/i386/i686/multiarch/strnlen.S: Likewise.
        * sysdeps/i386/i686/multiarch/strrchr.S: Likewise.
        * sysdeps/i386/i686/multiarch/strspn.S: Likewise.
        * sysdeps/i386/i686/multiarch/wcschr.S: Likewise.
        * sysdeps/i386/i686/multiarch/wcscmp.S: Likewise.
        * sysdeps/i386/i686/multiarch/wcscpy.S: Likewise.
        * sysdeps/i386/i686/multiarch/wcslen.S: Likewise.
        * sysdeps/i386/i686/multiarch/wcsrchr.S: Likewise.
        * sysdeps/i386/i686/multiarch/wmemcmp.S: Likewise.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3f6b394498dfcc16cce52a6fcbd121995bcfd2df

commit 3f6b394498dfcc16cce52a6fcbd121995bcfd2df
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jul 31 13:41:04 2015 -0700

    Update x86_64 multiarch functions for <cpu-features.h>

    This patch updates x86_64 multiarch functions to use the newly defined
    HAS_CPU_FEATURE, HAS_ARCH_FEATURE and LOAD_RTLD_GLOBAL_RO_RDX from
    <cpu-features.h>.

        * sysdeps/x86_64/fpu/multiarch/e_asin.c: Replace HAS_XXX with
        HAS_CPU_FEATURE/HAS_ARCH_FEATURE (XXX).
        * sysdeps/x86_64/fpu/multiarch/e_atan2.c: Likewise.
        * sysdeps/x86_64/fpu/multiarch/e_exp.c: Likewise.
        * sysdeps/x86_64/fpu/multiarch/e_log.c: Likewise.
        * sysdeps/x86_64/fpu/multiarch/e_pow.c: Likewise.
        * sysdeps/x86_64/fpu/multiarch/s_atan.c: Likewise.
        * sysdeps/x86_64/fpu/multiarch/s_fma.c: Likewise.
        * sysdeps/x86_64/fpu/multiarch/s_fmaf.c: Likewise.
        * sysdeps/x86_64/fpu/multiarch/s_sin.c: Likewise.
        * sysdeps/x86_64/fpu/multiarch/s_tan.c: Likewise.
        * sysdeps/x86_64/multiarch/ifunc-impl-list.c: Likewise.
        * sysdeps/x86_64/multiarch/sched_cpucount.c: Likewise.
        * sysdeps/x86_64/multiarch/strstr.c: Likewise.
        * sysdeps/x86_64/multiarch/memmove.c: Likewise.
        * sysdeps/x86_64/multiarch/memmove_chk.c: Likewise.
        * sysdeps/x86_64/multiarch/test-multiarch.c: Likewise.
        * sysdeps/x86_64/multiarch/memcmp.S: Remove __init_cpu_features
        call.  Add LOAD_RTLD_GLOBAL_RO_RDX.  Replace HAS_XXX with
        HAS_CPU_FEATURE/HAS_ARCH_FEATURE (XXX).
        * sysdeps/x86_64/multiarch/memcpy.S: Likewise.
        * sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise.
        * sysdeps/x86_64/multiarch/mempcpy.S: Likewise.
        * sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise.
        * sysdeps/x86_64/multiarch/memset.S: Likewise.
        * sysdeps/x86_64/multiarch/memset_chk.S: Likewise.
        * sysdeps/x86_64/multiarch/strcat.S: Likewise.
        * sysdeps/x86_64/multiarch/strchr.S: Likewise.
        * sysdeps/x86_64/multiarch/strcmp.S: Likewise.
        * sysdeps/x86_64/multiarch/strcpy.S: Likewise.
        * sysdeps/x86_64/multiarch/strcspn.S: Likewise.
        * sysdeps/x86_64/multiarch/strspn.S: Likewise.
        * sysdeps/x86_64/multiarch/wcscpy.S: Likewise.
        * sysdeps/x86_64/multiarch/wmemcmp.S: Likewise.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c15eacc82903a779ff1ee6374ba66594735d5cb1

commit c15eacc82903a779ff1ee6374ba66594735d5cb1
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jul 31 07:30:04 2015 -0700

    Add _dl_x86_cpu_features to rtld_global in ld.so

    This patch adds _dl_x86_cpu_features to rtld_global in x86 ld.so
    and initializes it early before __libc_start_main is called so that
    cpu_features is always available when it is used and we can avoid
    calling __init_cpu_features in IFUNC selectors.

        * sysdeps/i386/dl-machine.h: Include <cpu-features.c>.
        (dl_platform_init): Call init_cpu_features.
        * sysdeps/i386/dl-procinfo.c (_dl_x86_cpu_features): New.
        * sysdeps/i386/i686/cacheinfo.c
        (DISABLE_PREFERRED_MEMORY_INSTRUCTION): Removed.
        * sysdeps/i386/i686/multiarch/ifunc-defines.sym (KIND_OFFSET):
        Removed.
        * sysdeps/i386/ldsodefs.h: Include <cpu-features.h>.
        * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c: Include
        <sysdeps/x86_64/dl-procinfo.c> instead of
        sysdeps/generic/dl-procinfo.c>.
        * sysdeps/x86/Makefile [$(subdir) == csu] (gen-as-const-headers):
        Add cpu-features-offsets.sym and rtld-global-offsets.sym.
        * sysdeps/x86/cpu-features-offsets.sym: New file.
        * sysdeps/x86/cpu-features.c: Likewise.
        * sysdeps/x86/cpu-features.h: Likewise.
        * sysdeps/x86/libc-start.c: Likewise.
        * sysdeps/x86/rtld-global-offsets.sym: Likewise.
        * sysdeps/x86_64/dl-procinfo.c: Likewise.
        * sysdeps/x86_64/cacheinfo.c (__cpuid_count): Removed.
        Assume USE_MULTIARCH is defined and don't check it.
        (is_intel): Replace __cpu_features with GLRO(dl_x86_cpu_features).
        (is_amd): Likewise.
        (max_cpuid): Likewise.
        (intel_check_word): Likewise.
        (__cache_sysconf): Don't call __init_cpu_features.
        (__x86_preferred_memory_instruction): Removed.
        (init_cacheinfo): Don't call __init_cpu_features. Replace
        __cpu_features with GLRO(dl_x86_cpu_features).
        * sysdeps/x86_64/dl-machine.h: <cpu-features.c>.
        (dl_platform_init): Call init_cpu_features.
        * sysdeps/x86_64/ldsodefs.h: Include <cpu-features.h>.
        * sysdeps/x86_64/multiarch/cacheinfo.c: Removed.
        * sysdeps/x86_64/multiarch/ifunc-defines.sym (KIND_OFFSET):
        Removed.
        * sysdeps/x86_64/multiarch/init-arch.c: Rewrite.
        * sysdeps/x86_64/multiarch/init-arch.h: Likewise.

-----------------------------------------------------------------------

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]