From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D1F03857C5B; Fri, 12 Nov 2021 13:15:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D1F03857C5B From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/27046] glibc-hwcaps priority matching fails on cache entry flags mismatch Date: Fri, 12 Nov 2021 13:15:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: 2.34 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: fweimer at redhat dot com X-Bugzilla-Target-Milestone: 2.34 X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: resolution target_milestone bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2021 13:15:25 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27046 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Target Milestone|--- |2.34 Status|ASSIGNED |RESOLVED --- Comment #9 from Florian Weimer --- Fixed for glibc 2.34 via: commit 66db95b6e8264c5a6307f6a9e5285fec76907254 Author: Florian Weimer Date: Fri Jun 25 08:02:30 2021 +0200 elf: Fix glibc-hwcaps priorities with cache flags mismatches [BZ #27046] If lib->flags (in the cache) did not match GLRO (dl_correct_cache_id), searching for further glibc-hwcaps entries did not happen, and it was possible that the best glibc-hwcaps was not found. By accident, this causes a test failure for elf/tst-glibc-hwcaps-prepend-cache on armv7l. This commit changes the cache lookup logic to continue searching if (a) no match has been found, (b) a named glibc-hwcaps match has been found(), or (c) non-glibc-hwcaps match has been found and the entry flags and cache default flags do not match. _DL_CACHE_DEFAULT_ID is used instead of GLRO (dl_correct_cache_id) because the latter is only written once on i386 if loading of libc.so.5 libraries is selected, so GLRO (dl_correct_cache_id) should probably removed in a future change. Reviewed-by: Szabolcs Nagy --=20 You are receiving this mail because: You are on the CC list for the bug.=