From owner-freebsd-emulation Wed Apr 25 9:41: 2 2001 Delivered-To: freebsd-emulation@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 9A06337B42C; Wed, 25 Apr 2001 09:40:55 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.11.3/8.11.3) with SMTP id f3PGfOf37441; Wed, 25 Apr 2001 12:41:24 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Wed, 25 Apr 2001 12:41:24 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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