Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3778943ybz; Mon, 27 Apr 2020 23:43:27 -0700 (PDT) X-Google-Smtp-Source: APiQypKJUx7L3rRvyt+Kfv+rKxS7x14SZeyBrBNxDCSbAnTHg0KoQnRDMMy/gw/TDBEWke8KSWge X-Received: by 2002:a17:906:4f03:: with SMTP id t3mr22466107eju.254.1588056207459; Mon, 27 Apr 2020 23:43:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588056207; cv=none; d=google.com; s=arc-20160816; b=GxEE4yBNvvVJrqE1aSGCRth3EAzER3p+xmAxbfJcMPSVfmalaTHuHca4WnmUfEEhle o+gPjafyuAbV1dGSkAT3myNjR3ajmyYR8ZUs5WrE6jxMfm0XzCu6ZDOvthAQ1XD5e0F5 ecwyipq//QYGJlnSzYSc2Ee3iB+5OUd40mVKD4ZxHr1ofUrT7mI473nhmN/nucMVMByw MEN9vK+flx5EEOPwNsOwurPChTtMQBwKEwXEuDmJrZsATP7JHeIlOGZ+WMAHiykB2D1M 5UnuYoZYmzqWtptDT0kALrhojwx9EWxAjV9TxiUGcyxI9E++jsSrtPQFR+aJgkJsfZ1Z tRNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=m6xoFB92UbWUYkefT4e58ZHh0ITot2JOfAqjanONos0=; b=UFdXbaanC9hsrDBK9HNZhptrJAZN7VQ5ktlgDPlhLNDFt3IPGix1yLEvroHleP9xSp wD6nIdpw+/yc2B2O9Jc/XPg7TkDxP1dUpSD6mzXYKk7vgOrupz/yoMyObouVwaSAK1CU /ZM9o7uYwb3+xcnHD+OWI1CgGtgLY1GOlQ/bb7YGe2nJorNdpA3x6OzIhbnPa9s1j3nl /WOd5mhnTB6FcQI1V+AuPha7LMj4aWUY/yE4TMfdguaB56y0GyZnokLXyKm57ydelswA N+Wt7g4GX2rppqeGnwSJnCcoRg2EfdUFxYNtvBQSh9x35mWB+vWysGfzjhKGHzcYi52C u1XA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g4si995182edu.287.2020.04.27.23.43.03; Mon, 27 Apr 2020 23:43:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726299AbgD1Gjs (ORCPT + 99 others); Tue, 28 Apr 2020 02:39:48 -0400 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 X-Greylist: delayed 137075 seconds by postgrey-1.27 at vger.kernel.org; Tue, 28 Apr 2020 02:39:46 EDT Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 49BBp91szrzQl1t; Tue, 28 Apr 2020 08:39:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id lcNNyXHwjvSI; Tue, 28 Apr 2020 08:39:40 +0200 (CEST) Date: Tue, 28 Apr 2020 08:39:35 +0200 From: Hagen Paul Pfeifer 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 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: X-Key-Id: 98350C22 X-Key-Fingerprint: 490F 557B 6C48 6D7E 5706 2EA2 4A22 8D45 9835 0C22 X-GPG-Key: gpg --recv-keys --keyserver wwwkeys.eu.pgp.net 98350C22 X-Rspamd-Queue-Id: AA8701754 X-Rspamd-Score: 0.57 / 15.00 / 15.00 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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