Mapping kernel virtual address to user virtual address
From: vishal (vishpat_at_techie.com)
Date: 05/30/04
- Previous message: Parag: "skbuff question"
- Next in thread: Kasper Dupont: "Re: Mapping kernel virtual address to user virtual address"
- Reply: Kasper Dupont: "Re: Mapping kernel virtual address to user virtual address"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 May 2004 22:22:39 -0700
Hi
I am writing a kernel module for Linux kernel 2.6. I am currently
dynamically allocating memory in the kernel module using the "kmalloc"
function call. I am basically DYNAMICALLY creating an array of
structures in the kernel module. I then plan to fill this array of
structures with data and export it to the user space. I tried using
the "do_mmap" function to map the kernel virtual address to the user
virtual address. However it fails i.e when I try accessing this memory
region in the userspace I get a segmentation fault. Can someone please
enlighten me about how do I map the memory area dynamically allocated
in the kernel space to the user space.
- Vishal
- Previous message: Parag: "skbuff question"
- Next in thread: Kasper Dupont: "Re: Mapping kernel virtual address to user virtual address"
- Reply: Kasper Dupont: "Re: Mapping kernel virtual address to user virtual address"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|