Keep Steam alive with SteamVR registered, run SteamVR at the glasses' rate, keep the glasses lip on top

This commit is contained in:
maxjivi05 committed 2026-10-13 11:24:01 -04:00
1 parent c8c62960f6
commit a746d56dc8
5 files changed
+130 -21

No files matched your search

+6
View File
@@ -80,6 +80,12 @@ Added by DroidDeck:
The `faccessat2` exit stop (termux 5ba8b95, for glibc's ENOSYS fallback on kernels before 5.8) and
the `statx` one (emulation on kernels before 4.11) are dropped when the running kernel is newer.
Host build: `ioctl` 31.6 -> 0.5 us; `stat`/`statx`/`faccessat2` about 44 -> 28 us (one stop).
- `0015-robust-list-from-seccomp.patch` - Android's app policy refuses `set_robust_list` and
`get_robust_list`. proot still answers the first with `ENOSYS` but keeps the head each thread
offered (cleared on `execve`, none in a new task), and answers the second for the calling thread
with it. SteamVR's `vrclient.so` asks for the head through libc's `syscall()`, which
`libblsession.so`'s robust.c never sees: `libopenvr_api.so` opens it `RTLD_DEEPBIND`. Steam
aborted on "futex robust_list not initialized by pthreads" as soon as SteamVR was registered.
Prototype (inert unless `PROOT_FASTPATH` is set; see `docs/development/proot-performance.md`):
@@ -0,0 +1,61 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: DroidDeck <droiddeck@users.noreply.github.com>
Date: Tue, 13 Oct 2026 00:00:00 +0000
Subject: [PATCH] seccomp: answer get_robust_list with the head set_robust_list
was refused for
diff --git a/src/execve/exit.c b/src/execve/exit.c
index f32d3ec..b5475b3 100644
--- a/src/execve/exit.c
+++ b/src/execve/exit.c
@@ -473,6 +473,8 @@ void translate_execve_exit(Tracee *tracee)
talloc_set_name_const(tracee->exe, "$exe");
}
+ tracee->robust_list = 0;
+
/* New processes have no heap. */
if (talloc_reference_count(tracee->heap) >= 1) {
talloc_unlink(tracee, tracee->heap);
diff --git a/src/tracee/seccomp.c b/src/tracee/seccomp.c
index 77d5b27..0af232b 100644
--- a/src/tracee/seccomp.c
+++ b/src/tracee/seccomp.c
@@ -559,6 +559,24 @@ static int handle_seccomp_event_common(Tracee *tracee)
}
case PR_set_robust_list:
+ tracee->robust_list = peek_reg(tracee, CURRENT, SYSARG_1);
+ set_result_after_seccomp(tracee, -ENOSYS);
+ break;
+
+ case PR_get_robust_list:
+ {
+ pid_t pid = (pid_t) peek_reg(tracee, CURRENT, SYSARG_1);
+ if (tracee->robust_list == 0 || (pid != 0 && pid != tracee->pid)) {
+ set_result_after_seccomp(tracee, -ENOSYS);
+ break;
+ }
+ poke_word(tracee, peek_reg(tracee, CURRENT, SYSARG_2), tracee->robust_list);
+ if (errno == 0)
+ poke_word(tracee, peek_reg(tracee, CURRENT, SYSARG_3), 3 * sizeof_word(tracee));
+ set_result_after_seccomp(tracee, errno != 0 ? -EFAULT : 0);
+ break;
+ }
+
default:
/* Set errno to -ENOSYS */
set_result_after_seccomp(tracee, -ENOSYS);
diff --git a/src/tracee/tracee.h b/src/tracee/tracee.h
index 1fca85f..496ca75 100644
--- a/src/tracee/tracee.h
+++ b/src/tracee/tracee.h
@@ -248,6 +248,8 @@ typedef struct tracee {
* has to be ignored as it's same syscall entry */
bool seccomp_already_handled_enter;
+ word_t robust_list;
+
/**********************************************************************
* Shared or private resources, depending on the CLONE_FS/VM flags. *
**********************************************************************/