DynamoRIO / DynamoRIO/dynamorio
Linux internal attach fails for non-CLONE_SIGHAND and non-CLONE_THREAD threads
Open
OpSys-Linux
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
Xref original #722.
We've known this as we rely on only iterating /proc/self/task but never filed an official issue.
Fortunately: "Since Linux 2.5.35, flags must also include CLONE_SIGHAND if CLONE_THREAD
is specified."
Thus we are only worried about non-CLONE_THREAD threads. If they have CLONE_SIGHAND we could presumably do a simple tweak to look in /proc/self/task/nnn/children and then recurse from there.
If they do not have either flag, we only have two reasonable solutions: craft some ptrace-based solution where we fork a helper process, or use app cooperation.
Contributor guide
Assessment
This issue has not been assessed yet.