[PATCH 1/N, MPX, x86_64] Intel MPX support in glibc for x86_64
H.J. Lu
hjl.tools@gmail.com
Tue Apr 1 18:07:00 GMT 2014
On Thu, Mar 27, 2014 at 11:11 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Mar 17, 2014 at 11:09 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> 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.
>>
>
> Are there any comments, feedbacks or objections?
>
> Thanks.
Hi,
This is the final patch to save and restore bound registers
in _dl_runtime_resolve. Tested with MPX and non-MPX
binutils on x86-64 and x32. I will push it onto master if
there is no objection in 24 hours.
Thanks.
--
H.J.
--
2014-04-01 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): Save and
restore Intel MPX bound registers when calling _dl_fixup.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Save-restore-bound-registers-in-_dl_runtime_resolve.patch
Type: text/x-patch
Size: 6542 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140401/8e564f8f/attachment.bin>
More information about the Libc-alpha
mailing list