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: <CACw1X3iPMW1+cw8Pz_CG_9KM=Z9XycRPbzF0WDD1nxV1TDn2gQ@mail.gmail.com>
Date: Tue, 1 Oct 2024 21:15:04 +0200
From: Krzysztof Małysa <varqox@...il.com>
To: Linux regressions mailing list <regressions@...ts.linux.dev>
Cc: yangerkun <yangerkun@...wei.com>, Christian Brauner <brauner@...nel.org>, 
	linux-fsdevel@...r.kernel.org, Alexander Viro <viro@...iv.linux.org.uk>, 
	LKML <linux-kernel@...r.kernel.org>, Matthew Wilcox <willy@...radead.org>
Subject: Re: [regression] getdents() does not list entries created after
 opening the directory

wt., 1 paź 2024 o 14:49 Linux regression tracking (Thorsten Leemhuis)
<regressions@...mhuis.info> napisał(a):
>
> On 01.10.24 14:18, Matthew Wilcox wrote:
> > On Tue, Oct 01, 2024 at 01:29:09PM +0200, Linux regression tracking (Thorsten Leemhuis) wrote:
> >>>     DIR* dir = opendir("/tmp/dirent-problems-test-dir");
> >>>
> >>>     fd = creat("/tmp/dirent-problems-test-dir/after", 0644);
> >
> > "If a file is removed from or added to the directory after the most
> > recent call to opendir() or rewinddir(), whether a subsequent call to
> > readdir() returns an entry for that file is unspecified."
> >
> > https://pubs.opengroup.org/onlinepubs/007904975/functions/readdir.html
> >
> > That said, if there's an easy fix here, it'd be a nice improvement to
> > QoI to do it, but the test-case as written is incorrect.
>
> Many thx Willy!
>
> Which leads to a question:
>
> Krzysztof, how did you find the problem? Was there a practical use case
> (some software or workload) with this behavior that broke and made your
> write that test-case? Or is that a test-program older and part of your
> CI tests or something like that?
>
> Ciao, Thorsten

I have a unit test (
https://github.com/varqox/sim-project/blob/889bcee60af56fa28613aaf52d27f3dd2c32a079/subprojects/simlib/test/directory.cc
) in my project’s test suite where I create a temporary directory,
populate it with files and then list its contents using the handle
obtained during creation of the directory. And it started to list the
directory empty, since this patch was introduced.

While listing the temporary dir one is using is unlikely in this case,
we will see if any issue in other software will emerge after the 6.11
will be released as LTS kernel.

Thanks,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ