From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10945C48BE8 for ; Wed, 16 Jun 2021 20:51:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE7F7611BE for ; Wed, 16 Jun 2021 20:51:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233746AbhFPUxM (ORCPT ); Wed, 16 Jun 2021 16:53:12 -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.