You are right. I added step-fork to ptrace-tests for this.
The place that should do this is arch/*:copy_thread. TIF_* bits are
arch implementation details. x86 and powerpc both have a TIF_SINGLESTEP
that should be cleared, and others might too. Each arch maintainer
should check if their implem
shouldn't copy_process() do clear_tsk_thread_flag(child, TIF_SINGLESTEP) ?
I'll recheck this, but looks like both upstream and utrace-ptrace
should do this. Otherwise, the new child can start with TIF_SINGLESTEP
copied from parent's ti->flags. This looks just wrong, but if we do not
auto-attach th