fstat triggered INVARIANTS panic in memrw()

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Jan 28 06:31:46 PST 2005


On Fri, Jan 28, 2005 at 01:59:15PM +0100, Poul-Henning Kamp wrote:
+> In message <200501280254.j0S2sMJH050277 at blue.mwk.domain>, "Mark W. Krentel" 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.
+> 
+> The only real problem here is that fstat(1) uses kvm in the first place.
+> The necessary information should be exported via sysctls.
+> 
+> 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).

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20050128/47f6eaf2/attachment.bin


More information about the freebsd-current mailing list