How can I map kernel space to user space..

How can I map kernel space to user space..

Post by Kevin Sha » Wed, 08 Mar 2000 04:00:00



Is there any way to map kernel space (which is allocated in the driver)
to user space, or vice versa, so that both driver and the application
can simultaneously access to the same buffer ?

Kevin

 
 
 

How can I map kernel space to user space..

Post by Grant Edwar » Sun, 12 Mar 2000 04:00:00



>implement the mmap() call.
>it's quite simple.

That depends on whether you're mmap()ing RAM that's being
controlled by the kernel or not.  If it's a block that belongs
to a PCI card and isn't being managed by the page list
routines, it's quite trivial.  If you want to mmap() a block of
normal system RAM, it's more complicated and has to be done
differently.  For examples of both:

  ftp://ftp.visi.com/users/grante/stuff/demomm.tar.gz

Quote:>just call remap_page_range() in your mmap() >implementation.

--
Grant Edwards                   grante             Yow!  Yow! Am I cleansed
                                  at               yet?!
                               visi.com            

 
 
 

How can I map kernel space to user space..

Post by KimJinkwo » Mon, 13 Mar 2000 04:00:00


implement the mmap() call.
it's quite simple. just call remap_page_range() in your mmap()
implementation.

BTW, there's another ng named comp.os.linux.development.system


Quote:> Is there any way to map kernel space (which is allocated in the driver)
> to user space, or vice versa, so that both driver and the application
> can simultaneously access to the same buffer ?

> Kevin

 
 
 

1. Need help in understanding the mapping of user-space send, sendto, sendmsg to kernel-space sendmsg

Hello,
I am trying to implement my own transport layer protocol in Linux for
an experiment. I am going to use socket interface and add my protocol
using sock_register. For the proto_ops i can see that the parameters
for the sendmsg and recvmsg are (struct kiocb *iocb, struct socket
*sock, struct msghdr *msg, size_t len, int flags). But there are three
types of user api's send, sendto, sendmsg. Of these three only sendmsg
contains a parameter for msghdr. I find that the other two api's are
incompatible with the parameters supplied by the kernel to my kernel-
space sendmsg function. So what happens when we use send and sendto
user-space api's? Hope i am clear..

Thanks,
Bala

2. KSH builtins - undefined symbols

3. mapping user space and kernel space

4. Proper kernel switches for Linux router?

5. How can I map kernel space to user space ??

6. Scan code -> Key code translation under XFree86

7. Problem mapping PCI memory space to user space

8. libgen.h not found (regex(), regcmp() fns)

9. Kernel space to user space

10. exchange data from user space to kernel space

11. kernel space access to user space functions

12. Kernel space <-> User space

13. User space to kernel space addr translation?