Giter VIP home page Giter VIP logo

Comments (3)

qosmio avatar qosmio commented on July 18, 2024

Having the same issue. Not sure if you were able to make an progress since Aug?

from cryptodev-linux.

horiag avatar horiag commented on July 18, 2024

Looks like this is due to commit 8e50b8b07f46 ("mm: replace get_user_pages() write/force parameters with gup_flags") from linux-stable/linux-4.4.y, included in release v4.4.168.

Linux kernel version checking in __get_userbuf() has to be updated.

from cryptodev-linux.

kingforaday avatar kingforaday commented on July 18, 2024

Kernel 4.4.y doesn't implement get_user_pages_remote(). As horiag mentioned, in 4.4.168 the force flag from get_user_pages was removed:

@@ -1195,19 +1199,17 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
 		      struct vm_area_struct **vmas, int *nonblocking);
 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,
+		    unsigned int gup_flags, struct page **pages,
 		    struct vm_area_struct **vmas);

Making the change to zc.c worked.

diff --git a/zc.c b/zc.c
index 2c286bb..46c0ca1 100644
--- a/zc.c
+++ b/zc.c
@@ -65,7 +65,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
 #endif
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0))
        ret = get_user_pages(task, mm,
-                       (unsigned long)addr, pgcount, write, 0, pg, NULL);
+                       (unsigned long)addr, pgcount, write, pg, NULL);
 #elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0))
        ret = get_user_pages_remote(task, mm,
                        (unsigned long)addr, pgcount, write, 0, pg, NULL);

from cryptodev-linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.