This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/N, MPX, x86_64] Intel MPX support in glibc for x86_64
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Zamyatin, Igor" <igor dot zamyatin at intel dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Mon, 17 Mar 2014 11:09:24 -0700
- Subject: Re: [PATCH 1/N, MPX, x86_64] Intel MPX support in glibc for x86_64
- Authentication-results: sourceware.org; auth=none
- References: <0EFAB2BDD0F67E4FB6CCC8B9F87D756942972119 at IRSMSX101 dot ger dot corp dot intel dot com>
On Mon, Mar 17, 2014 at 11:03 AM, Zamyatin, Igor
<igor.zamyatin@intel.com> wrote:
> Hi All!
>
> Attached patch is the first of the set of patches that add support for Intel MPX technology (see e.g. http://software.intel.com/sites/default/files/319433-015.pdf, Chapter 9) in Glibc for x86_64. Namely, this particular patch introduces bounds storing/restoring in _dl_runtime_resolve.
>
> Is it ok to install?
>
>
> Thanks,
> Igor
>
> 2014-03-13 Igor Zamyatin <igor.zamyatin@intel.com>
>
> * config.h.in (HAVE_MPX_SUPPORT): New #undef.
> * sysdeps/x86_64/configure.ac: Set HAVE_MPX_SUPPORT.
> * sysdeps/x86_64/configure: Regenerated.
> * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_resolve): Add storing
> and restoring of Intel MPX bound registers before and after call
> of_dl_fixup.
The reasons we need to save and restore bound registers in
symbol lookup are
1. Branches without BND prefix clear bound registers.
2. x86-64 pass bounds in bound registers as specified in MPX
psABI extension on hjl/mpx/master branch at
https://github.com/hjl-tools/x86-64-psABI
https://groups.google.com/forum/#!topic/x86-64-abi/KFsB0XTgWYc
Binutils has been updated to create an alternate PLT to
add BND prefix when branching to ld.so.
--
H.J.