3 ms·
ptrace is definitely one of the most frustrating APIs I’ve ever used. Admittedly, my main use of it was on armv7 and aarch64 Android devices and the kernels are
by chenxiaolong 6y ago
ptrace is definitely one of the most frustrating APIs I’ve ever used. Admittedly, my main use of it was on armv7 and aarch64 Android devices and the kernels are generally wildly different with tons of vendor patches. On some devices, maybe one of the ptrace calls would fail or return invalid data. On one of the worst devices I worked with, simply calling ptrace would cause a kernel panic and reboot (the broken /proc/last_kmsg and pstore implementations made debugging this interesting too). And this was in PID 1 before any SELinux policies or seccomp stuff were loaded.