From nobody Tue Dec 23 11:17:20 2025 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 8CD7B1F55FA; Tue, 21 Jan 2025 17:59:30 +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=1737482370; cv=none; b=gcljuwHDlrDlsNDmAEtX5axvnVpVtrkyDHU7zW9bpwxOLZkb2iZbk34okS6LSJN1Iy69rPEXViUBSXHuM6Ladx2caNAQ/TreKIP2nzjpa9kgFi1RXRqeN0taMzIPVKI+G3xfADPMEyecIeLnbmrFe6wCf1PJPcWtpdzLkvUurKs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737482370; c=relaxed/simple; bh=NeWPTQYT0qHEsZtlgGXDfysNKBT3N5hNvfadcDAzhNs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OOspgNvas3cxx/EKjPoPv8q1HhXX0FoqCjkrSZuSaJswymw1eBM6GQXzGaVwCC+Yov/uyBvQ6LLS5o1mFKtmo01pFPhkx73kRy5PuAKdK6qMhCx9qDRb5twblQ6fs8I5AsJrN+UA7BBDc8g76KUR3OFw7QQ7MV2TP5sVfddEVG8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=euRbX2+y; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="euRbX2+y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D340C4CEDF; Tue, 21 Jan 2025 17:59:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737482370; bh=NeWPTQYT0qHEsZtlgGXDfysNKBT3N5hNvfadcDAzhNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=euRbX2+yUC7/PmfKW3++SuvDgjvEgD2z3lzaVE240fLfOD7myPZgSMSdseTpRwJhY O4WK26zwAmonNlrwHSkGXacr3mextL9Y4374o7q8mtSuP+6PWQbdy8p8/O5mrY5pK6 G1BYzaH8ZLzIWt9Z40vbeqOGT9zR5A9NnRGPXgB4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, David Howells , Masahiro Yamada , Marc Dionne , linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Brauner , Sasha Levin Subject: [PATCH 6.12 053/122] kheaders: Ignore silly-rename files Date: Tue, 21 Jan 2025 18:51:41 +0100 Message-ID: <20250121174535.034891265@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250121174532.991109301@linuxfoundation.org> References: <20250121174532.991109301@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ 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=3Dy, 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 383fd43ac6122..7e1340da5acae 100755 --- a/kernel/gen_kheaders.sh +++ b/kernel/gen_kheaders.sh @@ -89,6 +89,7 @@ find $cpio_dir -type f -print0 | =20 # Create archive and try to normalize metadata for reproducibility. tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=3D$KBUILD_BUILD_TIMESTAMP}" \ + --exclude=3D".__afs*" --exclude=3D".nfs*" \ --owner=3D0 --group=3D0 --sort=3Dname --numeric-owner --mode=3Du=3Drw,= go=3Dr,a+X \ -I $XZ -cf $tarfile -C $cpio_dir/ . > /dev/null =20 --=20 2.39.5