Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp29967pxj; Wed, 16 Jun 2021 19:23:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/oiIIWNIEvyD1L55VgKVSvZwKY0JzHoRszTkrzcCpO99b/O1bC0qgLMYfBJ0ca+ev5nq4 X-Received: by 2002:a17:906:9a4b:: with SMTP id aj11mr2627943ejc.510.1623896595176; Wed, 16 Jun 2021 19:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623896595; cv=none; d=google.com; s=arc-20160816; b=VR4OfEzdLpNKNxcKE8HsI7CabVFDMUQ07dVtpyXXj+jMTh5TcKzHIzsM6aDtV7UMJQ Bf82lQDoA6THvzgLLwVtLS72aQkXPO6BtnbD0/rpujshrRI4+kCk9fzZEL6bB5jYWH09 xw7KndgXEDRg3sFCVA7nmoPcFdOtYBxqR7gwP59c9iSZgX0QBqFhutP5V7O+Orth5TOT Mlh7EjB3Je0BvjbAuSm15ai9OKOR4dwXTe/hKlP3nusgwuijzwcVtc9VocaGpWHie88/ uxSJjeD2m8a9i+QexrkYf+Ut9FM3tfWlsTrr6pGZUEAnvsPjFG5LLUjgh+pjSndPUs4n yRUQ== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=K82ICJi4G+3wAAVVGuu4Hkf/GXmFJ7IkVuH1FSsccTs=; b=qHt4oLq5cxZVmqDJ9yYj/JlslpeFi3EfoPnw7xt7AQaN6GhOSG1/FBv4NhG4caeI3z +H7IyaT1xUldV5pHHwD3hGeIwbPK4lZ7h+GWvunOyZUi+jWJqHC8QGn49NP3AyVNPoxe SB9hf/W8nfK7TxOwD/Tj0UKZjwzIv9YZmuUM6N0gWzEet2LLDdIwlG94t3ggux5FGQUI oPIFfoTxPW4oEYSaMSdVyS2xvJvTWt3DldXy/ypntT0jBEpCvqcPCIIMgs2BZm4zHHJr iSc7hJkMRgWI1ZK2GOUfH89ZLHhyrrrsYRZlGt5iK0dWKYnyIQh3+Ko5LXclmVzOV/+v G1dQ== 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 19si3960057ejx.529.2021.06.16.19.22.52; Wed, 16 Jun 2021 19:23:15 -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 S233741AbhFPUxL (ORCPT + 99 others); Wed, 16 Jun 2021 16:53:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233711AbhFPUxL (ORCPT ); Wed, 16 Jun 2021 16:53:11 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E010C061574; Wed, 16 Jun 2021 13:51:04 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltcUg-00955k-JQ; Wed, 16 Jun 2021 20:50:38 +0000 Date: Wed, 16 Jun 2021 20:50:38 +0000 From: Al Viro To: "Eric W. Biederman" Cc: Michael Schmitz , Linus Torvalds , linux-arch , Jens Axboe , Oleg Nesterov , Linux Kernel Mailing List , Richard Henderson , Ivan Kokshaysky , Matt Turner , alpha , Geert Uytterhoeven , linux-m68k , Arnd Bergmann , Ley Foon Tan , Tejun Heo , Kees Cook Subject: Re: [PATCH] alpha: Add extra switch_stack frames in exit, exec, and kernel threads Message-ID: References: <87pmwsytb3.fsf@disp2133> <87sg1lwhvm.fsf@disp2133> <6e47eff8-d0a4-8390-1222-e975bfbf3a65@gmail.com> <924ec53c-2fd9-2e1c-bbb1-3fda49809be4@gmail.com> <87eed4v2dc.fsf@disp2133> <5929e116-fa61-b211-342a-c706dcb834ca@gmail.com> <87fsxjorgs.fsf@disp2133> <87zgvqor7d.fsf_-_@disp2133> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zgvqor7d.fsf_-_@disp2133> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 15, 2021 at 02:36:38PM -0500, Eric W. Biederman wrote: > > While thinking about the information leaks fixed in 77f6ab8b7768 > ("don't dump the threads that had been already exiting when zapped.") > I realized the problem is much more general than just coredumps and > exit_mm. We have io_uring threads, PTRACE_EVENT_EXEC and > PTRACE_EVENT_EXIT where ptrace is allowed to access userspace > registers, but on some architectures has not saved them. Wait a sec. To have anything happen on PTRACE_EVENT_EXEC, you need the fucker traced. *IF* you want to go that way, at least make it conditional upon the same thing.