This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/N, MPX, x86_64] Intel MPX support in glibc for x86_64
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: "Zamyatin, Igor" <igor dot zamyatin at intel dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Wed, 9 Apr 2014 17:12:08 -0700
- Subject: Re: [PATCH 2/N, MPX, x86_64] Intel MPX support in glibc for x86_64
- Authentication-results: sourceware.org; auth=none
- References: <0EFAB2BDD0F67E4FB6CCC8B9F87D756942973E8E at IRSMSX101 dot ger dot corp dot intel dot com> <CAMe9rOpOjjj7-Dzq9=bL2POFO46K=sz2hmSshqNzHRV5chzXZg at mail dot gmail dot com> <5345D627 dot 50302 at twiddle dot net>
On Wed, Apr 9, 2014 at 4:22 PM, Richard Henderson <rth@twiddle.net> wrote:
> On 04/09/2014 03:56 PM, H.J. Lu wrote:
>> +# else
>> + byte 0x66,0x0f,0x1b,0x84,0x24,0xc0,0x02,0x00,0x00
>> + byte 0x66,0x0f,0x1b,0x8c,0x24,0xd0,0x02,0x00,0x00
>> + byte 0x66,0x0f,0x1b,0x84,0x24,0xe0,0x02,0x00,0x00
>> + byte 0x66,0x0f,0x1b,0x8c,0x24,0xf0,0x02,0x00,0x00
>> ^^^^^^^^^ This should be .byte.
>> +# endif
>> +# endif
>> 3.
>> byte 0x66,0x0f,0x1b,0x84,0x24,0xc0,0x02,0x00,0x00
>> ^^^^^^^^^^^^^^^^^^^^^^^ This
>> hardcods the offset. Please add
>>
>> #if LR_BND_OFFSET != xxxx
>> # error LR_BND_OFFSET is not xxx
>> #endif
>
> Wouldn't it be just as easy to do
>
> .byte 0x66,0x0f,0x1b,0x84,0x24; .long LR_BND_OFFSET
>
> after all, you know how and where that offset is going to be encoded.
Sure. We can do that after verifying LR_BND_OFFSET >= 0x80.
H.J.