Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing breakage for kernel version 6.10 or above #19

Merged
merged 6 commits into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions memflow-kmod/vmtools.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,12 @@ static int memflow_vm_mem_mmap(struct file *file, struct vm_area_struct *vma)

static unsigned long memflow_vm_mem_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags)
{
struct vm_mem_data *data = file->private_data;
return get_unmapped_area(data->wrapped_vma->vm_file, addr, len, pgoff + data->wrapped_vma->vm_pgoff, flags);
struct vm_mem_data *data = file->private_data;
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,10,0)
return get_unmapped_area(data->wrapped_vma->vm_file, addr, len, pgoff + data->wrapped_vma->vm_pgoff, flags);
#else
return mm_get_unmapped_area(data->wrapped_task->mm, data->wrapped_vma->vm_file, addr, len, pgoff + data->wrapped_vma->vm_pgoff, flags);
#endif
}

static const struct file_operations memflow_vm_mem_fops = {
Expand Down
Loading