Ping x2 Re: [PATCH 1/2][RFC] #17645, fix slow DSO sorting behavior in dynamic loader
Adhemerval Zanella
adhemerval.zanella@linaro.org
Tue Oct 8 17:41:00 GMT 2019
I will try to check this out this week.
On 08/10/2019 03:22, Chung-Lin Tang wrote:
> Ping again.
>
> On 2019/9/17 5:55 PM, Chung-Lin Tang wrote:
>> Ping?
>>
>> On 2019/7/21 1:50 AM, Chung-Lin Tang wrote:
>>> Hi, this patch is our attempt at resolving the slow shared object sorting
>>> situation in #17645, #15310, and some effort at #15311. I realize this is
>>> pretty unsuitable timing to be submitting a patch of such nature now (probably
>>> way too late to be included into 2.30), but still sending now anyways as this
>>> will probably need quite some discussion before being approved.
>>>
>>> Prior attempts at solving this slow sorting behavior appeared to have failed
>>> due to inadequate proposed testing, therefore cannot convince reviewers to
>>> touch what seems to be perceived as a sensitive and easy to break part of ld.so.
>>>
>>> Therefore the first part of this patch is not a change to the dynamic loader
>>> code proper, but a testing framework for constructing DSO sorting tests.
>>> It consists of a new Python script 'dso-ordering-test.py' that serves to
>>> generate both testcase source files and the needed Makefile fragments from
>>> a short description string, for example:
>>>
>>>     a->b->c->d         // four objects linked one after another
>>>
>>>     a->[bc]->d;b->c    // a depends on b and c, which both depend on d,
>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â // b depends on c (b,c linked to object a in fixed order)
>>>
>>> Â Â Â Â a->b->c;{+a;%a;-a}Â // a, b, c serially dependent, main program uses
>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â // dlopen/dlsym/dlclose on object a
>>>
>>> Â Â Â Â a->b->c;{}!->[abc]Â // a, b, c serially dependent; multiple tests generated
>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â // to test all permutations of a, b, c ordering linked
>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â // to main program
>>>
>>> Â Â Â (Above is just a short description of what the script can do, more
>>> Â Â Â Â documentation is in the script comments.)
>>>
>>> and, a patch to glibc/elf/Makefile which uses this script to add a few
>>> DSO sorting testcases. The description string notation and output form of the
>>> generated testcases is short enough that both the test descriptions
>>> and expected outcomes can all directly be specified in the Makefile.
>>>
>>> In terms of the tests I added using this script, I am not completely sure they are
>>> (together with existing tests) adequate to prove algorithmic integrity in face
>>> of any ld.so code changes, but the script should provide a solid tool to further
>>> improve on coverage. Also welcome suggestions if the current features are still
>>> lacking in expressing some case of shared object relations, or if the documentation
>>> still feels unclear.
>>>
>>> Thanks,
>>> Chung-Lin
>>>
>>> 2019-07-20 Chung-Lin Tang <cltang@codesourcery.com>
>>>
>>> Â Â Â Â Â Â Â Â [BZ #17645]
>>> Â Â Â Â Â Â Â Â [BZ #15311]
>>> Â Â Â Â Â Â Â Â [BZ #15310]
>>> Â Â Â Â Â Â Â Â * elf/Makefile (test_dso_ordering): New make function.
>>> Â Â Â Â Â Â Â Â (tst-dso-ordering[123456789]): Define new DSO sorting tests.
>>> Â Â Â Â Â Â Â Â (tst-bz15311): Testcase from #15311.
>>> Â Â Â Â Â Â Â Â * scripts/dso-ordering-test.py: New script.
More information about the Libc-alpha
mailing list