Hello, all. I have kernel module that using mmap to communicte with usepscae program. Full code of this module
paste.org.ru/?ii68m5. Compiliting ok, but when i try to read data drom userspace program(full code of userspace program
paste.org.ru/?drk1vp) i get error "invalid address"
Code:
...
struct page *mmap_nopage(struct vm_area_struct *vma, unsigned long address, int *type)
{
struct page *page;
struct mmap_info *info;
/* is the address valid? */
if (address > vma->vm_end) {
printk("invalid address\n");
return NULL;
}
Please, help me to fix this mistake. Or if you have working mmap please sent it to me. Thank you