From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hagen Paul Pfeifer Subject: Re: [RFC v2] ptrace, pidfd: add pidfd_ptrace syscall Date: Tue, 28 Apr 2020 08:39:35 +0200 Message-ID: <20200428063935.GA5660@laniakea> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from mout-p-201.mailbox.org ([80.241.56.171]:9918 "EHLO mout-p-201.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbgD1Gjr (ORCPT ); Tue, 28 Apr 2020 02:39:47 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Linus Torvalds Cc: Andy Lutomirski , Aleksa Sarai , Christian Brauner , Arnd Bergmann , "Eric W. Biederman" , Jann Horn , kernel list , Florian Weimer , Al Viro , Christian Brauner , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Brian Gerst , Sami Tolvanen , David Howells , Andy Lutomirski , Oleg Nesterov , Arnaldo Carvalho de Melo , Sargun * Linus Torvalds | 2020-04-27 21:28:14 [-0700]: >> I hate to say this, but I’m not convinced that asking the gdb folks is >> the right approach. GDB has an ancient architecture and is >> *incredibly* buggy. I’m sure ptrace is somewhere on the pain point >> list, but I suspect it’s utterly dwarfed by everything else. > >You may be right. However, if gdbn isn't going to use it, then I >seriously don't think it's worth changing much. > >It might be worth looking at people who don't use ptrace() for >debugging, but for "incidental" reasons. IOW sandboxing, tracing, >things like that. > >Maybe those people want things that are simpler and don't actually >need the kinds of hard serialization that ptrace() wants. > >I'd rather add a few really simple things that might not be a full >complement of operations for a debugger, but exactly because they >aren't a full debugger, maybe they are things that we can tell are >obviously secure and simple? Okay, to sum up the the whole discussion: we go forward with Jann's proposal by simple adding PTRACE_ATTACH_PIDFD and friends. This is the minimal invasive solution and the risk of an potenial security problem is almost not present[TM]. Changing the whole ptrace API is a different beast. I rather believe that I see Linus Linux successor rather than a ptrace successor. I am fine with PTRACE_ATTACH_PIDFD! Hagen From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-201.mailbox.org ([80.241.56.171]:9918 "EHLO mout-p-201.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbgD1Gjr (ORCPT ); Tue, 28 Apr 2020 02:39:47 -0400 Date: Tue, 28 Apr 2020 08:39:35 +0200 From: Hagen Paul Pfeifer Subject: Re: [RFC v2] ptrace, pidfd: add pidfd_ptrace syscall Message-ID: <20200428063935.GA5660@laniakea> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Linus Torvalds Cc: Andy Lutomirski , Aleksa Sarai , Christian Brauner , Arnd Bergmann , "Eric W. Biederman" , Jann Horn , kernel list , Florian Weimer , Al Viro , Christian Brauner , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Brian Gerst , Sami Tolvanen , David Howells , Andy Lutomirski , Oleg Nesterov , Arnaldo Carvalho de Melo , Sargun Dhillon , Linux API , linux-arch , Greg Kroah-Hartman Message-ID: <20200428063935.c697h0RS5670lr1zpQAvClgiuaG-uHhSYS-k0kQ_J10@z> * Linus Torvalds | 2020-04-27 21:28:14 [-0700]: >> I hate to say this, but I’m not convinced that asking the gdb folks is >> the right approach. GDB has an ancient architecture and is >> *incredibly* buggy. I’m sure ptrace is somewhere on the pain point >> list, but I suspect it’s utterly dwarfed by everything else. > >You may be right. However, if gdbn isn't going to use it, then I >seriously don't think it's worth changing much. > >It might be worth looking at people who don't use ptrace() for >debugging, but for "incidental" reasons. IOW sandboxing, tracing, >things like that. > >Maybe those people want things that are simpler and don't actually >need the kinds of hard serialization that ptrace() wants. > >I'd rather add a few really simple things that might not be a full >complement of operations for a debugger, but exactly because they >aren't a full debugger, maybe they are things that we can tell are >obviously secure and simple? Okay, to sum up the the whole discussion: we go forward with Jann's proposal by simple adding PTRACE_ATTACH_PIDFD and friends. This is the minimal invasive solution and the risk of an potenial security problem is almost not present[TM]. Changing the whole ptrace API is a different beast. I rather believe that I see Linus Linux successor rather than a ptrace successor. I am fine with PTRACE_ATTACH_PIDFD! Hagen