Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp958686imu; Fri, 9 Nov 2018 08:42:01 -0800 (PST) X-Google-Smtp-Source: AJdET5d9UNCSJ21x06Vo2yOtagD4+XX1MGTIO7RzApYPiF7ncfWjSKwP2jcqrohiuI72GErPxHbS X-Received: by 2002:a62:7597:: with SMTP id q145-v6mr9729344pfc.254.1541781721500; Fri, 09 Nov 2018 08:42:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541781721; cv=none; d=google.com; s=arc-20160816; b=n2PCbtkHPBgEbd6fttQcMI0xz20EdksryK87+DKJZ6Tup58+VNbDjUyil3izJdensD tVCm0p0IY2vsVveZzv/BcjWeaiJjLwkTP1eAfw0RYxlnK9pIZwoz7xWtF/oiQiWHQ55s 5d5b5pAOCMhTLnnWNG3DQ9zEinN+xDpCOVoI6kFK0uMUb3USleeVJ4lCjI0JhsWeksFi 5iVQAZQeeLF13GuiKg8fMffdl8yOuscxJgvmuD/AJFAIB/BYUnrfc+HjK6jWHPKHEUKr 4utRIAP1AqHpfkFvrmzNMptuiAvRCoxyWWnZD+/b1omimGBxwbznS7xaRupW+D7Rt5sM EbGg== 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:dkim-filter; bh=0L0stTu4gShMldfu3OlyVchIeicgty6G2dHDInffH7I=; b=n8Cnt3ISuzAyBiK5a5LTDFDj1LE0YSadp7dBn9IFMobSzeizTn4uo4ivvUfILivUlJ hCDS7Zhk4ZsPqT68FtUPnBtAXIwuLUihQpk92JGL+NDQW6QQOVii14hnTy/WJgqTH+Ti h9B8w6HgN+J/+Kf2+XqohWgowH3KO07I3W9MfMVJF86gFKc+/JwHKN7VFOvPpF1iidqT WtowB6UYnYlN51fJ4OYZ/l6i59vFPahCCvoMFsBl5T2nYR9mNcN/3zaq3Or1KuD2ucnU GGkD1Ii0JBbJjH/DT1iyYgAn99XaFU7/3Ihva/vCFn7XZdOOs2Hr3oDDy6C0dXPGdSTH 4gcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=09Dzu24n; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6si1455137pgv.277.2018.11.09.08.41.37; Fri, 09 Nov 2018 08:42:01 -0800 (PST) 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=@nifty.com header.s=dec2015msa header.b=09Dzu24n; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728578AbeKJCVz (ORCPT + 99 others); Fri, 9 Nov 2018 21:21:55 -0500 Received: from conssluserg-05.nifty.com ([210.131.2.90]:45943 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728172AbeKJCVz (ORCPT ); Fri, 9 Nov 2018 21:21:55 -0500 Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com [209.85.217.49]) (authenticated) by conssluserg-05.nifty.com with ESMTP id wA9GePuK028545 for ; Sat, 10 Nov 2018 01:40:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com wA9GePuK028545 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1541781625; bh=0L0stTu4gShMldfu3OlyVchIeicgty6G2dHDInffH7I=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=09Dzu24n32LgBpieU8MyRSJoPcJqbnN31/OUeidr4MvG8Irvay7qbwYM6WCsNA9EV WXMMoZRgIaNiUT+jk48Qo38xZOt98tyRcA8+8PLknj1nwh3r7+Jv/JcdE+s/43iYLh YACOk/eWe92tDZ5HNpM7qiYRY0Vq0wlIbLi12TmUiCbGWs+NNI0UG7YtZ3kk5MDRcX ERrYs+5QwSFCA0aDcM7IvL8XG0vL97a2+Uo21xr6r8ahZYt8lxXhCIJ/f8+7Q2Wuom zK+051kjvY2pn5xeF1adJK9FHzhtrkvyG+YzuvjaZidoAR+sReYv6EXMsL8/mGYlV1 8xNETGIIy244g== X-Nifty-SrcIP: [209.85.217.49] Received: by mail-vs1-f49.google.com with SMTP id g68so1367775vsd.11 for ; Fri, 09 Nov 2018 08:40:25 -0800 (PST) X-Gm-Message-State: AGRZ1gItLH7e+rdJXt9zz0+Y3RC8GyHKLtqajEWmPxIhwuhtgdJdRhwL h7M8UkqtSC6syTz1vE6hBIKCcZ/Af7YZHVWD8pc= X-Received: by 2002:a67:a858:: with SMTP id r85mr3991690vse.215.1541781624409; Fri, 09 Nov 2018 08:40:24 -0800 (PST) MIME-Version: 1.0 References: <1541527838-4585-1-git-send-email-linux@roeck-us.net> In-Reply-To: <1541527838-4585-1-git-send-email-linux@roeck-us.net> From: Masahiro Yamada Date: Sat, 10 Nov 2018 01:39:48 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Revert "scripts/setlocalversion: git: Make -dirty check more robust" To: Guenter Roeck Cc: Genki Sky , Linux Kernel Mailing List 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, Nov 7, 2018 at 3:39 AM Guenter Roeck wrote: > > This reverts commit 6147b1cf19651c7de297e69108b141fb30aa2349. > > The reverted patch results in attempted write access to the source > repository, even if that repository is mounted read-only. > > Output from "strace git status -uno --porcelain": > > getcwd("/tmp/linux-test", 129) = 16 > open("/tmp/linux-test/.git/index.lock", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = > -1 EROFS (Read-only file system) > > While git appears to be able to handle this situation, a monitored build > environment (such as the one used for Chrome OS kernel builds) may detect > it and bail out with an access violation error. On top of that, the attempted > write access suggests that git _will_ write to the file even if a build output > directory is specified. Users may have the reasonable expectation that the > source repository remains untouched in that situation. > > Fixes: 6147b1cf19651 ("scripts/setlocalversion: git: Make -dirty check more robust" > Cc: Genki Sky > Cc: Masahiro Yamada > Signed-off-by: Guenter Roeck > --- Applied to linux-kbuild/fixes. Thanks! > scripts/setlocalversion | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/setlocalversion b/scripts/setlocalversion > index 79f7dd57d571..71f39410691b 100755 > --- a/scripts/setlocalversion > +++ b/scripts/setlocalversion > @@ -74,7 +74,7 @@ scm_version() > fi > > # Check for uncommitted changes > - if git status -uno --porcelain | grep -qv '^.. scripts/package'; then > + if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then > printf '%s' -dirty > fi > > -- > 2.7.4 > -- Best Regards Masahiro Yamada