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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 98F34C10F11 for ; Wed, 10 Apr 2019 22:34:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 56D3B20820 for ; Wed, 10 Apr 2019 22:34:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="lmjoIghn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726706AbfDJWea (ORCPT ); Wed, 10 Apr 2019 18:34:30 -0400 Received: from mail-vs1-f68.google.com ([209.85.217.68]:43025 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbfDJWea (ORCPT ); Wed, 10 Apr 2019 18:34:30 -0400 Received: by mail-vs1-f68.google.com with SMTP id i207so2333340vsd.10 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=MphMR3IUlmRMVMixH6ftllufVGhdITmw2r4o5G759/Wc5cN1AF+hCCMD4gS91Sls6f 5lUS43XpVRrDU/bw0MyDjj+d/CudQMN+lCWMzNh9X6ltV/1rRH8KD7us2g/wxhPV+MNB A2M7YAp6EKocUkPWPTNh5JT1I+VxLquIv35ykszMWuZlyyE7ZT+D/OIdZ3JuDDvU0KJq 3cszuRle7+kJkXG104wBhNp9ZvMzDFFmnTZj/c17SVqoPnxehM0vaTYzXVmZSonSYSNF NFi+U/ifFk6KYZyqjPleidSQ3G3oqQahKvWPmT1lu3LZurvlnx1kXJc0uRT4Nih6huiQ +7Ww== X-Gm-Message-State: APjAAAUSoAFf6t/gSvvIfEUJMBuPeujlrbNBznitqf6g/eFyplDegmL5 4uO73ZhPvv3463vXfaEsdiU6cllXEng= X-Google-Smtp-Source: APXvYqxLuiZNZieZ+ukS05XUFyM9Xn1ZzQ4fXBSrbN9k2PvxyOOrJa6xClgoam4ebPO/pbexMSTjwg== X-Received: by 2002:a05:6102:3d5:: with SMTP id n21mr26192414vsq.101.1554935669263; Wed, 10 Apr 2019 15:34:29 -0700 (PDT) Received: from mail-ua1-f44.google.com (mail-ua1-f44.google.com. [209.85.222.44]) by smtp.gmail.com with ESMTPSA id 110sm26209792uaq.7.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-f44.google.com with SMTP id h4so1355094uaj.9 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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