On Tue, Nov 11, 2014 at 1:33 PM, Joseph Myers <jos...@codesourcery.com> wrote:
> On Tue, 11 Nov 2014, Andi Kleen wrote:
>
>> On Tue, Nov 11, 2014 at 01:04:42PM -0800, H.J. Lu wrote:
>> > On Tue, Nov 11, 2014 at 1:01 PM, Andi Kleen <a...@firstfloor.org> wrote:
>> > >> It is similar to libsanitizer.  Put it in glibc isn't going to work well
>> > >> for MPX.
>> > >
>> > > Can you explain it more please?
>> > >
>> >
>> > Are you suggesting putting MPX run-time in glibc?  Will we have
>> > 2 glibc, one with MPX run-time and one without MPX run-time?
>>
>> No, I just think signal chaining should be in glibc.

Currently mpx-runtime uses

dlsym(RTLD_NEXT, "sigaction");

to get the original sigaction in liibc.so.  Glibc does provides __sigaction
for the original sigaction.  But dlsym(RTLD_NEXT, is more portable.

> I do wonder whether the signal handler needs to be enabled by default or
> whether there should simply be a function __mpx_handle_sigsegv provided
> with instructions to the user on how it can be used to get extra
> MPX-related information when SIGSEGV occurs (in which case it's entirely
> the user's responsibility to write a handler calling their own handler and
> the MPX one, if desired).  Or an LD_PRELOAD library like libSegFault.
>

It is certainly an option.

-- 
H.J.

Reply via email to