Date: Mon, 21 Sep 1998 23:03:06 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: ncb05@uow.edu.au (Nicholas Charles Brawn) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: lkm query Message-ID: <199809212303.QAA20590@usr04.primenet.com> In-Reply-To: <Pine.SOL.4.02A.9809212351220.14299-100000@banshee.cs.uow.edu.au> from "Nicholas Charles Brawn" at Sep 21, 98 11:55:05 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> I'm interested in knowing whether it is possible to modify values in a > loaded lkm via userland tools. I'm aware of syscall(), but the syscall > number of the lkm may vary depending on other loaded modules. The type > of module is "misc". This is typically achieved through exportation of a pseduo-device into the device space to allow for control of the module. The LKM prototype code was, in fact, a statically linked driver on an SVR4.0.2 kernel (since I had access to System V source code through my university, and through my own transferrable SVR3.2 source licenses for three of the pieces of hardware I own -- the license came with the hardware; it's transferrable after all). I did the initial work because SVR4.0.2 did not support loadable devices. I then ported it to SunOS, which supported loadable devices, but not loadable system calls. Once in the KVA, the device driver was free to blow any data it wanted... including sysent[] entries. 8-). For system calls, the slot number is returned in the modstat, precisely because the slot may be randomly assigned. The intent is that a program loading a system call will use the modstat type interface to get this number, and then call "syscall(2)" using the number as the first argument. 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-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809212303.QAA20590>