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:
The412Banner committed 2026-10-02 16:28:43 -04:00
1 parent b2e3a3a5ea
commit 131ba72ee5
3 files changed
+20 -13

No files matched your search

+2 -2
View File
@@ -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);