Files
DroidDeck/tools/proot/patches/0006-clone3-exit-signal.patch
T
maxjivi05 866cfbd17a proot: port WinNative's seccomp and tracee performance fixes
Brings the proot patch set up to WinNative 53836ca9 on top of the #772 port:

- trace prctl, setrlimit and prlimit64 in the seccomp filter only for the
  arguments proot acts on, and uname only where the core rewrites it
- answer a seccomp stop's filter flags from the registers fetched for its
  translation, reuse those registers, and skip the sysexit stop of wait4 left
  to the kernel and accept without a sockaddr; the flags come from proot's list
  merged with the enabled extensions, and a syscall an extension replaced
  keeps its exit stop
- take a clone3 child's flags and exit signal from struct clone_args
- name a thread's /proc/self by its thread group and resolve /proc/thread-self
- translate fchmodat2, send openat2 callers to openat, and bound sysnum lookups
  by the table length
- sweep relatives only for tracees that have children or ptracees, and empty
  the per-stop memory collector instead of reallocating it
2026-09-27 08:10:58 -04:00

32 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: maxjivi05 <maxjividen@gmail.com>
Date: Sun, 27 Sep 2026 07:58:07 -0400
Subject: [PATCH] tracee: take a clone3 child's exit signal from struct
clone_args
---
src/tracee/tracee.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/tracee/tracee.c b/src/tracee/tracee.c
index 7c0c50c..25eeb57 100644
--- a/src/tracee/tracee.c
+++ b/src/tracee/tracee.c
@@ -424,9 +424,13 @@ int new_child(Tracee *parent, word_t clone_flags)
if (status >= 0 && get_sysnum(parent, CURRENT) == PR_clone)
clone_flags = peek_reg(parent, CURRENT, SYSARG_1);
else if (status >= 0 && get_sysnum(parent, CURRENT) == PR_clone3) {
- word_t flags = peek_word(parent, peek_reg(parent, CURRENT, SYSARG_1));
- if (errno == 0)
- clone_flags = flags;
+ word_t args = peek_reg(parent, CURRENT, SYSARG_1);
+ word_t flags = peek_uint64(parent, args);
+ if (errno == 0) {
+ word_t exit_signal = peek_uint64(parent, args + 4 * sizeof(uint64_t));
+ if (errno == 0)
+ clone_flags = (flags & ~(word_t) 0xFF) | (exit_signal & 0xFF);
+ }
}
/* Get the pid of the parent's new child. */