This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv3] Protect _dl_profile_fixup data-dependency order [BZ #23690]
On 10/17/18 10:02 PM, Carlos O'Donell wrote:
> My position is unchanged.
>
> If I could summarize our positions, I would write:
>
> (1) The "Pragmatic approach"
>
> - Since we don't have C11 atomics, we should just use the fences because
> they fix the data dependency issue, and stop there. We need not go any
> further until we are ready to fix the underlying algorithm of the result
> updates and *then* we can follow C11.
>
> (2) The "Incremental C11 approach"
>
> - Assume we are C11, and take an incremental approach where we fix the
> data dependency issue using correct synchronization primitives, even
> if it doesn't solve all of the data races.
>
> Did I summarize your position accurately?
>
> I prefer (2).
>
> Tulio can have a preference also.
>
> I spoke to Tulio on IRC and he says he has a working v4 in build-many-glibcs.
>
> I figure we'll commit something probably tomorrow for this.
>
> Just for the record I'm attaching my WIP v4 so you can see what I mean about
> the solution. Yes, I did make the structure 4 bytes larger, and that will have
> a real impact, but it removes the dependency on the size of the function pointer,
> and I like that for future maintenance, and we'll likely rewrite the whole struct
> when we fix 23790 to get a more optimal layout.
I'm happy to see that Tulio and I basically had the same solution for v4.
Actually, I have a bug in mine where I didn't set local reloc_init to 1
which results in the plenter not being called for all threads doing the
initialization, but Tulio's code has this fixed :-)
I've reviewed Tulio's patch and so with v5 I think we're done.
--
Cheers,
Carlos.