Date: Wed, 25 Apr 2001 12:41:24 -0400 (EDT) From: Robert Watson <rwatson@FreeBSD.org> To: emulation@FreeBSD.org Cc: marcel@FreeBSD.org, des@FreeBSD.org Subject: More general problem regarding linux_getdents() on synthetic file systems Message-ID: <Pine.NEB.3.96L.1010425123741.34527F-100000@fledge.watson.org>
next in thread | raw e-mail | index | archive | help
A bit more exploration with the linprocfs issue has lead me to wonder if we have a more general problem with the reading of synthetic file systems by Linux-emulated processes. I mounted a devfs as /dev of my jail'd Linux installation, and found that, as with linprocfs, entries are missing. However, unlike linprocfs, *all* entries are missing, including "." and "..": rwatson@curry:/$ /bin/ls -a /dev | wc -l 0 rwatson@curry:/$ /fbsdbin/ls -a /dev | wc -l 109 A ktrace/linux_kdump reveals getdents returning an error: 1757 ls CALL linux_newstat(0x8055e00,0xbfbff4b4) 1757 ls NAMI "/compat/linux/dev" 1757 ls NAMI "/dev" 1757 ls RET linux_newstat 0 1757 ls CALL linux_open(0x8055e00,0x10800,0xbfbff52c) 1757 ls NAMI "/compat/linux/dev" 1757 ls NAMI "/dev" 1757 ls RET linux_open 3 1757 ls CALL linux_newfstat(0x3,0xbfbff4b4) 1757 ls RET linux_newfstat 0 1757 ls CALL linux_fcntl(0x3,0x2,0x1) 1757 ls RET linux_fcntl 0 1757 ls CALL linux_getdents(0x3,0xbfbff44c,0xdf) 1757 ls RET linux_getdents -1 errno 95 Unknown error: 95 1757 ls CALL close(0x3) 1757 ls RET close 0 1757 ls CALL close(0x1) 1757 ls RET close 0 1757 ls CALL exit(0) In the procfs case, entries go missing somewhere between linprocfs and the Linux process, probably in the ABI wrapper; FreeBSD processes seem to be able to read linprocfs fine from within jail, suggesting it is the ABI wrapper that's causing the problem (either failing to adapt FreeBSD directory entries to something Linux processes like, or by dropping entries/failing). Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services 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?Pine.NEB.3.96L.1010425123741.34527F-100000>