[lkml]   [2019]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/5] glibc: Perform rseq(2) registration at C startup and thread creation (v10)
----- On Jun 6, 2019, at 1:57 PM, Florian Weimer wrote:

> * Mathieu Desnoyers:
>>> The final remaining case is static dlopen. There is a copy of on
>>> the dynamic side, but it is completely inactive and has never run. I do
>>> not think we need to support that because multi-threading does not work
>>> reliably in this scenario, either. However, we should skip rseq
>>> registration in a nested libc (see the rtld_active function).
>> So for SHARED, if (!rtld_active ()), we should indeed leave the state of
>> __rseq_handled as it is, because we are within a nested inactive
> I think we should add __rseq_handled initialization to, so it will
> only run once, ever.


> It's the registration from which needs some care. In
> particular, we must not override an existing registration.

OK, so it could check if __rseq_abi.cpu_id is -1, and only
perform registration if it is the case. Or do you have another
approach in mind ?

For the main thread, "nested" unregistration does not appear to be a
problem, because we rely on program exit() to implicitly unregister.



> Thanks,
> Florian

Mathieu Desnoyers
EfficiOS Inc.

 \ /
  Last update: 2019-06-12 16:17    [W:0.126 / U:76.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site