tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [patch] PT_GET_LWP_PRIVATE and PT_SET_LWP_PRIVATE



On 06.12.2019 06:17, Kamil Rytarowski wrote:
> I have implemented l_private accessor in ptrace(2).
> 
> By default this uses l_private from the lwp struct.
> 
> PT_SET_LWP_PRIVATE uses lwp_setprivate() directly and this call
> abstracts internally MI and MD code.
> 
> The PT_SET_LWP_PRIVATE operation uses by default l_private from the
> struct lwp, however whenever appropriate, picks MD logic that grabs this
> value from a MD filed (register or pcb).
> 
> MD code is implemented for:
>  - sparc, sparc64
>  - alpha
>  - hppa
>  - powerpc
>  - sh3
> 
> There is included compat32 support and ATF tests.
> 
> http://netbsd.org/~kamil/patch-00202-PT_GET_LWP_PRIVATE.txt
> 
> This ptrace operation is inspired by PTRACE_GET_THREAD_AREA /
> PTRACE_SET_THREAD_AREA from linux.
> 
> Please review.
> 
> After merging this, I will add an entry in man-page ptrace(2) and
> implement core(5) generation of PT_GET_LWP_PRIVATE for each LWP within a
> process.
> 

Actually, we can go better here and in one go remove one of the issues
in our current ptrace(2) API regarding legacy operation PT_LWPINFO (it
is obsoleted by PT_GET_SIGINFO and confusing with a different PT_LWPINFO
found in FreeBSD).

I will come up with another and better patch.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index