public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/28008] New: [Feature request] dlopen_from function
@ 2021-06-23 12:04 jakobrs100+sourceware at gmail dot com
2022-02-28 19:52 ` [Bug dynamic-link/28008] " fweimer at redhat dot com
2022-02-28 19:53 ` fweimer at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: jakobrs100+sourceware at gmail dot com @ 2021-06-23 12:04 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28008
Bug ID: 28008
Summary: [Feature request] dlopen_from function
Product: glibc
Version: unspecified
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: dynamic-link
Assignee: unassigned at sourceware dot org
Reporter: jakobrs100+sourceware at gmail dot com
Target Milestone: ---
The behaviour of certain functions in libdl[^2] like the `dlopen`
function is dependent on where it is called from. This is normally
what you want, but sometimes you may want to specify the caller
address yourself, for example when intercepting/hooking the `dlopen`
function itself. For this reason, Apple has added the `dlopen_from`
function in macOS Big Sur. `dlopen_from` has an extra parameter, `void
*caller`, that specifies the "fake" caller address to be used instead
of `RETURN_ADDRESS(0)`[^3]. Using `dlopen_from` significantly
simplifies intercepting `dlopen` calls (see [here][1] for an example).
So my feature request is to implement `dlopen_from` in glibc too.
[1]:
<https://github.com/clementgallet/libTAS/blob/70966f9e1f400dfdd5176bba63c11cb6026d3da6/src/library/dlhook.cpp#L108-L189>
[^2]: The same logic also applies to `dlmopen`, `dlsym`, and `dlvsym`.
[^3]: Header file where `dlopen_from` is declared:
<https://opensource.apple.com/source/dyld/dyld-832.7.3/include/dlfcn_private.h.auto.html>
(From libc-help here:
<https://sourceware.org/pipermail/libc-help/2021-June/005910.html>)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug dynamic-link/28008] [Feature request] dlopen_from function
2021-06-23 12:04 [Bug dynamic-link/28008] New: [Feature request] dlopen_from function jakobrs100+sourceware at gmail dot com
@ 2022-02-28 19:52 ` fweimer at redhat dot com
2022-02-28 19:53 ` fweimer at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2022-02-28 19:52 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28008
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |valery_reznic at yahoo dot com
--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
*** Bug 28927 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug dynamic-link/28008] [Feature request] dlopen_from function
2021-06-23 12:04 [Bug dynamic-link/28008] New: [Feature request] dlopen_from function jakobrs100+sourceware at gmail dot com
2022-02-28 19:52 ` [Bug dynamic-link/28008] " fweimer at redhat dot com
@ 2022-02-28 19:53 ` fweimer at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2022-02-28 19:53 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28008
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Flags| |security-
Resolution|--- |DUPLICATE
CC| |fweimer at redhat dot com
--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
It turns out we have an even earlier RFE for this.
In the meantime, you might consider using LD_AUDIT.
*** This bug has been marked as a duplicate of bug 25114 ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-28 19:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 12:04 [Bug dynamic-link/28008] New: [Feature request] dlopen_from function jakobrs100+sourceware at gmail dot com
2022-02-28 19:52 ` [Bug dynamic-link/28008] " fweimer at redhat dot com
2022-02-28 19:53 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).