Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 May 1999 05:39:58 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Andrzej Bialecki <abial@webgiro.com>
Cc:        "Jordan K. Hubbard" <jkh@zippy.cdrom.com>, current@FreeBSD.ORG
Subject:   Re: somebody has broken sysctlbyname() in -current 
Message-ID:  <19990507213959.BFB0E1F72@spinner.netplex.com.au>
In-Reply-To: Your message of "Fri, 07 May 1999 23:21:52 %2B0200." <Pine.BSF.4.05.9905072316330.3700-100000@freja.webgiro.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Andrzej Bialecki wrote:
> 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

Well, `the' fix will be to have a mechanism for passing hints from the
loader and letting userconfig update them in the hints database.  The hints
database isn't up to it yet, it's only just barely dynamic and could
probably do with more automatic integration with the bus engine.  I'm not
too keen to jump in too soon and update userconfig to use an interface
(resource_*) that is almost certain to change.

As an interim though, it might be better to create a struct that holds the
key information that used to be isa_device and use that for the import/
export mechanism for userconfig until we have a clearer idea what
userconfig should look like in the end.

It's interesting that the ANSI emulation in loader(8) is good enough to do
full-screen displays.  It still seems to make sense to move userconfig-like
functionality into the pre-kernel stages including moving config(8)'s hints
to a loaded and parsed file.  Forth, bah.. :-]

Cheers,
-Peter



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990507213959.BFB0E1F72>