Date:        Fri, 22 Dec 2017 23:35:12 +0700
    From:        Robert Elz <k...@munnari.oz.au>
    Message-ID:  <19521.1513960...@andromeda.noi.kre.to>

  | The EFAULT that is returned there is probably the one Kamil mentioned.

And of course it is, as in the test ...

        if ((p != curproc && (p->p_sflag & PS_WEXIT) != 0) ||

(the || alternative is irrelevant, even though it is XXX'd) as
we know p != curproc (this is ptrace I/O - the process whose addr
space is being written is not the process doing the sys call
"What never?   Well, hardly ever...")  and nor is that process usually
exiting (too late to modify it then) - so for ptrace() that test
is more or less guaranteed true - which leads to the EFAULT.

kre

Reply via email to