lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAQndCMudAtVRAbfSfnV+XhSMDcnP-s1_GAQh8UiEdLBSg@mail.gmail.com>
Date: Sat, 21 Dec 2024 14:15:00 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: David Howells <dhowells@...hat.com>
Cc: Christian Brauner <christian@...uner.io>, Max Kellermann <max.kellermann@...os.com>, 
	Ilya Dryomov <idryomov@...il.com>, Xiubo Li <xiubli@...hat.com>, 
	Trond Myklebust <trondmy@...nel.org>, Jeff Layton <jlayton@...nel.org>, 
	Matthew Wilcox <willy@...radead.org>, netfs@...ts.linux.dev, linux-afs@...ts.infradead.org, 
	linux-cifs@...r.kernel.org, linux-nfs@...r.kernel.org, 
	ceph-devel@...r.kernel.org, v9fs@...ts.linux.dev, 
	linux-erofs@...ts.ozlabs.org, linux-fsdevel@...r.kernel.org, 
	linux-mm@...ck.org, linux-kernel@...r.kernel.org, 
	Marc Dionne <marc.dionne@...istor.com>
Subject: Re: [PATCH 01/10] kheaders: Ignore silly-rename files

On Fri, Dec 13, 2024 at 10:50 PM David Howells <dhowells@...hat.com> wrote:
>
> 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:

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': 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.

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 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 <dhowells@...hat.com>
> cc: Masahiro Yamada <masahiroy@...nel.org>
> cc: Marc Dionne <marc.dionne@...istor.com>
> cc: linux-afs@...ts.infradead.org
> cc: linux-nfs@...r.kernel.org
> cc: linux-kernel@...r.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
>
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ