From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E2F3638555A1; Thu, 2 Mar 2023 16:13:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2F3638555A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677773617; bh=lSHOXEgONtkVK1eiHBKEpb+Uke3bGa+RBSH1y0614RA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VuZrqmpanxZTkS1J0SWXdk+UDRoNChMWow1GxSSl3LgIf4/6ECX0n4k9yHc9tu58P Bl8jVdPEEU1RcFY9HioU2apxH0xLFnsJcwmnp4myaeG81JtMMKeUjOwiMCxH/dF234 2OLNqIpZY3x2tDss8leEaqgIB9Y4w7Tljh51JvI8= From: "janderson at rice dot edu" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/30127] [rfe]: enable ld audit at run-time Date: Thu, 02 Mar 2023 16:13:37 +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: janderson at rice dot edu 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 #31 from Jonathon Anderson --- (In reply to Stas Sergeev from comment #30) > Hi Jonathon, so if you are satisfied with the current > solution (return EINVAL for disallowed audit call-backs), > then maybe you can give me an ACK? :) > I am not aware of any problems or a pending review > comments for the last (v6) version of the patch. Busy week for me, expect more slow responses. :) I can't say the current solutions are appealing. You've made it very diffic= ult for a dynamically-loaded auditor to accomplish any auditor-like task, outsi= de of a hypothetical callback (la_premap) that hasn't been mainstreamed yet. On top of that, I'm still a bit leery of letting the application observe the auditors at all (outside of _r_debug). Before your patches, there are parts of your use case that I am not convinc= ed do not have alternative solutions. One doesn't hack Glibc before exploring = all other alternatives, so I assume you've tried these but I'd like the context= to know why they don't work: You mentioned in another ticket (https://sourceware.org/bugzilla/show_bug.cgi?id=3D30007#c2) that the whole= point of this is to access data objects in the solib. Do you write this solib? If= you do, can you replace these static objects with pointers that are mmap'd into= the right location (e.g. initialized in an init() function or init constructors= )? If you don't, these are data structures that (a) part of the public API for= the solib and (b) are certainly identical (alignment padding included) between = the 64-bit and 32-bit ABI? Could you override mmap itself for the files you want mapped in the right locations? If LD_PRELOAD won't fly, newer kernels have syscall user dispatch [1] for doing this at the syscall level. 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 the executable? You can always make your auditor "no-op" except when needed. [1]: https://docs.kernel.org/admin-guide/syscall-user-dispatch.html --=20 You are receiving this mail because: You are on the CC list for the bug.=