* fix(nativeguest): a script interpreter reached through a bind runs as a guest program
A Flatpak runtime binds its own /usr outside the sandbox root, so the hook
took #!/usr/bin/bash there for an Android program and handed it to the
kernel, which failed with "bad interpreter". An interpreter whose guest
path is a bind now starts like any guest program.
* Native hook: keep Android interpreters a bind reaches on the host
* Native hook: match the root of an interpreter on a folder boundary
* fix(nativeguest): x86-64 path system calls and SIGSYS handlers stay inside the rootfs hook
FEX passed most guest path system calls to the kernel with an inline svc, so the
native path hook never mapped them, and it mirrored guest SIGSYS handlers with a
raw rt_sigaction that replaced the hook's own handler, after which the next
blocked system call killed the program. Path calls now go through libc's
syscall(), which the hook maps (guarded until the hook is initialised so an early
allocator cannot deadlock), and a SIGSYS handler set through syscall() is
recorded and chained like one set through sigaction().
* fix(ddexec): a program that re-execs itself keeps the rootfs hook
A re-exec through /proc/self/exe starts the program through the guest
ld.so again but left out the hook, so the child saw host paths. Steam's
reaper then recorded host install folders, and Battle.net games moved to
a mapped drive the Library could not resolve. The re-exec now preloads
the hook of the root the same way the first start does.
* fix(nativeguest): a spawned "ld.so --list PROGRAM" loads the program from the rootfs
* fix(nativeguest): keep the existing ld.so start comments
---------
Co-authored-by: maxjivi05 <maxjividen@gmail.com>