From patchwork Wed Nov 6 12:35:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13864627 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4677CD44D58 for ; Wed, 6 Nov 2024 12:36:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A15FF6B00A9; Wed, 6 Nov 2024 07:36:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C4CB6B00AB; Wed, 6 Nov 2024 07:36:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 865FF6B00AC; Wed, 6 Nov 2024 07:36:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 659B56B00A9 for ; Wed, 6 Nov 2024 07:36:31 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 21088161ACA for ; Wed, 6 Nov 2024 12:36:31 +0000 (UTC) X-FDA: 82755617490.21.10E2D76 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf16.hostedemail.com (Postfix) with ESMTP id 3F6E9180010 for ; Wed, 6 Nov 2024 12:35:54 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Ql962YzM; spf=pass (imf16.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730896365; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zFfHFGyfFLnfH39ds9xcldOHx5zC/fcdWITNBPuGcyY=; b=nCNhV7Wf7DHLKKBfgra98w7f0E2kY/JnQphm3mwo8CqAbZwrZkM8bet8iung/XvHMrmCIn lllH/TxHMjv4kRVeWpliBDcr/x+Zej05xf8lDt0Bc1sRgj9gJIWx1IuIDy263ynZzQgmOm v235JR6Teh2l3Zg4G0ZLlO0EPdL/4sY= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Ql962YzM; spf=pass (imf16.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730896365; a=rsa-sha256; cv=none; b=rPnBIaWllupEtEc3koSMPF1UXNTR/zx+lCciuVQw3lu1/NvDNplHlz1K1lB4W4vyHu03MX D4xIGc7aQnEYRg/t0RXHqi8CdBLvzcAfXVXqXC+GRU0wn1GTALqS/NcxgHSNa8Fj0mWWgD 6fOMu9LRt8CMhiYb0OVA8UMmedsueD8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730896588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zFfHFGyfFLnfH39ds9xcldOHx5zC/fcdWITNBPuGcyY=; b=Ql962YzMipGnoBTjN+4Z3+Tz1pb7934xEZJcjV1GDyKpSPNZdR3LiNJtbvWdZMHCDnVHGd 2qTyGqrNMsNkq+j1qj5TxxlAM1ApoTqw+SVO/lHnw327hOKFIZ5d3txNey5M+TsgY7e3uc CPVm10G9KVDvdrwM8IXev43rR1wRzmY= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-641-DlDFzTqENQa4a16Ac1LvYQ-1; Wed, 06 Nov 2024 07:36:25 -0500 X-MC-Unique: DlDFzTqENQa4a16Ac1LvYQ-1 X-Mimecast-MFC-AGG-ID: DlDFzTqENQa4a16Ac1LvYQ Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 011F91956064; Wed, 6 Nov 2024 12:36:21 +0000 (UTC) Received: from warthog.procyon.org.uk.com (unknown [10.42.28.231]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BCCF619560AA; Wed, 6 Nov 2024 12:36:13 +0000 (UTC) From: David Howells To: Christian Brauner , Steve French , Matthew Wilcox Cc: David Howells , Jeff Layton , Gao Xiang , Dominique Martinet , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Eric Van Hensbergen , Ilya Dryomov , netfs@lists.linux.dev, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH v3 01/33] kheaders: Ignore silly-rename files Date: Wed, 6 Nov 2024 12:35:25 +0000 Message-ID: <20241106123559.724888-2-dhowells@redhat.com> In-Reply-To: <20241106123559.724888-1-dhowells@redhat.com> References: <20241106123559.724888-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3F6E9180010 X-Stat-Signature: 9crjy3x6abxbw3si5kj1gkqw6cki4746 X-Rspam-User: X-HE-Tag: 1730896554-362514 X-HE-Meta: U2FsdGVkX1+WGEpLu2tLGMXeVd1ILOHn9R6hyBsI6hkkKDy5OJ6+fHKvzXMz2WZ9SgPyUQGGtFpD1TYGyzVlxuqjzGBEGbkGuItnToVSiJfQApBIoH6eFgtkqKcupEWg0lOG6oxItGro8d5ucr5K6M9tKmvwTEIY6oaf3TW7LGc+QKzvZFmh8JDSDkWyIL/S+hCJ8i4ozZSGSK3eqbYoBocAHFsPnuv3vQQQeLjjGotOkTKofJBF0Gd5O8JYuAH6uzECdMlR//B/nLpajP/vIaWHFSMEGCBfnMg6O3gG3nFfAyQsHsRRQa94836euAsHBnuWMGq1q/rhqyn32X8Jxv8TqdFdiY3UKHI42LL/SjPl+IshmOgc28BKfkXjbdEr+G/RZp6SzC1pV+JQI0lw5GQR2GQiYakoOGuZJKkoohSSZTBHJ/lv1ltyiN+xZoX5PyP6NibMnc+eO8oSZXym8I0GVq7/pbF8bKNvFowk7Wz5JOmbzoU9j3I7vY9Ffrq9PNInOiNDfdb5FOVdWFz8a57Fg9QLRHRjssSDZQ5lz4MB7nQgNR55Zt4AlxeT3/Qbyg5Xl9rS6LAC+TjOVAbU3QqWj9mLWdgCgxOY1Fd/sSbTQ0QW0sAghCH+dyI/YW4TT6wU81kneFElmFK4fmmNKSu//YPObtAT0C9uitfB9EQjaRxe4ftkCgeSKi3SIl+2QoxEmbukLP2mZSzI8BMwPx5zEj5V2PhBMLVWl0DXldyaejVMMCGlX99GmRn8vb4O5/DtAuat1+7CVoDIfoDUt260uig+wnPtjFd3PmiBh9PUQIYaXqWY2V7SraOJ3vc7aw4PmDeOUJVFhDzZ2bnc6M7tLXvaPZetq4ThJsc/uS/do9GWkm37lVJHMT4uE9ENAIwR3pV5A2zXuUUjV14tVL1Jx2bYN1N6zIYCL5RWEvy/E0IYiGgEMfatezwCqDZgJ4bfcXfvApK5dvkNxzo pxs65Sn/ lecoQMB/Facr8BWlYlLG6XfFJCpx9qwLkKWsFSb6NbkLAbUKkjMfFptxnyHFa+OolC9Iij8RmBkrlE4V9WMwBbBgCFNorVdCgQ3oG8iWDN3ao0aCoZ3Bg9seGJuERVEtne02yJ7fI42nzsIVGwWXS4YvBGQm2rt/gpDxzuZKNBw6Bw+PsCqiMWzqs9kzYd7VTrpuNS7MDiieFq17XZVq4EFEmVDCLSs6+BdOsXMLggX40SKOjuCbYQdTp8tFkIYZBQHna6QilAS87yqBAX0hDmZenKW0hdQqmP/UKkWIzJpRByv7+dn3Wz2Yd8jED36Glxg3pXwTLSNXkfjaaWuvEGqI7E6UCe10THNLp/UjwZ40x8aYv18xEd5Ya3Lala7RVknceeddTuDyv5ukteTIOzkmAZOkuQAZiQ0Pg7AxSoL8mLIiCegW9awGZPYW+pCrAFHseKdNqd09Lf8CvhW4bbVyW+Q== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 cc: Masahiro Yamada cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-kernel@vger.kernel.org --- 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