From 1c7f6af676cdfbeadcff41ac6b335655050f0800 Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Sat, 1 May 2021 21:30:41 -0700 Subject: [PATCH] Updated micscif/miscif_api.c for new get_user_pages() function. At some point the function prototype changed from this: long get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, int write, int force, struct page **pages, struct vm_area_struct **vmas); into this: long get_user_pages(unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas); With the individual 'write' and 'force' flags transforming into gup_flags per this patch: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20161013002020.3062-7-lstoakes@gmail.com/ --- micscif/micscif_api.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/micscif/micscif_api.c b/micscif/micscif_api.c index e13e59d..d86cb05 100644 --- a/micscif/micscif_api.c +++ b/micscif/micscif_api.c @@ -1982,12 +1982,9 @@ retry: } pinned_pages->nr_pages = get_user_pages( - current, - mm, (uint64_t)addr, nr_pages, - !!(prot & SCIF_PROT_WRITE), - 0, + prot & SCIF_PROT_WRITE ? FOLL_WRITE : 0, pinned_pages->pages, pinned_pages->vma); up_write(&mm->mmap_sem); -- 2.20.1