From 426c24bafa52b3f52cfd38f980932bcf858803e0 Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Mon, 9 Nov 2026 18:18:49 -0500 Subject: [PATCH] fix(native): native processes are named after their program, not ld.so --- tools/nativeguest/hook/setup.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/nativeguest/hook/setup.c b/tools/nativeguest/hook/setup.c index 50ae6ada9..e744163dc 100644 --- a/tools/nativeguest/hook/setup.c +++ b/tools/nativeguest/hook/setup.c @@ -118,6 +118,12 @@ static void init_ddnatv_hook(void) { // time it was read. __attribute__((constructor(103))) static void init_ddnatv_hook_early(void) { init_ddnatv_hook(); + // The kernel names the process after what it executed, the rootfs ld.so: process monitors, and + // the app's own checks of /proc//comm (steam, wineserver), saw only "ld-linux-aarch64.so.1" + const char *name = program_invocation_short_name; + if (g_ddnatv_root[0] != '\0' && name && name[0] && strncmp(name, "ld-linux", 8) != 0) { + prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0); + } } void tzset(void) {