Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8693859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:38:27+00:00 2026-06-13T00:38:27+00:00

My question is how do we pass back the mmap’d area back to the

  • 0

My question is how do we pass back the mmap’d area back to the module so that it can manipulate that memory.

What I am looking for is this:

  1. My user space application runs using several hundred threads (so its hard to keep track of which buffer the kernel has given to which user-space thread).
  2. The user thread calls mmap function of the module and after getting it, it fills the buffer with data.
  3. Then it has to pass this buffer to the module using ioctl() to the module so that the module does some processing and modify the buffer.
  4. User space thread reads the new data

I’m not sure as to how “step 3” can be implemented. Is there anyway to pass this user-buffer to the module so that it knows which address it is in the kernel space?

(I can’t use malloc or copy_from_user)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:38:28+00:00Added an answer on June 13, 2026 at 12:38 am

    Check if virt_to_phys() works for you.

    1. The userspace-thread calls mmap().
    2. Obtains buffer address, fills the buffer with data.
    3. Passes buffer address back to to the module using ioctl().
    4. Module calls virt_to_phys(addr), does processing on buffer.
    5. Later, userspace-thread reads the processed data.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create an executable that can be called and pass back
I've this question about pass some instances by ref or not: here is my
This is a follow-up question to ASP.NET How to pass container value as javascript
This question is regarding getopt function in php. I need to pass two parameter
This is a follow-up to a question I asked a few weeks back. The
In my application, I throw WebApplicationExceptions for exception cases so that I can pass
related (sort of) to this question. I have written a script that will loop
This is a newbie question. What is the best way to pass an object
I have a theoretical question: 1) How pass a variable to the system of
The question I have is exactly same in requirement as How to pass mouse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.