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 E12C61F76AF; Tue, 21 Jan 2025 18:10:54 +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=1737483055; cv=none; b=XhXrMe7ybO6DyT2Hbc1cZKg5b3IoG55+Bb3Fl2K7lEiY1+NQjiDF2CEXFUwsmv33uXu2yavNzTG0lG5vdknoPpB7UcnMvl0UZpdtWgE1J9bY8J5kdchIAEwRNHSMp4uwKask6GQU52otPBh/4K9qPrNnNo5c5Os56OO1ihyTpvM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737483055; c=relaxed/simple; bh=xUh2gWXq0ltaclsN6nhJz8KkqrmgRIWZ5Fv50D3N4xw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JmLSfEs0J+/XxBTohUf5UPJ3YzqiEd/vjobQGbmp3+ZwG9N22mP/xw7KpzEZ5vshMVBC+XQdFdx2eXDUIkMg4mo+XjusRyIrzFNZhnBs0cCRgunDo4FrQbSSNQqol/ZsrdnIQdg6A8ZnfwrXUQJaPM43g8SYS850LO7gNOztYXs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SKzkA7r4; 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="SKzkA7r4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63AE2C4CEDF; Tue, 21 Jan 2025 18:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737483054; bh=xUh2gWXq0ltaclsN6nhJz8KkqrmgRIWZ5Fv50D3N4xw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SKzkA7r4u1bsmE0KNq1UJSARFWNGX0kxEL4SNdLhg6kdTd77aGVOhW9lNXgPAnVF5 6Pf//hoJcJnfGZKm3h9tRAkXUrMi8LKD/JTN0nU9TZp2WHG4fuwAp2kSmSpEBwFQ73 MUVFXD68Xde2nyOrsDv0/ejh0xSiTN560A06xNd8= 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 5.15 099/127] kheaders: Ignore silly-rename files Date: Tue, 21 Jan 2025 18:52:51 +0100 Message-ID: <20250121174533.472187950@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250121174529.674452028@linuxfoundation.org> References: <20250121174529.674452028@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-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=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 c618e37ccea98..1b2b61ca80659 100755 --- a/kernel/gen_kheaders.sh +++ b/kernel/gen_kheaders.sh @@ -82,6 +82,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