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=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 EA89DC48BC2 for ; Sat, 26 Jun 2021 03:20:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D28596194B for ; Sat, 26 Jun 2021 03:20:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230044AbhFZDW4 (ORCPT ); Fri, 25 Jun 2021 23:22:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230032AbhFZDWx (ORCPT ); Fri, 25 Jun 2021 23:22:53 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9E96C061574 for ; Fri, 25 Jun 2021 20:20:31 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id c7-20020a17090ad907b029016faeeab0ccso9098666pjv.4 for ; Fri, 25 Jun 2021 20:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=m/r2jKnf6mzXHGS0+mY6tO8kdxoIVifevnwrBMvWaHk=; b=k5evDFcu122UMvrbb5kz6pJG46rSJobzAashV394QfzBP+VFZW1qcemLOWIMTqTwnO KhX0VgfKs97JSqirj7NxmKbJhyY7pwgk8AjhjA15rr2M34TyDxxbjmKofm2KW8+ZtL0q Wq8LJ8oNzBFS43JDygd5Msv1UzewtYzPIfmIg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=m/r2jKnf6mzXHGS0+mY6tO8kdxoIVifevnwrBMvWaHk=; b=AL+5f8lHhHdL7yT+nRWz77K3E/CEeuwqZKIJCS7DZ85RjCpseWJCo/58XF1ZoXi/mJ w5tlbq9x/hMm0CQIANdOpX2easihj91tc0Kw5p0iUMbysmKX1fxQRyMNtcZ/7PmcqILa EmOBddFQKSWf4zHOYd/AKmfsbSyQ5pn/tVisBCNAQ8T0Q7sX26VagVooH9AADxY9HPpv dLnbj2F3AZcGrbsGxl+Vv/9rh0OOJxUlEdkVb1IkkZIWmn4UWrzFbOuUeR1bRhoJe93N 0SxxiBHm3bKHOgDDqjq2S/jTa6VBQ8/VZE+YeJP8zlgrXgj1gM+h4+5ZWys4MOGGP9PP tJHg== X-Gm-Message-State: AOAM531YdAYRqzAJFD9ffiBLR4pU5/1DujXGfTAjl79DTq6e2ld8cXOK NP++aeJWmv/3rrp6M4OIvMlQmg== X-Google-Smtp-Source: ABdhPJx6GLx4csCnOZlukBXZovccTKxSC/6UVhMJK8OX54jANvNUvIHSf9UYkCV8OtkrYu2Hzi1FWg== X-Received: by 2002:a17:90a:3d09:: with SMTP id h9mr23591717pjc.78.1624677631208; Fri, 25 Jun 2021 20:20:31 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id h18sm6660549pgl.87.2021.06.25.20.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 20:20:30 -0700 (PDT) Date: Fri, 25 Jun 2021 20:20:29 -0700 From: Kees Cook To: "Eric W. Biederman" Cc: Linus Torvalds , 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 Subject: Re: [PATCH 3/9] signal/seccomp: Dump core when there is only one live thread Message-ID: <202106252018.0EC329C@keescook> References: <87a6njf0ia.fsf@disp2133> <87tulpbp19.fsf@disp2133> <87zgvgabw1.fsf@disp2133> <875yy3850g.fsf_-_@disp2133> <87lf6z6qbd.fsf_-_@disp2133> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87lf6z6qbd.fsf_-_@disp2133> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 24, 2021 at 02:00:22PM -0500, Eric W. Biederman wrote: > Replace get_nr_threads with atomic_read(¤t->signal->live) as > that is a more accurate number that is decremented sooner. Okay, seems fine to me. :) -- Kees Cook