I will allocate memory in user application using malloc
and send the malloc
returned address to a kernel module through character driver interface.
I will pin the pages for this memory using get_user_pages_fast
in kernel module.
Can I use virt_to_phys
to get the address returned by malloc
.
Is it valid? If not then how can I get proper physical address?
My aim is to get physical address of user space allocated memory. I m limiting my transfer size to pagesize (4KB).