mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
x86-64 client: hide proot's tracer from the web helper too
Traced per process through FEXServer: every x86 web helper read /proc/self/status (the string sits in libtier0_s.so) and died of SIGTRAP right after. proot is a tracer, so tier0 believes a debugger is attached and breaks into it with int3 on the first failed assertion. The arm64 build only issues a stray svc there, which is why the session shim leaves the arm64 web helper reading the real TracerPid. BL_WEBHELPER_HIDE_TRACER=1, set by bannerlator-steam-x64, serves the x86 one TracerPid 0 as well.
This commit is contained in:
1 parent
254e1db969
commit
b2e3a3a5ea
2 files changed
+12
-2
No files matched your search
@@ -209,6 +209,10 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$srt_libs
|
||||
# pressure-vessel-wrap, which needs bwrap. The FEX rootfs with the client's own steamrt64 libraries
|
||||
# is that container here; the client's recursion guard says it is already inside one.
|
||||
export STEAM_STEAMRT_RECURSION_GUARD=1
|
||||
# proot is a tracer, so tier0 believes a debugger is attached and breaks into it with int3 on the
|
||||
# first failed assertion: the web helper died of SIGTRAP a second after every start. The session
|
||||
# shim hides the tracer from the x86 web helper too (preload/tracer.c).
|
||||
export BL_WEBHELPER_HIDE_TRACER=1
|
||||
cd "$STEAM_X64"
|
||||
# The webhelper on Wayland: on X11, Chromium sets up GBM on the render node the X server hands out
|
||||
# over DRI3 even with the GPU off, loops on KMS dumb-buffer ioctls against the KGSL device and never
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/syscall.h>
|
||||
@@ -47,9 +48,14 @@ static int is_status_path(const char *path) {
|
||||
}
|
||||
|
||||
/* Chromium stands its hang watchdogs down when it sees a tracer, and the client's web helper does
|
||||
* not come up within their patience here: it is left reading the truth. */
|
||||
* not come up within their patience here: it is left reading the truth. Not so for the x86-64
|
||||
* client under FEX (BL_WEBHELPER_HIDE_TRACER=1, set by bannerlator-steam-x64): its tier0 breaks
|
||||
* into the supposed debugger with int3 on the first failed assertion, and the web helper dies of
|
||||
* SIGTRAP a second after it starts. */
|
||||
static int is_web_helper(void) {
|
||||
return strcmp(program_invocation_short_name, "steamwebhelper") == 0;
|
||||
if (strcmp(program_invocation_short_name, "steamwebhelper") != 0) return 0;
|
||||
const char *hide = getenv("BL_WEBHELPER_HIDE_TRACER");
|
||||
return !(hide && hide[0] == '1');
|
||||
}
|
||||
|
||||
static int write_all(int fd, const char *data, size_t len) {
|
||||
|
||||
Reference in new issue
Block a user