two proposed linuxulator fixes + ptrace

Yanko Yankulov yanko.yankulov at gmail.com
Thu Jun 14 11:46:23 UTC 2018


Hi Konstantin,

For the ptrace patch, I suggest you to put it on https://reviews.freebsd.org
> and set at least me (kib), jhb and dchagin as reviewers.  I will handle it.
>
> Will do. Just have to figure out how it works.


> For the patch 1, TracePid, can you explain what is the meaning of the
> pid reported ?
>
> The TracerPid is the PID of the process currently ptrace-ing the process.
TracerPid 0 means no active tracer. So the patch is not semantically
correct as it always reports no tracer, but it got the program running.


> For the patch 3, %r10 preservation for linux_rt_sigreturn, shouldn't the
> same handling applied to non-rt signal return ? And in fact, shouldn't
> it be done based on the return code instead of the syscall number ? Look
> at the amd64/amd64/vm_machdep.c:cpu_set_syscall_retval(), where I think
> EJUSTRETURN case is used by linux sigreturns.
>
The linux_rt_sigreturn seems to be the only signall return syscall.
The no rt_ version seems to be an old pre Linux 2.2 interface.

The return code observation sounds right. Thanks. New patch. Ran a
quick check, the issue is still solved.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-linuxlator-amd64-don-t-mangle-r10-on-sigreturn.patch
Type: text/x-patch
Size: 864 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20180614/2e913f1a/attachment.bin>


More information about the freebsd-emulation mailing list