From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2027 invoked from network); 26 Oct 2020 19:55:55 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 26 Oct 2020 19:55:55 -0000 Received: (qmail 25676 invoked by uid 550); 26 Oct 2020 19:55:53 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 25656 invoked from network); 26 Oct 2020 19:55:52 -0000 Date: Mon, 26 Oct 2020 15:55:40 -0400 From: Rich Felker To: =?utf-8?B?w4lyaWNv?= Nogueira Cc: Mark Wielaard , elfutils-devel@sourceware.org, musl@lists.openwall.com, =?utf-8?B?w4lyaWNv?= Rolim Message-ID: <20201026195540.GO534@brightrain.aerifal.cx> References: <723b967389be88475206c5afc280c3be02ab677c.camel@klomp.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on? On Mon, Oct 26, 2020 at 02:28:59PM -0300, Érico Nogueira wrote: > On Mon Oct 26, 2020 at 3:10 PM -03, Mark Wielaard wrote: > > Hi Érico, > > > > On Mon, 2020-10-26 at 12:03 -0300, Érico Nogueira via Elfutils-devel > > wrote: > > > Do elfutils program actually depend on the extra functionality > > > enabled by > > > FNM_EXTMATCH? Is changing the flag to have no effect a "bug"? > > > > Yes. The extended wildcard pattern is relied upon by both > > eu-strip with > > > > --keep-section=SECTION Keep the named section. SECTION is an > > extended wildcard pattern. May be given > > more than once. > > > > and eu-elfcompress with > > > > -n, --name=SECTION SECTION name to (de)compress, SECTION is an > > extended wildcard pattern (defaults to > > '.?(z)debug*') > > > > In the eu-strip case it might be reasoned that instead of a > > wildcard pattern the user might most of the time simply provide > > a section name as is (especially since the option may be given > > multiple times). But in the case of eu-elfcompress the > > program relies on the default SECTION name being an extended > > wildcard pattern. So not supporting FNM_EXTMATCH breaks the > > default functionality of eu-elfcompress. > > > > Cheers, > > > > Mark > > Understood, thank you. I'm replying to the musl mailing list as well, > then, to hopefully gather more opinions, since I don't know what the > best way of solving this would be. I'm pretty sure we don't want to adopt further fnmatch extensions like this since they seem to affect the big-O's required to do matching and preclude good algorithms. I like Max's solution here with multiple patterns. If elfutils really wants to keep using FNM_EXTMATCH it should probably ship something like gnulib with a replacement fnmatch for systems that don't have it. Rich