From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C8961FBEAB; Mon, 13 Jan 2025 18:35:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736793324; cv=none; b=d+u/uckHBFRZayq5+tL2xS2Va74jg0TLtHVOXBV7krXjEszCG6yEtIJfhLHyDR8sweLBgkM4YTNzK3FzL6Ua40yFUJC2WEXId/kueksXpDjDw4w85aqmFlzwvqE5i2u0bFHC0e6sv1A6CeKtmeeVlbNiSowByBifXbFNvtwc9UY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736793324; c=relaxed/simple; bh=VjE3G0TqKaM4vPHhhvCg5TjYTjlJr9vUxzyyIOUBKc4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=e8Kmeym02SznseFyXgCXMhPS6HDO3jNwJKWv1+tVROOErBN9vhTIrGmNjOm/fzixkBijIyDLoltBaGx3qSKs8f6Bq9OGItL2g00ZJN10MUhHfooX3IYLWLqCZYFIL6hcIyfEOa/cd6ebi/E6vql7pwXZtyq7zQMJdwdtBDtRKeM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oyngInFW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oyngInFW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6898EC4CED6; Mon, 13 Jan 2025 18:35:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736793323; bh=VjE3G0TqKaM4vPHhhvCg5TjYTjlJr9vUxzyyIOUBKc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oyngInFW5MfO3CBGedvwOLOJ++/hRG3sDKK12s1US1PAbHbjcqqfnqCXTxoIwW7Y3 x2Wz13XYbSxRMbBzqkMSkiz+4xesUM4rEfVw6ra3lOhQPXN7RWwZvok1/x5I+1axw5 A24aAGU/93TjI1JnAY2N3z1JQfj+w5kReAWcIhwTDUrVuWw1YD/jk1D2loWGUXw7fG JTPc1EAjDuKI1yHtZEcRwamNdafISmejiYCJB6vfxZrp9aXsbymyqU4BK1IiWnsMEl ex09GxfnRbQB5k6BWqo/2WDxsre/2DSN4Z55qx9ZPmusaYGs7aLcrILfSGLnesIgGK vNvC0Mid6ml5g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: David Howells , Masahiro Yamada , Marc Dionne , linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, Christian Brauner , Sasha Levin , maennich@google.com, ojeda@kernel.org Subject: [PATCH AUTOSEL 6.6 04/10] kheaders: Ignore silly-rename files Date: Mon, 13 Jan 2025 13:35:05 -0500 Message-Id: <20250113183511.1783990-4-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250113183511.1783990-1-sashal@kernel.org> References: <20250113183511.1783990-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.71 Content-Transfer-Encoding: 8bit From: David Howells [ Upstream commit 973b710b8821c3401ad7a25360c89e94b26884ac ] Tell tar to ignore silly-rename files (".__afs*" and ".nfs*") when building the header archive. These occur when a file that is open is unlinked locally, but hasn't yet been closed. Such files are visible to the user via the getdents() syscall and so programs may want to do things with them. During the kernel build, such files may be made during the processing of header files and the cleanup may get deferred by fput() which may result in tar seeing these files when it reads the directory, but they may have disappeared by the time it tries to open them, causing tar to fail with an error. Further, we don't want to include them in the tarball if they still exist. With CONFIG_HEADERS_INSTALL=y, something like the following may be seen: find: './kernel/.tmp_cpio_dir/include/dt-bindings/reset/.__afs2080': No such file or directory tar: ./include/linux/greybus/.__afs3C95: File removed before we read it The find warning doesn't seem to cause a problem. Fix this by telling tar when called from in gen_kheaders.sh to exclude such files. This only affects afs and nfs; cifs uses the Windows Hidden attribute to prevent the file from being seen. Signed-off-by: David Howells Link: https://lore.kernel.org/r/20241213135013.2964079-2-dhowells@redhat.com cc: Masahiro Yamada cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-kernel@vger.kernel.org Signed-off-by: Christian Brauner Signed-off-by: Sasha Levin --- kernel/gen_kheaders.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh index 383fd43ac612..7e1340da5aca 100755 --- a/kernel/gen_kheaders.sh +++ b/kernel/gen_kheaders.sh @@ -89,6 +89,7 @@ find $cpio_dir -type f -print0 | # Create archive and try to normalize metadata for reproducibility. tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \ + --exclude=".__afs*" --exclude=".nfs*" \ --owner=0 --group=0 --sort=name --numeric-owner --mode=u=rw,go=r,a+X \ -I $XZ -cf $tarfile -C $cpio_dir/ . > /dev/null -- 2.39.5