Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1038740ybh; Tue, 10 Mar 2020 13:18:21 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsA5h7PWxEdrEPVc1XsHcwSkDucYRl/orjNjcXjTpiufm/Z5IUcFtxN09R7xyjL6uY1hJyP X-Received: by 2002:aca:be09:: with SMTP id o9mr2552747oif.177.1583871501705; Tue, 10 Mar 2020 13:18:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583871501; cv=none; d=google.com; s=arc-20160816; b=AeMItfAjIyyE2Ln6O8UnpWhKInwwE21uYzHkOwlgH1A2rje4e2goDHg10GqY0Tjuf4 Ldff+Vj+6SjI85+T3evjCjUebYrbVyEG4pS8XF7DOAeZDSPUpSoat/Mzi2IlS/BnwcAb t80lj3lc746qVnjLxE5GNydAwY5HhcYn/IPcwLv4VWN3ihFeVDRKRNGU4Z0iK6I2G3H+ 5qfc990K/IIfEKdji6qCtKY/oSGxRi5+/qVmXWhH2LfRAe+h9ox6A7lOiQyV1iQtfFN1 CXfsin3ICqz7zeG6+NJV6r1xZhDJtcRLinVewDptNz0rZjzQC2nwuv/XIfBSX5MHqu5P XFJw== 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 :dkim-signature; bh=DUOjVP5Gbs/kqvClABR44FE8+xg+AgbM19bKNtAY6RM=; b=Y5KNuwit5HoC/aAgqZGq/bfLqXZdSEcwkB2mu3qOhOAlZN9VeqVtOksG+IqNjWv1mW AvNQrOsJTs/2Q28M4UEKmOrnLAtYGpBR8QVlgypZazkfeZ2M5uywQ+dd4iLW6m3Td/+l 37IuUxg3BBwizQC9f+ieotQT/ofbS0YBWWgYBb8ipeYr5ySmXQ7hPYRsc/js9IfpnlY9 Jpk5wPWCvMwRiczM+i8b3QaSbGu5h42nnRgcJinqSU8bFZxLqtP6VvUtozNeOEDHi6Pg kieENbmhNUEjqEpI5Znomw2+mGN7OEQRfxPc0YstUPTiOE+samzYkBSiVpxK61tck6du +WxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=J4M0uyN8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si9048559otf.128.2020.03.10.13.18.06; Tue, 10 Mar 2020 13:18:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=J4M0uyN8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbgCJUQd (ORCPT + 99 others); Tue, 10 Mar 2020 16:16:33 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40647 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726545AbgCJUQc (ORCPT ); Tue, 10 Mar 2020 16:16:32 -0400 Received: by mail-pf1-f196.google.com with SMTP id l184so7014034pfl.7 for ; Tue, 10 Mar 2020 13:16:32 -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=DUOjVP5Gbs/kqvClABR44FE8+xg+AgbM19bKNtAY6RM=; b=J4M0uyN8yr+WE91/EnStnaXtqW7/nhowSFEP7427vQyPhmyVseK/RtuSzWChg/C9Hr zZ+zMYnkWIePFvXZqr08Bgtu6LZxyciu3wJk6FDiKEN2gAr2hr9x1d1z8YndRb7xny59 LIF8JAG0apaOV2Wrk6HcAMaxdWObISAFLKEGM= 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=DUOjVP5Gbs/kqvClABR44FE8+xg+AgbM19bKNtAY6RM=; b=oFEgB+8VS/eIWpeWvoF2+FpNk0iMZb97jNrq4I5/ygFHbGKxPlsIUspc+6gcKUjfrC uKOilmgFji8klPNhCOcm24qG9lSYvq9We6J9i14Pw9UfMkJyOySsTmapvQPFNKA/alHI XMAL7THYzW3koBQZek5WIU37/L9tthtUFSTbazziS71t7bEwMnqxgDDmGKI8JRkAJa/j PinpKpLEk9BWxLrxtXzVnwnUqSGzGIFolOnWqqWguN/+fN2gGX7sfKENze9OsvLxdL2T PERAO77K36qysv+30yKdE/dVimXGHVuJXY3KSQ9FIZyN3hv+ulYL+IFMeByYgr2XnGYF 7SKw== X-Gm-Message-State: ANhLgQ3EyGfUI+oRBOdnJosQsDgN2b1x/A7LP6FNkcB6dho+N6f7DhJR aX8qhUhYP8/rfnxU29XpeAW29w== X-Received: by 2002:a63:2882:: with SMTP id o124mr6655825pgo.390.1583871391628; Tue, 10 Mar 2020 13:16:31 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id n9sm45162722pfq.160.2020.03.10.13.16.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2020 13:16:30 -0700 (PDT) Date: Tue, 10 Mar 2020 13:16:29 -0700 From: Kees Cook To: "Eric W. Biederman" Cc: Christian Brauner , Bernd Edlinger , Jann Horn , Jonathan Corbet , Alexander Viro , Andrew Morton , Alexey Dobriyan , Thomas Gleixner , Oleg Nesterov , Frederic Weisbecker , Andrei Vagin , Ingo Molnar , "Peter Zijlstra (Intel)" , Yuyang Du , David Hildenbrand , Sebastian Andrzej Siewior , Anshuman Khandual , David Howells , James Morris , Greg Kroah-Hartman , Shakeel Butt , Jason Gunthorpe , Christian Kellner , Andrea Arcangeli , Aleksa Sarai , "Dmitry V. Levin" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "stable@vger.kernel.org" , "linux-api@vger.kernel.org" Subject: Re: [PATCH v2 3/5] exec: Move cleanup of posix timers on exec out of de_thread Message-ID: <202003101313.CF8CBDC582@keescook> References: <87r1y8dqqz.fsf@x220.int.ebiederm.org> <87tv32cxmf.fsf_-_@x220.int.ebiederm.org> <87v9ne5y4y.fsf_-_@x220.int.ebiederm.org> <87eeu25y14.fsf_-_@x220.int.ebiederm.org> <20200309195909.h2lv5uawce5wgryx@wittgenstein> <877dztz415.fsf@x220.int.ebiederm.org> <20200309201729.yk5sd26v4bz4gtou@wittgenstein> <87k13txnig.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k13txnig.fsf@x220.int.ebiederm.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 09, 2020 at 03:48:55PM -0500, Eric W. Biederman wrote: > And I completely agree that we should at least rename tsk to me. > Just for clarity. I think it wouldn't hurt to add comments to spell it out explicitly in each of the tsk->me functions, something like: /* * The "me" task_struct argument here must only ever refer to "current", * but it gets passed in to avoid re-calculating "current" in each helper. */ I've found that the exec code in its entirety would be better off with more comments. :) Usually that's the bulk of what I find myself adding when I make changes in this area. ;) -Kees -- Kees Cook