Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2018 14:46:20 +0300
From:      Yanko Yankulov <yanko.yankulov@gmail.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: two proposed linuxulator fixes + ptrace
Message-ID:  <CABTd0_p=5cqsN5TKtEWXY_oQXtGdJOyMHEzjoUJeaYcKShLCRQ@mail.gmail.com>
In-Reply-To: <20180614101324.GW2493@kib.kiev.ua>
References:  <CABTd0_pqdAtHMH9gSJdebstASuoomYw1XLbkbbsMCUvtE-=vDA@mail.gmail.com> <20180614101324.GW2493@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000f362db056e98a598
Content-Type: text/plain; charset="UTF-8"

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.

--000000000000f362db056e98a598
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-linuxlator-amd64-don-t-mangle-r10-on-sigreturn.patch"
Content-Disposition: attachment; 
	filename="0001-linuxlator-amd64-don-t-mangle-r10-on-sigreturn.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_jiegb3jz0

RnJvbSA2NGU2NGRhYjQyNGE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ZCwgZXJyb3IpOwogCiAJIC8qIFJlc3RvcmUgYWxsIHJlZ2lzdGVycy4gKi8KLS0g
CjIuMTcuMQoK
--000000000000f362db056e98a598--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABTd0_p=5cqsN5TKtEWXY_oQXtGdJOyMHEzjoUJeaYcKShLCRQ>