I'm writing a Linux kernel module. A userspace process (P1) sends a virtual address and size to my kernel module. I save the virtual address (V1). It corresponds to some physical address (Ph).
Now, another userspace process (P2) calls my kernel module. In this case, I want to create a virtual address (V2) for P2, that would be mapped to the same physical address (Ph) in my kernel module.
How can I do this in the kernel module?
Also, is there any way to get the value of Ph
in the kernel module?