Skip to content

Commit 3bd27a8

Browse files
mettimasahir0y
authored andcommitted
kheaders: explicitly define file modes for archived headers
Build environments might be running with different umask settings resulting in indeterministic file modes for the files contained in kheaders.tar.xz. The file itself is served with 444, i.e. world readable. Archive the files explicitly with 744,a+X to improve reproducibility across build environments. --mode=0444 is not suitable as directories need to be executable. Also, 444 makes it hard to delete all the readonly files after extraction. Cc: stable@vger.kernel.org Signed-off-by: Matthias Maennich <maennich@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent e06a698 commit 3bd27a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/gen_kheaders.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ find $cpio_dir -type f -print0 |
8484

8585
# Create archive and try to normalize metadata for reproducibility.
8686
tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \
87-
--owner=0 --group=0 --sort=name --numeric-owner \
87+
--owner=0 --group=0 --sort=name --numeric-owner --mode=u=rw,go=r,a+X \
8888
-I $XZ -cf $tarfile -C $cpio_dir/ . > /dev/null
8989

9090
echo $headers_md5 > kernel/kheaders.md5

0 commit comments

Comments
 (0)