mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-09 04:11:27 +08:00
14c5cbabc2
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.
21 lines
771 B
Plaintext
21 lines
771 B
Plaintext
#include "link.h"
|
|
#include <stddef.h>
|
|
|
|
--
|
|
LONG_DOUBLE_SIZE sizeof (long double)
|
|
|
|
LR_SIZE sizeof (struct La_i86_regs)
|
|
LR_EDX_OFFSET offsetof (struct La_i86_regs, lr_edx)
|
|
LR_ECX_OFFSET offsetof (struct La_i86_regs, lr_ecx)
|
|
LR_EAX_OFFSET offsetof (struct La_i86_regs, lr_eax)
|
|
LR_EBP_OFFSET offsetof (struct La_i86_regs, lr_ebp)
|
|
LR_ESP_OFFSET offsetof (struct La_i86_regs, lr_esp)
|
|
|
|
LRV_SIZE sizeof (struct La_i86_retval)
|
|
LRV_EAX_OFFSET offsetof (struct La_i86_retval, lrv_eax)
|
|
LRV_EDX_OFFSET offsetof (struct La_i86_retval, lrv_edx)
|
|
LRV_ST0_OFFSET offsetof (struct La_i86_retval, lrv_st0)
|
|
LRV_ST1_OFFSET offsetof (struct La_i86_retval, lrv_st1)
|
|
LRV_BND0_OFFSET offsetof (struct La_i86_retval, lrv_bnd0)
|
|
LRV_BND1_OFFSET offsetof (struct La_i86_retval, lrv_bnd1)
|