From owner-freebsd-emulation@freebsd.org Thu Jun 14 12:37:11 2018 Return-Path: Delivered-To: freebsd-emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13FD61001811 for ; Thu, 14 Jun 2018 12:37:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86E656855A for ; Thu, 14 Jun 2018 12:37:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTP id w5ECb0Fp081312; Thu, 14 Jun 2018 15:37:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w5ECb0Fp081312 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w5ECaxBM081311; Thu, 14 Jun 2018 15:36:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 14 Jun 2018 15:36:59 +0300 From: Konstantin Belousov To: Yanko Yankulov Cc: freebsd-emulation@freebsd.org Subject: Re: two proposed linuxulator fixes + ptrace Message-ID: <20180614123659.GZ2493@kib.kiev.ua> References: <20180614101324.GW2493@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2018 12:37:11 -0000 On Thu, Jun 14, 2018 at 02:46:20PM +0300, Yanko Yankulov wrote: > 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. Ok, but what is the tracer ? Is it ptrace(2) debugger, or something else ? > > > > 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. Committed as r335135, thanks.