kernel vm question
Zera William Holladay
zholla1 at uic.edu
Thu Jan 27 07:51:34 PST 2005
On Thu, 27 Jan 2005, Jacques Fourie wrote:
> Hi,
>
> I have a kernel module with the following entry point :
>
> static int test_modevent(module_t mod, int type, void *unused)
> {
> int s;
> unsigned char *p = NULL;
> unsigned char v = 0x55;
>
> switch (type)
> {
> case MOD_LOAD:
> p = (unsigned char *)ip_output;
What is ip_output? Do you believe it is a function or variable? It might
help if you just state to yourself in your native language what you want
to do here.
> s = splhigh();
>
> v = p[0]; /* Page fault without this line */
> p[0] = v;
The above makes no sense. Why would you assign v to p[0] and then set
p[0] to the value of v? What is the error message you get? Also, it
might help to compile with -Wall since it help to catch some subtle
errors.
Good luck,
-Zera
More information about the freebsd-hackers
mailing list