The real tragedy about the ptrace bug is that @jann pointed to the exact exploit primitive in a 2020 patch series where he implemented the architecturally sound fix: keep the mm alive until the task is reaped.
But it neither got reviewed nor merged. Let's try and change that:
https://lore.kernel.org/20201016024019.1882062-1-jannh@google.com/