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-next>] [day] [month] [year] [list]
Message-ID: <8196cf54-5783-4905-af00-45a869537f7c@leemhuis.info>
Date: Tue, 1 Oct 2024 13:29:09 +0200
From: "Linux regression tracking (Thorsten Leemhuis)"
 <regressions@...mhuis.info>
To: yangerkun <yangerkun@...wei.com>
Cc: Christian Brauner <brauner@...nel.org>, linux-fsdevel@...r.kernel.org,
 Alexander Viro <viro@...iv.linux.org.uk>,
 Linux kernel regressions list <regressions@...ts.linux.dev>,
 LKML <linux-kernel@...r.kernel.org>, Krzysztof Małysa
 <varqox@...il.com>
Subject: [regression] getdents() does not list entries created after opening
 the directory

Hi, Thorsten here, the Linux kernel's regression tracker.

yangerkun, I noticed a report about a regression in bugzilla.kernel.org
that appears to be caused by the following change of yours:

64a7ce76fb901b ("libfs: fix infinite directory reads for offset dir")
[merged via: "Merge tag 'vfs-6.11-rc4.fixes' of
git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs"; v6.11-rc4]

As many (most?) kernel developers don't keep an eye on the bug tracker,
I decided to write this mail. To quote from
https://bugzilla.kernel.org/show_bug.cgi?id=219285:

> below program illustrates the problem. Expected output should include line "entry: after", actual output does not:
> ```
> entry: .
> entry: ..
> entry: before
> ```
> Program:
> 
> ```c
> #include <unistd.h>
> #include <dirent.h>
> #include <stdlib.h>
> #include <sys/stat.h>
> #include <stdio.h>
> #include <fcntl.h>
> 
> int main() {
> 	system("rm -rf /tmp/dirent-problems-test-dir");
> 	if (mkdir("/tmp/dirent-problems-test-dir", 0755)) {
> 		abort();
> 	}
> 
> 	int fd = creat("/tmp/dirent-problems-test-dir/before", 0644);
> 	if (fd < 0) {
> 		abort();
> 	}
> 	close(fd);
> 
> 	DIR* dir = opendir("/tmp/dirent-problems-test-dir");
> 
> 	fd = creat("/tmp/dirent-problems-test-dir/after", 0644);
> 	if (fd < 0) {
> 		abort();
> 	}
> 	close(fd);
> 
> 	struct dirent* entry;
> 	while ((entry = readdir(dir))) {
> 		printf("entry: %s\n", entry->d_name);
> 	}
> 
> 	closedir(dir);
> 	return 0;
> }
> ```
> 
> Affected kernel version: 6.10.10.
> Filesystem: ext4.
> Distribution: Arch Linux.

> On Linux 6.6.51 it works as expected.

> Regression first appeared in 6.10.7, 6.10.6 was good. I will further
> bisect tomorrow.

> 6.11 is still affected.

See the ticket for more details. Reporter ist CCed. I made no judgement
if the code provided is sane, I'm just assumed forwarding the issue was
a good idea.

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.

P.S.: let me use this mail to also add the report to the list of tracked
regressions to ensure it's doesn't fall through the cracks:

#regzbot introduced: 64a7ce76fb901bf9f9c36cf5d681328fc0fd4b5a
#regzbot title: libfs: getdents() does not list entries created after
opening the directory
#regzbot from: Krzysztof Małysa <varqox@...il.com>
#regzbot duplicate: https://bugzilla.kernel.org/show_bug.cgi?id=219285
#regzbot ignore-activity

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ