From owner-freebsd-current Fri May 7 14:22: 9 1999 Delivered-To: freebsd-current@freebsd.org Received: from freja.webgiro.com (freja.webgiro.com [212.209.29.10]) by hub.freebsd.org (Postfix) with ESMTP id BD0F414D8D for ; Fri, 7 May 1999 14:21:58 -0700 (PDT) (envelope-from abial@webgiro.com) Received: by freja.webgiro.com (Postfix, from userid 1001) id 4A55718D0; Fri, 7 May 1999 23:21:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by freja.webgiro.com (Postfix) with ESMTP id 4724B49D3; Fri, 7 May 1999 23:21:56 +0200 (CEST) Date: Fri, 7 May 1999 23:21:52 +0200 (CEST) From: Andrzej Bialecki To: Peter Wemm Cc: "Jordan K. Hubbard" , current@FreeBSD.ORG Subject: Re: somebody has broken sysctlbyname() in -current In-Reply-To: <19990507171102.DFF581F72@spinner.netplex.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 8 May 1999, Peter Wemm wrote: > "Jordan K. Hubbard" wrote: > > > sysctlbyname("machdep.uc_devlist", buf, &len, NULL, NULL); > > > > Sorry for the vague first bug report; I hadn't collected a reasonable > > crashdump yet. It's in sysctl_machdep_uc_devlist(), specifically > > where it copies id->id_driver->name into a temporary stack variable. > > First time through, this thing's NULL and *boom* we're gone. I'm > > looking into it. > > Should be fixed as of a few minutes ago in userconfig.c: > ---------------------------- > revision 1.140 > date: 1999/05/07 16:54:50; author: peter; state: Exp; lines: +34 -2 > Yet another kludge to maintain the isa_device illusion, this time malloc > an isa_driver and name pointer so the uc_devlist sysctl can get to it. > ---------------------------- Neither you nor I seem to be happy with the fix. When I added this sysctl, I only wanted to somehow get to the list of changes from UserConfig without poking around through kmem. Now, when the changes in the way devices are registered are introduced, we can think of something else which could be better suited. For now the only programs that need it are kget and sysinstall. (i.e. it's still easy to change, if we know what we want.. :-) Andrzej Bialecki // WebGiro AB, Sweden (http://www.webgiro.com) // ------------------------------------------------------------------- // ------ FreeBSD: The Power to Serve. http://www.freebsd.org -------- // --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message