Created attachment 15284 [details] seekdir test for armv7 hi there! my stable branch Gentoo Linux comes with a 32-bit specific patch to glibc 2.37, found here [1] - I guess the offending patch is the one that modifies sysdeps/unix/sysv/linux/seekdir.c to add the _DIRENT_OFFSET_TRANSLATION ifdef block. I have attached a sample test which I run on my armv7. the output reads: ./main pre: . .. clockevents platform w1 serio iio gpio event_source mdio_bus soc cpu mmc scsi mmc_rpmb spi clocksource hid dp-aux usb serial serial-base cec sdio genpd nvmem gadget workqueue virtio container i2c mipi-dsi s0 location: 4294967295 s0 entries: rew location: 1 rew entries: . .. clockevents platform w1 serio iio gpio event_source mdio_bus soc cpu mmc scsi mmc_rpmb spi clocksource hid dp-aux usb serial serial-base cec sdio genpd nvmem gadget workqueue virtio container i2c mipi-dsi as you can see, seekdir(dp, 0) leaves the location at an invalid -1 value while rewinddir(dp) works correctly. I guess that patch is already part of the glibc repo, so can you reproduce the problem on an armv7? running the test program on an amd64 Gentoo that contains the same patches returns a perfect output. thanks, peter [1] https://gitweb.gentoo.org/proj/toolchain/glibc-patches.git/tree/9999/0005-linux-Set-internal-DIR-filepos-as-off64_t-BZ-23960-B.patch
Created attachment 15286 [details] output of emerge --info for a bit of context, the bug started here https://lkml.org/lkml/2024/1/4/281 and for the Gentoo toolchain devs I will attach the emerge --info and the glibc USE flags [ebuild R ] sys-libs/glibc-2.37-r7:2.2::gentoo USE="caps gd multiarch ssp static-libs -audit -cet -compile-locales -crypt -custom-cflags -doc -hash-sysv-compat -headers-only -multilib -multilib-bootstrap -nscd -perl -profile (-selinux) -stack-realign -suid -systemd -systemtap -test -vanilla" 18308 KiB
These are non-standard patches that we carry in Gentoo, so it's not really glibc's fault. That said, it probably makes sense to track it here since the patches are a workaround to a longstanding glibc problem.