Writing on Proccess Address Space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I working on a kernel module and I have been a little bit comfused with
Linux memory manager.

When a user opens the device,the module stores somewhere user's
active_mm pointer.We can assume that only one user can open the device
at the same time. When a interrupt comes to my handler, I want to write
some data to a page of the user. The interrupt handler has the
destination address,and the length of the data that must be copied and
of course the data. The problem is that the destination address is from
address space of the user. At first,through user's active_mm, I find if
the user have access to the memory region that device must write. AFAIK
I cannot use copy_to_user function, or something like this, because
these functions can used only from the user proccess.

So the question is how to "convert" the destination memory address to
interrupt handler address space, so the handler can write the data to
the correct place.

Regards,

Stavros Passas


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux