From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E7D27385841C; Thu, 2 Mar 2023 19:56:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7D27385841C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677787018; bh=38qWkih+OYLvWqoC5CXZDzAJHjJ+TIWLTaxUJi6oSl0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ExQs/LsMq6St3Nebs0PkWemnIhQ94dlxcWylA1jZuE74OG5Tr6AvaIpPpoG2W+Yyd GQUT52pDXpd5E6bHA3hQ5rySfwEyNwGLlQ8f3MPUKadp4bqGTV99RCDZNIp1WA4Qv/ P2KY0S3VKWDdmOKY8PT32fb3WPhiWmJnIkAjazvM= From: "stsp at users dot sourceforge.net" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/30127] [rfe]: enable ld audit at run-time Date: Thu, 02 Mar 2023 19:56:58 +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.38 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stsp at users dot sourceforge.net 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: security- 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=3D30127 --- Comment #32 from Stas Sergeev --- (In reply to Jonathon Anderson from comment #31) > I can't say the current solutions are appealing. You've made it very > difficult for a dynamically-loaded auditor to accomplish any auditor-like Posted v7 which just calls la_objopen() for pre-existing libs, similar to dl_main(). > You mentioned in another ticket > (https://sourceware.org/bugzilla/show_bug.cgi?id=3D30007#c2) that the who= le > point of this is to access data objects in the solib. Do you write this > solib? I write a shim that should load (via dlmem()) other libs, built from some 30 years old sources (that neither me nor anyone else writes today), and allows them to work on a current system. I.e. this is a compatibility layer. Compatibility layer, unfortunately, can't require changing the legacy code. What you propose, will require mostly a full rewrites, eg I have no idea how would the one identify all pointers to all vars and change all such vars to a heap objects... > Could you override mmap itself for the files you want mapped in the right > locations? But it won't be relocated to that address. > You mentioned DT_AUDIT wouldn't work, so I presume the executable is out = of > your control, e.g. you're extending a VM with an solib plugin? If so, do = you > not have the access to set LD_AUDIT in the environment before launching t= he > executable? You can always make your auditor "no-op" except when needed. This is possible but a quite clumsy solution IMO. And of course it would still need all other patches (dlmem etc) except this one. So I'd rather concentrate on making dlload_audit_module() suitable for your needs. --=20 You are receiving this mail because: You are on the CC list for the bug.=