From owner-freebsd-current@FreeBSD.ORG Thu Feb 9 20:50:51 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8410106566C for ; Thu, 9 Feb 2012 20:50:51 +0000 (UTC) (envelope-from dmitrym@juniper.net) Received: from exprod7og106.obsmtp.com (exprod7og106.obsmtp.com [64.18.2.165]) by mx1.freebsd.org (Postfix) with ESMTP id 6E16F8FC0A for ; Thu, 9 Feb 2012 20:50:51 +0000 (UTC) Received: from P-EMHUB01-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob106.postini.com ([64.18.6.12]) with SMTP ID DSNKTzQxqQTxMcdCj7oJR9UMHbZfA3bkvoWm@postini.com; Thu, 09 Feb 2012 12:50:51 PST Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB01-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Thu, 9 Feb 2012 12:48:32 -0800 Received: from [172.24.26.191] (dmitrym-lnx.jnpr.net [172.24.26.191]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q19KmR194398; Thu, 9 Feb 2012 12:48:30 -0800 (PST) (envelope-from dmitrym@juniper.net) Message-ID: <4F34311A.9050702@juniper.net> Date: Thu, 9 Feb 2012 12:48:26 -0800 From: Dmitry Mikulin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111229 Thunderbird/9.0 MIME-Version: 1.0 To: Konstantin Belousov References: <20120129074843.GL2726@deviant.kiev.zoral.com.ua> <4F26E0D1.8040100@juniper.net> <20120130192727.GZ2726@deviant.kiev.zoral.com.ua> <4F2C756A.80900@juniper.net> <20120204204218.GC3283@deviant.kiev.zoral.com.ua> <4F3043E2.6090607@juniper.net> <20120207121022.GC3283@deviant.kiev.zoral.com.ua> <4F318D74.9030506@juniper.net> <4F31C89C.7010705@juniper.net> <4F3318AD.6000607@juniper.net> <20120209122908.GD3283@deviant.kiev.zoral.com.ua> In-Reply-To: <20120209122908.GD3283@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: f8e27f27-03b2-4c3e-9447-119194e72cb6 X-Mailman-Approved-At: Thu, 09 Feb 2012 21:17:32 +0000 Cc: freebsd-current Current , Marcel Moolenaar Subject: Re: [ptrace] please review follow fork/exec changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 20:50:51 -0000 > The semantic of PL_FLAG_EXEC up until now is very simple: it indicates > that current stop occured during the first return to usermode after > successful exec. The proposed patch breaks the semantic, because now > some stops which satisfy the stated condition are no longer marked with > the flag. > > That said, I am lost. You stated that you still need some stops at > exec even when not PT_FOLLOW_EXEC is requested. Why usermode cannot > remember whether the PT_FOLLOW_EXEC was set for the process, and ignore > PL_FLAG_EXEC if not requested ? I was trying to avoid making ugly changes in gdb if it was possible not to make ugly changes in the kernel. I changed gdb to work without PT_FOLLOW_EXEC. > I just gave up and added PL_FLAG_EXECF, which is set when PT_FOLLOW_EXEC > was set and exec is active. Would this work for your purposes ? > PL_FLAG_EXECF has the same semantic as PL_FLAG_EXEC had in your > follow-exec.patch. But the stop set is not changed comparing with the > stock src. > > Are you fine with PL_FLAG_CHILD part of the changes ? If yes, I will > commit it to make some progress. yes, the PL_FLAG_CHILD part works for me. Please commit it and we can move on to the next part of the review.