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=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 8C89AC49EA7 for ; Thu, 24 Jun 2021 20:18:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67DD561248 for ; Thu, 24 Jun 2021 20:18:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232675AbhFXUVD (ORCPT ); Thu, 24 Jun 2021 16:21:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232553AbhFXUVB (ORCPT ); Thu, 24 Jun 2021 16:21:01 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3E49C061756 for ; Thu, 24 Jun 2021 13:18:40 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id a11so12338608lfg.11 for ; Thu, 24 Jun 2021 13:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QdsTxdbLy6OAQCJe+BxLmLcw7gNCvC1VuxBL+c/EdBc=; b=CN50qFEZiM/KC40ZFphsMGum7u0fgQ/7PSKkzLv3Imv2qoT+m2I4xle85ef/hnSBmd jQ7V9plRVWmia3duLG9JtlwtA8gRKNqUguKYIy9mayOSyo2ct58AmgGxinOrbYWP7B9+ tKraksvFmL2Pf/jciosSyTRbQSZ6FxNlrKsF4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QdsTxdbLy6OAQCJe+BxLmLcw7gNCvC1VuxBL+c/EdBc=; b=FMGS/GjDbeGRk15BqbczavryE+0GjYo++MM5B+J7EAD768hKgKMMpYF/BHEwi1SLjn +/bTcuH/oBYZtXeAapaJLsDBm8b6ET8vYDFf+Dc6/COkm6xOaIwulpXE/I6O/j2hsvNd d9EirhVlL8yRc4eWGZnReQ/Q2lz/a9XTlN55FfH+aT6ma/1lYoRYW/8uGKZN5AP8A+GM 9NVXLOTr5usBoLUxhwEBzmiLwbickoKbOBg+lAdKgts3EiJy8AfVOdOIG/DB89cLSXmh eZk4nMB/IAjRCHrbN0LCFKOM14lod08RZtWIvSo0CUpELxGDkXGr2JfUOZ9yVHDOE0QB +DXw== X-Gm-Message-State: AOAM5305WdhLP0v1QdGFG7ti/lnyN7A/k3vaqs+u98VR+I4YeQbXnzD3 9TCcb7jOmMp0V0DydM6cnNoFhjquEGVgaDpO1U4= X-Google-Smtp-Source: ABdhPJxqHzrXw5oZA7idM3F1OUSFogfQK3I8IQ34ObhrJlb04Sxee0WlqUoAKdYosnSpXd/wE0wrJw== X-Received: by 2002:ac2:5ec3:: with SMTP id d3mr5375382lfq.440.1624565918901; Thu, 24 Jun 2021 13:18:38 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id q21sm272907ljj.77.2021.06.24.13.18.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Jun 2021 13:18:38 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id j2so12358150lfg.9 for ; Thu, 24 Jun 2021 13:18:38 -0700 (PDT) X-Received: by 2002:a05:6512:baa:: with SMTP id b42mr4974557lfv.487.1624565494034; Thu, 24 Jun 2021 13:11:34 -0700 (PDT) MIME-Version: 1.0 References: <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> <87a6njf0ia.fsf@disp2133> <87tulpbp19.fsf@disp2133> <87zgvgabw1.fsf@disp2133> <875yy3850g.fsf_-_@disp2133> <87y2az5bmt.fsf_-_@disp2133> In-Reply-To: <87y2az5bmt.fsf_-_@disp2133> From: Linus Torvalds Date: Thu, 24 Jun 2021 13:11:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 7/9] signal: Make individual tasks exiting a first class concept. To: "Eric W. Biederman" Cc: Al Viro , Michael Schmitz , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 24, 2021 at 12:03 PM Eric W. Biederman wrote: > > Implement start_task_exit_locked and rewrite the de_thread logic > in exec using it. > > Calling start_task_exit_locked is equivalent to asyncrhonously > calling exit(2) aka pthread_exit on a task. Ok, so this is the patch that makes me go "Yeah, this seems to all go together". The whole "start_exit()" thing seemed fairly sane as an interesting concept to the whole ptrace notification thing, but this one actually made me think it makes conceptual sense and how we had exactly that "start exit asynchronously" case already in zap_other_threads(). So doing that zap_other_threads() as that async exit makes me just thin kthat yes, this series is the right thing, because it not only cleans up the ptrace condition, it makes sense in this entirely unrelated area too. So I think I'm convinced. I'd like Oleg in particular to Ack this series, and Al to look it over, but I do think this is the right direction. Linus