On 4/17/07, srinivas bakki <srinivas.bakki@xxxxxxxxx> wrote:
> > Sorry if I misunderstood you. I agree with Srinivas than > remap_pfn_range() could be your solution. However, seems like you need > to create a VMA first (that could be created in user space via > mmap(). You must also pass user space start address... So IMHO you > need to coordinate between the kernel code and user space app i.e User > space need to tell the kernel code, which VMA should be used. Hi, The call to mmap in the user space creates vm_area_struct with available virtual addresses by the kernel ( file subsystem in particular) . This vm_start, vm_end and kernel logical address must be used to call remap_pfn_range. this maps the kernel logical addresses to the addresses described by the vm_area_struct. CMIIW Regards Srinivas Bakki
This is all correct. But i think the problem put by Thomas is something different. Suppose i have a kernel buffer which is mmaped into user-space. Now inside some ioctl implementation(not in mmap), if I want to find the corresponding user address(mmaped start address) for a kernel buffer start address, is there any kernel function which can be used ? OR Is there any function available for resolving the kernel logical addr to user virt addr translation(if mmaped) ? This is my interpretation. CMIIW yogeshwar -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ