Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5272952yba; Wed, 10 Apr 2019 15:35:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9HqCaJaIt+jRbg99zwMUscgOGmoLN5BAhIxaRd9KLHuHeYlpmHT34t2f9QefqGCWqKxcU X-Received: by 2002:a17:902:141:: with SMTP id 59mr10474588plb.132.1554935729585; Wed, 10 Apr 2019 15:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554935729; cv=none; d=google.com; s=arc-20160816; b=obxxEETVhDvLcYRsM3hgTHOwLYgLf0XirFg40hiTyiW9iwPqYzYexZiPzlP2g5OMo/ 46LQ984lDIYncl1aN5B2Wdv7WFU579wfNsWu7XmmBTV/4Tp9BS+yq1lUERiCaYrBmHr4 lIbBDPczccIkGa2IaRapIzdTrZ+kiRzbFJSGth20zAzjiN7pkzYUMKkIJeRrVRvlTq2t 4Y7nGMrkoOSSrTy6DOhFUYm+FIm5U6Xxlydi5Va4gwszQ5MBaSLBeMjmUcCyfpeYxT3U giUNV1MI1+PoUPxeuT/wOOhPzLVr8YGA55d5RmhaoaMOR9EfoHmL97eW3Vzk0mRjeiX1 ZF9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=/d+/Smh+ztTKnhe7lRqmlhlKS4kJ9d0Yz1XzvP1SVsI=; b=A9FAUIM96Tlo1L77/EewQ6V0omG82cF5nkWDaZke5mZuwyWu8j0zOsjH9Dchgwup6T ALulYc8qQlCEPKBQ9kZs/c5LUn0j6CE1Wk8i8zRY/ZzSdRc/rztkS/Orn4U9lSpZrk4K IlpLmra9h8Trr9vdlDlYWDpBUuy3p0n+lA2iXFBLNGJTPnsSqDQnKZCfDouqJmOUMGOY 8DaYsMj29DAhXznxTBJLpus8j5KuiaNkk9eJqywZ1qth+U8sCKVRoubxcs0tx50d4TCx wC+rk7L0fRHU7zk4IBIjFFbC+Khhj+4iZVGh5W493elC3lkfaDJaiDFmFMz5wIruVBqu T+lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lmjoIghn; 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 e5si22904215pgb.262.2019.04.10.15.35.12; Wed, 10 Apr 2019 15:35:29 -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=lmjoIghn; 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 S1726649AbfDJWea (ORCPT + 99 others); Wed, 10 Apr 2019 18:34:30 -0400 Received: from mail-vs1-f67.google.com ([209.85.217.67]:33294 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbfDJWea (ORCPT ); Wed, 10 Apr 2019 18:34:30 -0400 Received: by mail-vs1-f67.google.com with SMTP id a190so2360336vsd.0 for ; Wed, 10 Apr 2019 15:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/d+/Smh+ztTKnhe7lRqmlhlKS4kJ9d0Yz1XzvP1SVsI=; b=lmjoIghnhFGVRmeW7FlGNwb+HYAG+0AXZxYzMM1eWAwIUi32/pVnH8w3L/tAoULcbR OTOo7y9qzxhwrWmLexdTslLY0L/NaAhLwae4S/sD/o6FJGVgR28RKAOHfgWorVCcJtFV 60Z7Daj1NnQdcjpzkqhB4Sv2pENweuYx6muCs= 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=/d+/Smh+ztTKnhe7lRqmlhlKS4kJ9d0Yz1XzvP1SVsI=; b=WdchU5PHCQFk9CBRxyz2eMueOHE6pTOkJIvupRwMIP6rRQm962IQtrXj+ARqyxb1VN VdPysV4lCQ2XotzthLYjMBpanQ11Gi5Iu0QO5R5METKAdfyKFbrX+AR3wyc15Akox1pp WO8Zw7lJrRZlOI6Zumpf28pmFqBqzm8xN3tcFfjRhyGV55QItlGOtN7FSyDsf8yOPEu2 iyCRcd1LBnOO15VzhH5UVLPsusCExOwa7OzcrhAJDefLJ1pyb05mqwNTx7N10Sn339hy d1h89qkEg+LdnVeqIFvLyqcr+kKU6sv0bNpGJTKpaCE7lda6oqC0gz/R4beAbIw1GD+R lOvQ== X-Gm-Message-State: APjAAAUpY1yKZjDZM4MVR3dTIUJIZkHJrfF+fihxUD3NL/d9h6g2FYOb WHTWlvhzWbrACZM7q0F0FJ4dpX2M1+Q= X-Received: by 2002:a67:d38f:: with SMTP id b15mr25636195vsj.154.1554935669220; Wed, 10 Apr 2019 15:34:29 -0700 (PDT) Received: from mail-ua1-f51.google.com (mail-ua1-f51.google.com. [209.85.222.51]) by smtp.gmail.com with ESMTPSA id d134sm16743006vkf.6.2019.04.10.15.34.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 15:34:28 -0700 (PDT) Received: by mail-ua1-f51.google.com with SMTP id v7so1342812uak.13 for ; Wed, 10 Apr 2019 15:34:28 -0700 (PDT) X-Received: by 2002:ab0:60cd:: with SMTP id g13mr24036899uam.85.1554935667664; Wed, 10 Apr 2019 15:34:27 -0700 (PDT) MIME-Version: 1.0 References: <20190408220925.13077-1-mcroce@redhat.com> <20190408220925.13077-3-mcroce@redhat.com> In-Reply-To: From: Kees Cook Date: Wed, 10 Apr 2019 15:34:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] kernel: use sysctl shared variables for range check To: Matteo Croce Cc: Andrew Morton , LKML , "linux-fsdevel@vger.kernel.org" , Luis Chamberlain , Alexey Dobriyan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 10, 2019 at 3:30 PM Matteo Croce wrote: > > On Wed, Apr 10, 2019 at 11:51 PM Kees Cook wrote: > > > > On Wed, Apr 10, 2019 at 12:24 PM Matteo Croce wrote: > > > > > > On Wed, Apr 10, 2019 at 8:46 PM Kees Cook wrote: > > > > > > > > On Mon, Apr 8, 2019 at 3:09 PM Matteo Croce wrote: > > > > > > > > > > Use the shared variables for range check, instead of declaring a local one > > > > > in every source file. > > > > > > > > I was expecting this to be a tree-wide change for all the cases found > > > > by patch 1's "git grep". > > > > > > > > > > Hi Kees, > > > > > > I have already the whole patch ready, but I was frightened by the > > > output of get_maintainer.pl, so I decided to split the patch into > > > small pieces and send the first one. > > > > Heh, sounds fine. Normally the big tree-wide changes go via Linus just > > before cutting rc1 (or rc2). This is "only" 31 source files, though, > > so maybe akpm wants to take these instead? Andrew, how do you feel > > about that? > > > > FYI, this are the stats from my local repo, just to let you the size > of a series with all the changes in it: > > $ git --no-pager log --stat --oneline linus/master > 2 files changed, 4 insertions(+), 9 deletions(-) > 2 files changed, 7 insertions(+), 14 deletions(-) > 6 files changed, 15 insertions(+), 30 deletions(-) > 1 file changed, 16 insertions(+), 19 deletions(-) > 1 file changed, 3 insertions(+), 5 deletions(-) > 3 files changed, 15 insertions(+), 20 deletions(-) > 12 files changed, 93 insertions(+), 116 deletions(-) > 3 files changed, 98 insertions(+), 104 deletions(-) > 2 files changed, 9 insertions(+) Tiny! :) Seriously, though, I think this should be fine to take directly to Linus after patch 1 lands, or see if akpm wants to carry it directly. -- Kees Cook