tech-kern archive

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

Re: netbsd32_{,u}int64 in sys/types.h for compat/sys/siginfo.h



On 21.11.2019 10:49, Rin Okuyama wrote:
> On 2019/11/20 20:12, Rin Okuyama wrote:
>> On 2019/11/19 22:59, Kamil Rytarowski wrote:
> ...
>>>
>>> We still miss compat32 support for PT_GETXMMREGS and PT_SETXMMREGS, at
>>> some point of time we shall add it for completeness.
>>
>> Thank you!
>>
>> With amd64/netbsd32_machdep.c rev 1.130, all tests in t_ptrace* pass in
>> COMPAT_NETBSD32 on amd64, except for that involved with XMM registers.
>> I will examine how to implement PT32_[GS]ETXMMREGS.
> 
> I wrote a draft version of patch which adds PT32_[GS]ETXMMREGS support:
> 
> http://www.netbsd.org/~rin/amd64-PT32_GSETXMMREGS-20191121.patch
> 
> With this patch, XMM-related tests pass for COMPAT_NETBSD32 on amd64.
> 
> Some remarks:
> 
> (1) PT_[GS]ETXMMREGS ptrace(2) commands are added to <machine/ptrace.h>.
>     These are only used for COMPAT_NETBSD32, and not exposed to userland.
> 

This is correct.
We don't want to export XMMREGS to amd64 users.

Pleae remove /* */ from this part:

+/*
+	"PT_GETXMMREGS", \
+	"PT_SETXMMREGS"
+ */

This will allow ktruss and related software to have meaningful form for
compat32 ptracing.

> (2) COMPAT_NETBSD32 codes are called from process_machdep.c via
>     module_hook framework. This may be too much though...
> 

I have no opinion here.

> Comments?
> 

I will leave this to be reviewed by mgorny@. Adding him to CC.

>> Also, it seems that some COMPAT_NETBSD32 related codes for amd64 need to
>> be cleaned up. For example, there remain COMPAT_NETBSD32 codes in
>> amd64/process_machdep.c, that are no longer used:
>>
>> https://nxr.netbsd.org/xref/src/sys/arch/amd64/amd64/process_machdep.c#129
>>
>> https://nxr.netbsd.org/xref/src/sys/arch/amd64/amd64/process_machdep.c#183
>>
>> ...
>>
>> I will examine them too.
> 
> This was my misunderstanding. These codes are used when tracer is 64-bit
> and traced is 32-bit. Don't know whether this is useful though...
> 
> Thanks,
> rin

Maxime added it. If you want to change it, please consult with maxv@.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index