HomeFreeBSD

ptrace: do not allow for parallel ptrace requests

Description

ptrace: do not allow for parallel ptrace requests

Set a new P2_PTRACEREQ flag around the request Wait for the target .
process P2_PTRACEREQ flag to clear before setting ours .

Otherwise, we rely on the moment that the process lock is not dropped
until the stopped target state is important. This is going to be no
longer true after some future change.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D29955

Details

Provenance
kibAuthored on Apr 24 2021, 11:57 AM
Reviewer
markj
Differential Revision
D29955: ptrace(PT_COREDUMP)
Parents
R10:54c8baa02195: kern_ptrace(): extract code to determine ptrace eligibility into helper
Branches
Unknown
Tags
Unknown