Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 May 95 14:34:16 MDT
From:      terry@cs.weber.edu (Terry Lambert)
To:        charnier@lirmm.fr (Philippe Charnier)
Cc:        adhir@iagi.net, hackers@FreeBSD.org
Subject:   Re: sysctl(3) in kernel modules.
Message-ID:  <9505232034.AA26319@cs.weber.edu>
In-Reply-To: <199505230716.JAA02226@lirmm.lirmm.fr> from "Philippe Charnier" at May 23, 95 09:16:01 am

next in thread | previous in thread | raw e-mail | index | archive | help
> The modload program should receive the string as an option, and write
> it to the module by filling an area in the data segment of the kernel
> module. 
> 
> By the way, I really don't know how to do such a thing.

Neither do I, and I wrote the original modload code.

Seriously, that's not the way to do it.

Either the server code needs to access the information from within the
kernel itself, or it needs to export an interface (or usurp an existing
interface) to blow the data across the user/kernel boundry after the
load has completed.

Typically, the load process does not involve the link, and only understands
a.out format sufficiently to get the single entrypoint (usually the init
routine) and tell the kernel about it for internal list maintenance, or for
manual maintenance (in the case of generic modules).

My personal opinion is that there should be a kernel interface to the sysctl
registry both for accessing contents from kernel modules and for registering
management objects for control by sysctl.

If done, the result would be that the module could either access the data
itself or export a management point so that a user program could inform it
via sysctl.


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



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