mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 22:05:59 +00:00
x86-64 client: hide the tracer only from tier0's status reads
Hiding it from the whole x86 web helper got it past tier0 (message loop, BrowserCreated) but then Chromium trapped on the status descriptor it opened itself, now a memfd copy - which is the other reason the shim leaves the web helper alone. With BL_WEBHELPER_HIDE_TRACER=1 only opens called from libtier0_s.so get the copy; Chromium's get procfs.
This commit is contained in:
1 parent
b2e3a3a5ea
commit
131ba72ee5
3 files changed
+20
-13
No files matched your search
@@ -483,12 +483,12 @@ static FILE *synthesize(const char *table) {
|
||||
}
|
||||
|
||||
/* tracer.c */
|
||||
int bl_status_without_tracer(const char *path, int flags) __attribute__((visibility("hidden")));
|
||||
int bl_status_without_tracer(const char *path, int flags, const void *caller) __attribute__((visibility("hidden")));
|
||||
|
||||
static FILE *open_stream(const char *symbol, const char *path, const char *mode) {
|
||||
typedef FILE *(*fopen_fn)(const char *, const char *);
|
||||
int status = mode && mode[0] == 'r' && !strchr(mode, '+')
|
||||
? bl_status_without_tracer(path, O_RDONLY | O_CLOEXEC) : -1;
|
||||
? bl_status_without_tracer(path, O_RDONLY | O_CLOEXEC, NULL) : -1;
|
||||
if (status >= 0) {
|
||||
FILE *copy = fdopen(status, "r");
|
||||
if (copy == NULL) close(status);
|
||||
|
||||
Reference in new issue
Block a user