From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6BD4B38555A4; Wed, 22 Mar 2023 16:57:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BD4B38555A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679504255; bh=0xPoSxgAY7wc/jcZaU5lQAo1qeeg1mXMyDDChKZRQUI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EcfsoLHR/xpriPRFO1IQKgrmLo/jR8H04x7bl6ZnVW35sIQN1mIANZwQ3p+TM7Int 54NuLOhS7F0nGQ6VYiYYprrVsfAQlLQpyRufmqu7+TpPS9fN8tmNP0B/fAF7DCoe8b g5B2na32UJqjo0rrGg0FBWbQrZfUYk4jaH5tyAJg= From: "siddhesh at sourceware dot org" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/30186] RTLD_DEEPBIND interacts badly with LD_PRELOAD Date: Wed, 22 Mar 2023 16:57:35 +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: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: siddhesh at sourceware dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30186 --- Comment #13 from Siddhesh Poyarekar --- If the malloc overriding approach is what we want to focus on, I'd strongly prefer a tunables based feature that influences relocation; I've advocated = for that for a while now.=20=20 For example, a glibc.malloc.impl=3Djemalloc would give preference to libjemalloc.so when resolving the malloc suite of symbols (perhaps resolve early even with lazy binding), assuming that it has been already loaded eit= her through DT_NEEDED or with LD_PRELOAD. Maybe it would be useful to make this independent of LD_PRELOAD by searching and loading libjemalloc.so whenever = this tunable is set, essentially obsoleting the LD_PRELOAD method of overriding = the allocator. That will take care of all the current issues with overriding implementatio= ns: - No need for LD_PRELOAD anymore - Ignored for setuid binaries (unless we allow this with systemwide tunable= s in future) - No additional indirection - relro protection - No need to alter malloc implementations to adjust to this new method What do you think? --=20 You are receiving this mail because: You are on the CC list for the bug.=