From owner-freebsd-current@FreeBSD.ORG Fri Jan 28 19:20:50 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 610F216A4CE; Fri, 28 Jan 2005 19:20:50 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id A80E043D31; Fri, 28 Jan 2005 19:20:49 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id j0SJKifI044810; Fri, 28 Jan 2005 20:20:44 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: "Mark W. Krentel" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 28 Jan 2005 14:14:29 EST." <200501281914.j0SJETJH052081@blue.mwk.domain> Date: Fri, 28 Jan 2005 20:20:44 +0100 Message-ID: <44809.1106940044@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: freebsd-current@freebsd.org cc: Pawel Jakub Dawidek 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 19:20:50 -0000 In message <200501281914.j0SJETJH052081@blue.mwk.domain>, "Mark W. Krentel" writes: >>>>>> "PHK" == Poul-Henning Kamp writes: > >PHK> The only real problem here is that fstat(1) uses kvm in the first place. >PHK> The necessary information should be exported via sysctls. > >PHK> No program used as part of regular system operation should use kvm. > >Ok. That still leaves btsockstat, netstat and trpt (and fstat) as >setgid kmem programs. Are there plans to rewrite them? > >Until then, I think it's not a bad idea to put a bandaid on fstat(1), >even if it's temporary. > >Also, there's still the bug that kvm_read(3), and kmem(4) don't check >their arguments for values that lead to address wrap. I didn't mean to imply that these bugs should not be fixed, I just wanted to repeat the higher goal so we didn't loose sight of it. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.