Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, I have following problem. I need to allocate pretty big amount of memory in kernel module to store there some data, but kmalloc fails to allocate it. On the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    1

    Accessing user memory from kernel module


    Hello,
    I have following problem.

    I need to allocate pretty big amount of memory in kernel module to store there some data, but kmalloc fails to allocate it.
    On the other hand in the user space I can allocate such an amount.
    The question is, if I allocate memory and store the data in the user space, how can I access it from the kernel module without using copy_from_user?

    Can anyone help me with this?

    Thanks

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    The thing is you don't access it from the kernel module, you access it from the user program that's running the kernel module functionality so you should be able to pass it a pointer from the allocate data...I hope this makes sense Gerard4143
    Make mine Arch Linux

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •