Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 1998 08:39:12 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        michaelh@cet.co.jp (Michael Hancock)
Cc:        tlambert@primenet.com, wollman@khavrinen.lcs.mit.edu, darrenr@reed.wattle.id.au, current@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/netinet ip_fw.c
Message-ID:  <199804240839.BAA23279@usr01.primenet.com>
In-Reply-To: <Pine.SV4.3.95.980424165431.27824D-100000@parkplace.cet.co.jp> from "Michael Hancock" at Apr 24, 98 05:00:02 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > That is, "ps" operates on system dumps as well as running systems.
> > 
> > A procedural interface rather than a data interface won't work on a
> > system dump (since there is no kernel to service the method invocation).
> > 
> > The best implementation I could come up with was to make an abstract
> > data interface using a procedural access, and then bind the procedural
> > access to the kernel image (-N system).
> > 
> > The way this would work is that the "ps" program would dlopen() the
> > "system" image to access the procedural routines that operated
> > against the kmem image (/dev/kmem or "core").
> 
> Umm.  Could it be done completely data driven without having to invoke
> routines out of the image?

Are you willing to make the data in the kernel conform to ASN.1?

It seems to be a hell of a burden for normal usage.  8-(.

I think binding it to the kernel image is sufficient.  You can't have
loaded a kernel without the image you loaded it from, and you can't be
interested in diagnosing a dump unless you are going to boot from that
kernel again (why fix an error that can't repeat?).

The problem with data-only interfaces is that they either have to
be sifficiently abstract that they imply processing overhead that is
unnecessary in the common case, or they inmply accessors that are
dependent on the instance of the data format, and break between
revisions (exactly the problem with "ps" now).

The accessor libraries are a general soloution, since they bind to
the kernel image, and if you don't have the image, then you can't
interpret the dump anyway, and the "ps" against the dump is a higher
granularity anyway.

You can't buy 75% of something without buying 50% at the same time,
so it's a non-problem if you bind to the image.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.

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?199804240839.BAA23279>