From mboxrd@z Thu Jan 1 00:00:00 1970 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 10793E77184 for ; Sat, 21 Dec 2024 05:15:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 246ED6B007B; Sat, 21 Dec 2024 00:15:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F6C26B0082; Sat, 21 Dec 2024 00:15:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0E66C6B0083; Sat, 21 Dec 2024 00:15:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id E73296B007B for ; Sat, 21 Dec 2024 00:15:42 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 51336C0F78 for ; Sat, 21 Dec 2024 05:15:42 +0000 (UTC) X-FDA: 82917802632.10.DFC8106 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf20.hostedemail.com (Postfix) with ESMTP id C0EE61C0011 for ; Sat, 21 Dec 2024 05:15:03 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NBXpg8Ka; spf=pass (imf20.hostedemail.com: domain of masahiroy@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=masahiroy@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734758123; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=do2i6AFCwMKlo5qBewvhm0xBYVvlDal45T7eDtE7twg=; b=TLslUfHlfYsHvec2IZcFJ+L6Qeg9aOrxqt+xhxAgHgkwApDFOeniTU6glM0Wpu5fzhgNhL +SZ15HO+NjhZ1EzH+v7315XP4yDtt1istexzPoCz9kkollAjOZw99UpdpCLVogYS4UgRl8 x4/PDDH+fFn/iRHKpsfNEyBwSym7AUE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734758123; a=rsa-sha256; cv=none; b=XoF1MVE8FOyA5r7lCb+0Oy3OwSvPoRpO0JLix3wBfchlqBzSTfBurm1cgnQ4Cl7GrvlkFo i4jLOCLK4LFPDdHyL5aGep5EqNMWBMT2NMAj8C0BBA8zc1+Y+Uv26L9bfaT4Z7TLSpYW3l D23rjxyqIYOTd3NADiG0Fq4IBCf4ui8= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NBXpg8Ka; spf=pass (imf20.hostedemail.com: domain of masahiroy@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=masahiroy@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 428F55C2976 for ; Sat, 21 Dec 2024 05:14:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BC3FC4CEDC for ; Sat, 21 Dec 2024 05:15:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734758138; bh=6D22z4Q6qM5owg8DKTRELAvvJsU6v0seLUtNWMGH3rc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NBXpg8KaWOmk5BPV9JRlUwyRpdhTsLRyF3o8nRURr2/sbFbiwU2VhLnOWtq7YJJec Ot/mrxQD51xumkqWjcecDxrOC+vTCvlpENvgKus+wds6XuYQMZ4OjFmYVLVzNmKCQx 8Yd4aIB+ofU4wRNrNx2mJNZo6Y8Ig66H3F2PCCchNTw5ieI+yPfxIk0SIIw6/HdH41 HX+8wPXoowb5iLRcX7svVCHB1ds6rNhJGAqS3gQxaOmqT1MnGb2nQvhuhzrDVJM+Yw huvvldEYppAd0O00Hj7vzofTkZWWE0+YpLYoWM8cW36gTa9GhYsreT3EctWsy/x6p3 x8mJPCbZig5Og== Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-3002c324e7eso26533311fa.3 for ; Fri, 20 Dec 2024 21:15:38 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWvdcPIzWhkBy6D2/afEsFisiLM9KxL+PFd4nSObVlcAyTvHI76FRZ5FfwE3EI0IKkLakLmeFZalg==@kvack.org X-Gm-Message-State: AOJu0YzVm17uwl55mHdRbovltIkn2k+aVoGKZDALF723kfp6W8YkIaz1 dKO0BkGoaUNuj8J4Dmkan2PsTiJrr+zgnRBcm4SM8WAU5TAaJjIAIKYKO95MHP1sK0SQ4BTp639 JJxuChpE5siQI0fYFgFmqWm5+MZ8= X-Google-Smtp-Source: AGHT+IFLGvnYDVZLLa6gb/IFLNG+NtJdTz+H8BQtiW/Pv7A9hdRHwl2vjaIxr7x6UhU9lyjaVH3MCdnPjifz3TMcGbU= X-Received: by 2002:ac2:5682:0:b0:542:2f5a:5f52 with SMTP id 2adb3069b0e04-5422f5a5f9dmr180818e87.13.1734758137206; Fri, 20 Dec 2024 21:15:37 -0800 (PST) MIME-Version: 1.0 References: <20241213135013.2964079-1-dhowells@redhat.com> <20241213135013.2964079-2-dhowells@redhat.com> In-Reply-To: <20241213135013.2964079-2-dhowells@redhat.com> From: Masahiro Yamada Date: Sat, 21 Dec 2024 14:15:00 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 01/10] kheaders: Ignore silly-rename files To: David Howells Cc: Christian Brauner , Max Kellermann , Ilya Dryomov , Xiubo Li , Trond Myklebust , Jeff Layton , Matthew Wilcox , 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, linux-kernel@vger.kernel.org, Marc Dionne Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: C0EE61C0011 X-Stat-Signature: tyqgny7yq1cjxbroaduhmcycsbchfmmj X-Rspam-User: X-HE-Tag: 1734758103-796044 X-HE-Meta: U2FsdGVkX1/yMawERz2ubwHInqmYqIqL+jYGLM7RRcCJNfXLzuDIWzqbbuM0wy8901Wk8kFS5/UfBNyNT0c0b6oriGnb8cUULWH+tYqyrbpfk2TDWLcD2qkN9XiB3M5JlrTdxNNSQ71mMnFggSJTPUuW8Q8bSopP3wqie568wkJBtmzCtAOKaOib8ZTgKDADs8lHh/3K5Q/7ocCPVoxI699y3pgv1bbgqf/1mtvSUeQqXEVC0X0K1wltQtgKyIYmC8xUKlVrgWwWyCNxe0RfHwlcxdLw9LoHZbz04mYbc3JcfV9M8/Mi1y7El1ih/QKTzXu+r9Bx+GeEe19pcV0GqBcngNyEZ7xdw8AXRR4hslRYOaCLKr8O/GwYxFED/yfGvCT7nGRyTM7KyInjZXbQP3nkoVVOVRB4vFOcNk1sw7d5mc1xcv77gbgVCu6s/ZOIDTWUrmp9HLKZHmK8QU5hBs1WQeHqzq8nR/eir3ODdukcfskeP2fJ+ekaF3sAgOmyOCDEcifJKkzmPuLasQQFjl/NP/mGRiyOWSIYLsvFyWwKryG6SoA7q5wGvbRQD8Tkn2DcWlDyLnXqxmRikg35H82Mr+HvHtHQqu+cZBdPaFMpdaLY/nmgg1a8p9N8Lv6R5H9i3/qY9zMIE0qUbEsaiEHCRMOW3tv06AJwhpr7JS67m0K28I0cCrB3riSGQONPrO61kuSBOSWQwVerwULb35YN/njrip2TEGzB1nRO+L25YxpoddHROHsKXDqVCQGTev2ZUeJ9TYhfTCDwkAsxWCCjPFWoW2PQal7iLw9d41eD24qL0nPUMJRPv1S2deQVKERvCe2htGO/LdkvZB3oLRVvji2ZgC+M2EORFCi43QJtIvVOyhUvtKJLc2h8SCXRvGOoYj+jNzH+Til0MggWjvZsQxsa5VeUgsaUMOz0ADwL4xDEqdpr9u4hcrxTjtF1WgN4uyz4EvB+SGqHyhe zxPOVbOb aRb2hW7U9BmJ3hVZKbYY6WpgGlByj3pxi/fDGfoyMuNjFWMvzmA1Farq7uPkDFR3Kb0dsfrA00wmar0IbQMtvm9KmwyS33f95V/mvYQUYzSnm79cBtz8BwlDh1jZbjHwbyJndn94hxH5s4Otvf29Zwa82bnr4+z6clLOn8IpL3I7dzwgGusGdBEwzcAlExlWxUX8+8jCnDFhlWpKU3XltOLUN2CghwdamkQIIqX1ssmtOhH3WbNGe7GlGr9yRrb0QgkF7njklsij97fALjn669tO5VB4FU7C43lt1H+fd1dv7pdOWFWY7P7m8LQPv+Lh+E08EZuomsTSUOaF3+0nhB6BwLM9a+iLXghmSyYP60Sgib+G4H5H5REHQgRxsH3+jSFmmB6aa3YzgIAq+P933P3giRhclLz+2owB1IQJoLB6Yo+6t6WxEWLQErM/EksfIuWfiJ+LVIN1UMWBviW37Ba+/erJNc10SzUU1 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: On Fri, Dec 13, 2024 at 10:50=E2=80=AFPM David Howells wrote: > > Tell tar to ignore silly-rename files (".__afs*" and ".nfs*") when buildi= ng > 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 the= m. > > 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 a= n > error. Further, we don't want to include them in the tarball if they sti= ll > exist. > > With CONFIG_HEADERS_INSTALL=3Dy, something like the following may be seen= : I am confused. kernel/gen_kheaders.sh is executed when CONFIG_IKHEADERS is enabled. How is CONFIG_HEADERS_INSTALL related? > find: './kernel/.tmp_cpio_dir/include/dt-bindings/reset/.__afs2080': N= o such file or directory > tar: ./include/linux/greybus/.__afs3C95: File removed before we read i= t > > The find warning doesn't seem to cause a problem. I picked the following commit. https://lore.kernel.org/all/20241218202021.17276-1-elsk@google.com/ This shoots the root cause of the 'find' errors. Does it fix your problems too? Your patch does not address the 'find' errors. > > Fix this by telling tar when called from in gen_kheaders.sh to exclude su= ch > 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=3D$KBUILD_BUILD_TIMESTAMP}" \ > + --exclude=3D".__afs*" --exclude=3D".nfs*" \ > --owner=3D0 --group=3D0 --sort=3Dname --numeric-owner --mode=3Du=3Dr= w,go=3Dr,a+X \ > -I $XZ -cf $tarfile -C $cpio_dir/ . > /dev/null > > --=20 Best Regards Masahiro Yamada