Date: Sat, 23 Sep 2000 16:02:49 -0400 (EDT) From: "Mark W. Krentel" <krentel@dreamscape.com> To: kuriyama@imgsrc.co.jp, marcel@cup.hp.com Cc: freebsd-emulation@FreeBSD.ORG Subject: Re: Strange phenomen accessing a CDROM contents under linuxerator Message-ID: <200009232002.QAA37726@dreamscape.com>
next in thread | raw e-mail | index | archive | help
> At this time I know that the linux_getdents syscall is broken; it's not > related to versions of Linux libraries. My first hunch is that there > maybe something wrong with the cookies; either the use of the cookies is > wrong, or the lack of cookies may be causing problems. I can confirm that something is wrong with listing a directory's contents on non-UFS partitions in the Linuxulator. I opened PR kern/19407 on this in June, but it appears there were actually two unrelated problems. Bruce Evans fixed one problem in ext2fs. The remaining problem is exactly this readdir/getdents issue. I can exhibit the bug with just a loop of readdir(3). This works on FFS, but on ext2fs and cdrom, readdir prematurely returns NULL. So, I tried calling getdents(2) directly, and that works. I tried various buffer sizes from 200 to 20,000 bytes, and they all worked. I even verified that it wasn't overrunning the buffer. So, Marcel, how confident are you that the bug is in linux_getdents? I can't find anything wrong in what getdents(2) returns. I don't know how filesystem cookies work. Is it possible that misuse of cookies could corrupt something behind the scenes but still have getdents return a correct buffer? Since getdents(2) works and readdir(3) doesn't, you'd suspect the readdir library. But I looked at the source and couldn't find anything. And /compat/linux/lib and Linux's /lib have identical libc-2.1.2.so (both based on RH 6.1), and the programs work inside Linux. So, I'm really perplexed about where to look. Any suggestions? --Mark To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009232002.QAA37726>