]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86-64: Properly align La_x86_64_retval to VEC_SIZE [BZ #22715]
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 19 Jan 2018 17:51:58 +0000 (09:51 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 19 Jan 2018 17:52:15 +0000 (09:52 -0800)
commit17d5d67f4f0350bdcfb5bf1a31cef2e14dabf7de
tree676390977e1ef9d86b7bad7ada28461244d9ca00
parentf24c345bf5486cc8d659f7a17463adcae402ec8e
x86-64: Properly align La_x86_64_retval to VEC_SIZE [BZ #22715]

_dl_runtime_profile calls _dl_call_pltexit, passing a pointer to
La_x86_64_retval which is allocated on stack.  The lrv_vector0
field in La_x86_64_retval must be aligned to size of vector register.
When allocating stack space for La_x86_64_retval, we need to make sure
that the address of La_x86_64_retval + RV_VECTOR0_OFFSET is aligned to
VEC_SIZE.  This patch checks the alignment of the lrv_vector0 field
and pads the stack space if needed.

Tested with x32 and x86-64 on SSE4, AVX and AVX512 machines.  It fixed

FAIL: elf/tst-audit10
FAIL: elf/tst-audit4
FAIL: elf/tst-audit5
FAIL: elf/tst-audit6
FAIL: elf/tst-audit7

on x32 AVX512 machine.

(cherry picked from commit 207a72e2988c6d6343f50fe0128eb4fc4edfdd15)

[BZ #22715]
* sysdeps/x86_64/dl-trampoline.h (_dl_runtime_profile): Properly
align La_x86_64_retval to VEC_SIZE.
ChangeLog
NEWS
sysdeps/x86_64/dl-trampoline.h