From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758419Ab1IIFy4 (ORCPT ); Fri, 9 Sep 2011 01:54:56 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:54003 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758329Ab1IIFyx (ORCPT ); Fri, 9 Sep 2011 01:54:53 -0400 From: Denys Vlasenko To: Tejun Heo Subject: Re: Why I want PTRACE_O_TRACESTOP option Date: Fri, 9 Sep 2011 07:54:50 +0200 User-Agent: KMail/1.8.2 Cc: Denys Vlasenko , Oleg Nesterov , linux-kernel@vger.kernel.org References: <1315500802.18043.45.camel@dhcp-25-63.brq.redhat.com> <20110909001853.GA29319@htj.dyndns.org> In-Reply-To: <20110909001853.GA29319@htj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201109090754.50272.vda.linux@googlemail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 09 September 2011 02:18, Tejun Heo wrote: > Hello, Denys. > > On Thu, Sep 08, 2011 at 06:50:01PM +0200, Denys Vlasenko wrote: > > Consider what will happen when a next ptrace fix will require > > a way to change ptrace API at runtime. A new option will likely > > be introduced, say, PTRACE_O_TRACEPONY, with next available > > bit position 7, and perhaps some new event will be generated, > > PTRACE_EVENT_PONY, with value.... yes, it can't be 7, > > PTRACE_EVENT_STOP took it. So it will probably be 8. > > Then, just give it the next matching number. My point is that previously, ptrace behavior was modified by setting options. Why don't we use this mechanism? Why we invent a different wheel? Ptrace is ugly as-is, why complicate it even further? The argument was that SETOPTIONS wasn't suitable for modifying attach behavior, but this is fixed by "set options on SEIZE" patch. I don't see why we can't use options mechanist to affect group-stop behavior now. -- vda