This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [x86-64 psABI] RFC: Extend x86-64 PLT entry to support MPX

On Wed, Jul 24, 2013 at 9:45 AM, Ian Lance Taylor <> wrote:
> On Tue, Jul 23, 2013 at 12:49 PM, H.J. Lu <> wrote:
>> introduces 4 bound registers, which will be used for parameter passing
>> in x86-64.  Bound registers are cleared by branch instructions.  Branch
>> instructions with BND prefix will keep bound register contents.
> I took a very quick look at the doc.  Why shouldn't we run the kernel
> with BNDPRESERVE = 1, to avoid this behaviour of clearing the bound
> registers on branch instructions?  That would let us avoid these
> issues.

This doesn't work in case of legacy callees which return pointers.
The bound registers will be incorrect since they are set in the
last MPX function.  MPX callers will get wrong bounds on
pointers returned by legacy callees

>> I prefer the note section solution.  Any suggestions, comments?
> I concur, but why not use the ELF attributes support rather than a new
> note section?

The issues are

1. ELF attributes target static linker.  There is no support in
shared library nor executables.  We may need it to make run-time
decision based on MPX feature to select legacy or MPX share
2. ELF attribute lookup isn't very fast at run-time.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]