From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127425 invoked by alias); 17 Sep 2019 09:55:41 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 127416 invoked by uid 89); 17 Sep 2019 09:55:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=integrity, nature, expressing, situation X-HELO: esa3.mentor.iphmx.com IronPort-SDR: VA512gb5/xc9VTYnKJLCLKhqGXdI/49/xl+EFSgVdPKIAX0LQDgwBDQqW9jEoIuZhUtxEBiOL5 plqszc37XrC2bnS2o02LYJIVH5NqB8QSZikpcGMgpRAoHuIuof8ulmW++/Z619gvfCmP70WSGF IfB7Y9wrXC90nHAdJZZc+85E+vgoi8VmPRnYqYTpZ9M64d2YsTI6XKpiP5dIoAhR3LUbcLE6gX AUQ5nTwGnZiPEZkXNe/NnozGHNoZrWHu11PMVbIja4K6TreUMrut8js+6/8Pn4BuYwzcpqkGkR zX8= IronPort-SDR: LkI7F6MhURPTkRVTFRz1T6Bvn9gQqw8wfgLd9lzX3nS38Yl/RylGOtwMPfPgH5K4b6NHbr+gcQ ia8QMl7rANuRBmT8KKwg0YJOkylxc1yRAn7fGceYWAU5N9JxCmZeQam75Nr/JuZqP+qoYLWu3H +7xikvMwu5zV702k3yl7rCh8VF5U6B90V1KkrM93Qo4UuYvqDjBq+c1oRXeJwSioFoPikBn0rj g1ODVlonA2Nxrb29BvS1YsZldeMY47/opvMm/izzgjLCwFHtLBo6nkhMtuPd6rxi1HKaubBc7D GGo= Reply-To: Subject: Ping Re: [PATCH 1/2][RFC] #17645, fix slow DSO sorting behavior in dynamic loader From: Chung-Lin Tang To: GNU C Library References: Message-ID: <2dea2558-c711-eab5-3728-be4986b7aad5@mentor.com> Date: Tue, 17 Sep 2019 09:55:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Return-Path: chunglin_tang@mentor.com X-SW-Source: 2019-09/txt/msg00235.txt.bz2 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  > >         [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.