[PATCH 1/N, MPX, x86_64] Intel MPX support in glibc for x86_64

H.J. Lu hjl.tools@gmail.com
Wed Apr 2 17:44:00 GMT 2014


On Tue, Apr 1, 2014 at 12:43 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Apr 1, 2014 at 11:29 AM, Roland McGrath <roland@hack.frob.com> wrote:
>> Can you use some macros for the stack offset constants?  There are too many
>> magic numbers and too much undescribed arithmetic in that code already.
>> That should be able to consolidate the #ifdef __ILP32__ into one spot.
>>
>
> This patch defines REGISTER_SAVE_AREA to specify area on stack
> to save/restore registers used in parameter passing.  I didn't add stack
> offset macros for individual registers.  I can submit a separate patch if
> it is desired.
>
> Any feedbacks on this patch?
>

It turns out that we can align 16-byte bound register save area to
16 bytes.  This patch defines REGISTER_SAVE_XXX for each
register and align bound register save area to 16 bytes.

Any comments?

Thanks.


-- 
H.J.

--
2014-04-02  Igor Zamyatin  <igor.zamyatin@intel.com>
   H.J. Lu  <hongjiu.lu@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 (REGISTER_SAVE_AREA): New
macro.
(REGISTER_SAVE_RAX): Likewise.
(REGISTER_SAVE_RCX): Likewise.
(REGISTER_SAVE_RDX): Likewise.
(REGISTER_SAVE_RSI): Likewise.
(REGISTER_SAVE_RDI): Likewise.
(REGISTER_SAVE_R8): Likewise.
(REGISTER_SAVE_R9): Likewise.
(REGISTER_SAVE_BND0): Likewise.
(REGISTER_SAVE_BND1): Likewise.
(REGISTER_SAVE_BND2): Likewise.
(_dl_runtime_resolve): Use them.  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: 9278 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140402/79c18597/attachment.bin>


More information about the Libc-alpha mailing list