From owner-freebsd-stable@freebsd.org Wed Sep 26 15:05:07 2018 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D143E10AF2E8 for ; Wed, 26 Sep 2018 15:05:06 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F9F28155B for ; Wed, 26 Sep 2018 15:05:06 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id 778F6139DA; Wed, 26 Sep 2018 17:04:57 +0200 (CEST) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id 1gAFL0NtHvQf; Wed, 26 Sep 2018 17:04:56 +0200 (CEST) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id C2273139BB; Wed, 26 Sep 2018 17:04:55 +0200 (CEST) Received: from bsdlo.incore (bsdlo.incore [192.168.0.84]) by mail.local.incore (Postfix) with ESMTP id A0EED108; Wed, 26 Sep 2018 17:04:55 +0200 (CEST) Message-ID: <5BABA017.9090509@incore.de> Date: Wed, 26 Sep 2018 17:04:55 +0200 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: Konstantin Belousov CC: freebsd-stable@freebsd.org Subject: Re: Constraints in libmap(32).conf do not work as expected, possible bug in rtld-elf References: <5B89C1E7.4090002@incore.de> <20180902120603.GI2340@kib.kiev.ua> <5B9829FE.10700@incore.de> <20180921134833.GU3161@kib.kiev.ua> <5BA95F34.9070300@incore.de> <20180925155417.GA5335@kib.kiev.ua> In-Reply-To: <20180925155417.GA5335@kib.kiev.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2018 15:05:07 -0000 >> I like to mention one thing concerning the source libmap.c. With the >> patch (yours or mine) and the libmap32.conf given above I see the >> following lmp_list when lm_fini() is called: >> >> lm_fini("1, $DEFAULT$" lml-Adresse 0x2826c208) >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib/mysql, t=/usr/local/lib32/mysql") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=libcrypto.so.8, t=libcrypto.so.6") >> lm_fini("f=libssl.so.8, t=libssl.so.6") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> lm_fini("1, libc-client4.so.9" lml-Adresse 0x2826c168) >> lm_fini("f=libcrypto.so.8, t=libcrypto.so.6") >> lm_fini("f=libssl.so.8, t=libssl.so.6") >> lm_fini("2, /usr/local/php52/" lml-Adresse 0x2826c068) >> lm_fini("f=/usr/local/lib/mysql, t=/usr/local/lib32/mysql") >> lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> >> So for $DEFAULTS we have a lot of identical entries. This comes from the >> TAILQ_INSERT_HEAD statement in lm_add(). I am not sure if this can be >> accepted or a check to avoid double entries in the list is better. > Yes, this is mostly cosmetics. It is not clear is it better to avoid > duplicates and pay the cost at insertion, or leave them and pay at the > list traversal. I think there is slight preference to avoid dups, but > this should be not measureable. With your patch for libmap.c the output in lm_fini() now looks fine: lm_fini("1, $DEFAULT$" lml-Adresse 0x2826c208) lm_fini("f=/usr/local/lib/mysql, t=/usr/local/lib32/mysql") lm_fini("f=libcrypto.so.8, t=libcrypto.so.6") lm_fini("f=libssl.so.8, t=libssl.so.6") lm_fini("f=/usr/local/lib, t=/usr/local/lib32") lm_fini("1, libc-client4.so.9" lml-Adresse 0x2826c168) lm_fini("f=libcrypto.so.8, t=libcrypto.so.6") lm_fini("f=libssl.so.8, t=libssl.so.6") lm_fini("2, /usr/local/php52/" lml-Adresse 0x2826c068) lm_fini("f=/usr/local/lib/mysql, t=/usr/local/lib32/mysql") lm_fini("f=/usr/local/lib, t=/usr/local/lib32") >> One annotation to the script /etc/rc.d/ldconfig: I had expected that >> this script during boot creates clean files ld-elf(32).so.hints in >> /var/run. For 64 bit this is true, but for 32 bit not because ldconfig >> with flag -32 also has flag -m. Is this intended behaviour ? > > This seems to be from the beginning when ldconfig_local32 was > introduced in r154114. Ok Andreas Longwitz