lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180524230334.12452-1-michael.w.mason@intel.com>
Date:   Thu, 24 May 2018 16:03:34 -0700
From:   Mike Mason <michael.w.mason@...el.com>
To:     marc.herbert@...el.com
Cc:     andy.work@...owry.com, git@...r.kernel.org, gitster@...ox.com,
        josh@...htriplett.org, linux-kbuild@...r.kernel.org,
        linux-kernel@...r.kernel.org, lists@...dbynature.de,
        michael.w.mason@...el.com, peff@...f.net,
        nico-linuxsetlocalversion@...ottelius.org
Subject: Re: Wrong -dirty suffix set by setlocalversion (was: BUG in git diff-index) 

How about something like this? It ignores attributes that should have no
bearing on whether the kernel is considered dirty. Copied trees with no other
changes would no longer be marked with -dirty. Plus it works on read-only
media since no index updating is required.

Would this also be considered kosher, at least for the purposes of
setlocalversion?

diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 71f39410691b..9da4c5e83285 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -73,8 +73,10 @@ scm_version()
 			printf -- '-svn%s' "`git svn find-rev $head`"
 		fi
 
-		# Check for uncommitted changes
-		if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then
+		# Check for uncommitted changes. Only check mtime and size.
+       # Ignore insequential ctime, uid, gid and inode differences.
+		if git -c "core.checkstat=minimal" diff-index --name-only HEAD | \
+				grep -qv "^scripts/package"; then
 			printf '%s' -dirty
 		fi
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ