Sharing memory between kernel and user space

From: Brian D. McGrew
Date: Tue May 30 2006 - 18:32:13 EST


I have a question about the best way to share memory between user and
kernel space.

Let's say I have a common structure;

struct counter {
u_long interrupt_counts;
bool saw_interupt;
}

And I need to be able to modify these elements from both the kernel and
user space. What is the best way to allocate this??? I've tried
several methods including __get_free_pages, alloc_pages, vmalloc and so
on; and thus far, I'm just confused myself.

Can someone help me out here with a quick example of some sort???

Thanks,

:b!

Brian D. McGrew { brian@xxxxxxxxxxxxx || brian@xxxxxxxxxxxxxxxxxxx }
--
> This is a test. This is only a test!
Had this been an actual emergency, you would have been
told to cancel this test and seek professional assistance!

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/