From owner-freebsd-emulation@FreeBSD.ORG Thu Feb 19 20:56:46 2009 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2616E106567D for ; Thu, 19 Feb 2009 20:56:46 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id B7B8B8FC14 for ; Thu, 19 Feb 2009 20:56:45 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 1B5D41D2E1; Thu, 19 Feb 2009 21:56:45 +0100 (CET) Date: Thu, 19 Feb 2009 21:56:45 +0100 From: Ed Schouten To: freebsd-emulation@FreeBSD.org Message-ID: <20090219205645.GF19161@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hUH5gZbnpyIv7Mn4" Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Cc: Subject: Making Linux stat() less evil X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2009 20:56:46 -0000 --hUH5gZbnpyIv7Mn4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi folks, I may have mentioned this earlier, but our Linuxolator's stat() implementation calls kern_openat(), followed by an translate_fd_major_minor() to perform a device major/minor number lookup. This is very evil, because it causes random chardevs to be opened when you run ls -l /dev. I propose the following patch: http://80386.nl/pub/linux-stat.diff I've copied kern_stat() into the Linuxolator. Not the ideal solution, but it's better than what we have right now. Comments? --=20 Ed Schouten WWW: http://80386.nl/ --hUH5gZbnpyIv7Mn4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmdx40ACgkQ52SDGA2eCwVQvgCbBy8Pw8YVnWVteigBGCyAENFf 3RYAn0KrPbaaiYQOfqKrgQNkR5jdD07u =IttA -----END PGP SIGNATURE----- --hUH5gZbnpyIv7Mn4--