From owner-freebsd-current@FreeBSD.ORG Fri Jan 28 14:31:46 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A12916A4CE for ; Fri, 28 Jan 2005 14:31:46 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id A511143D1D for ; Fri, 28 Jan 2005 14:31:45 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 345CCACAF1; Fri, 28 Jan 2005 15:31:33 +0100 (CET) Date: Fri, 28 Jan 2005 15:31:33 +0100 From: Pawel Jakub Dawidek To: Poul-Henning Kamp Message-ID: <20050128143133.GA795@darkness.comp.waw.pl> References: <200501280254.j0S2sMJH050277@blue.mwk.domain> <38517.1106917155@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CKsGbYqZLAW+svb0" Content-Disposition: inline In-Reply-To: <38517.1106917155@critter.freebsd.dk> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-current@freebsd.org cc: alc@cs.rice.edu cc: "Mark W. Krentel" cc: Kris Kennaway Subject: Re: fstat triggered INVARIANTS panic in memrw() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2005 14:31:46 -0000 --CKsGbYqZLAW+svb0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 28, 2005 at 01:59:15PM +0100, Poul-Henning Kamp wrote: +> In message <200501280254.j0S2sMJH050277@blue.mwk.domain>, "Mark W. Krent= el" writes: +> >I've looked a little deeper into Kris's fstat panic. +> >Turns out there are bugs in three places. +> > +> >(1) fstat(1) sometimes calls kvm_read() with a ridiculously out-of- +> >bounds value for nbytes. +>=20 +> The only real problem here is that fstat(1) uses kvm in the first place. +> The necessary information should be exported via sysctls. +>=20 +> No program used as part of regular system operation should use kvm. I've work mostly done in pjd_fuser branch. I modified existing (but not used by anything right now) sysctl kern.file to be able to export everything what things like fstat(1) needs. The main reason for doing this was to create posix-compilant fuser(1) utility (which exist in Solaris and Linux). --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --CKsGbYqZLAW+svb0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFB+kzFForvXbEpPzQRAl5FAKCUMAt7vGsY9bycJBKs/JPe9Q8OMACgtNHN +OA5fZlZ3nq+S6/d/Cxv/RA= =Ukow -----END PGP SIGNATURE----- --CKsGbYqZLAW+svb0--