From 14c5cbabc2d11004ab223ae5eae761ddf83ef99e Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Thu, 9 Jul 2015 06:50:12 -0700 Subject: Preserve bound registers for pointer pass/return We need to save/restore bound registers and add a BND prefix before branches in _dl_runtime_profile so that bound registers for pointer pass and return are preserved when LD_AUDIT is used. [BZ #18134] * sysdeps/i386/configure.ac: Set HAVE_MPX_SUPPORT. * sysdeps/i386/configure: Regenerated. * sysdeps/i386/dl-trampoline.S (PRESERVE_BND_REGS_PREFIX): New. (_dl_runtime_profile): Save and restore Intel MPX return bound registers when calling _dl_call_pltexit. Add PRESERVE_BND_REGS_PREFIX before return. * sysdeps/i386/link-defines.sym (LRV_BND0_OFFSET): New. (LRV_BND1_OFFSET): Likewise. * sysdeps/x86/bits/link.h (La_i86_retval): Add lrv_bnd0 and lrv_bnd1. * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix typo in bndmov encoding. * sysdeps/x86_64/dl-trampoline.h: Properly save and restore Intel MPX bound registers. Add PRESERVE_BND_REGS_PREFIX before branch instructions to preserve bounds. --- ChangeLog | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 1aeb84b0e9..f8765bb6b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2015-07-09 Igor Zamyatin + H.J. Lu + + [BZ #18134] + * sysdeps/i386/configure.ac: Set HAVE_MPX_SUPPORT. + * sysdeps/i386/configure: Regenerated. + * sysdeps/i386/dl-trampoline.S (PRESERVE_BND_REGS_PREFIX): New. + (_dl_runtime_profile): Save and restore Intel MPX return bound + registers when calling _dl_call_pltexit. Add + PRESERVE_BND_REGS_PREFIX before return. + * sysdeps/i386/link-defines.sym (LRV_BND0_OFFSET): New. + (LRV_BND1_OFFSET): Likewise. + * sysdeps/x86/bits/link.h (La_i86_retval): Add lrv_bnd0 and + lrv_bnd1. + * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix + typo in bndmov encoding. + * sysdeps/x86_64/dl-trampoline.h: Properly save and restore + Intel MPX bound registers. Add PRESERVE_BND_REGS_PREFIX before + branch instructions to preserve bounds. + 2015-07-09 Adhemerval Zanella * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist -- cgit v1.2.3