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

Patch for kernel 4.12.4 #69

Open
wangxa opened this issue Jul 29, 2017 · 2 comments
Open

Patch for kernel 4.12.4 #69

wangxa opened this issue Jul 29, 2017 · 2 comments

Comments

@wangxa
Copy link

wangxa commented Jul 29, 2017

The uaccess.h has moved from asm to linux in Kernel 4.12, so would you like add the following patch?

-#include <asm/uaccess.h>	         /* copy_*_user */
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0)
+#include <asm/uaccess.h>             /* copy_*_user */
+#else
+#include <linux/uaccess.h>           /* copy_*_user */
+#endif
@tytso
Copy link

tytso commented Aug 3, 2017

Actually, linux/uaccess.h has always existed since at least 3.10 -- and includes asm/uaccess.h.

So I think the right thing to do is to just unconditionally include <asm/uaccess.h>

-#include <asm/uaccess.h> /* copy_user /
+#include <linux/uaccess.h> /
copy
_user */

@zhelezov
Copy link

zhelezov commented Oct 3, 2017

So, is this the reason for this build failure:

error: implicit declaration of function 'copy_from_user' [-Werror=implicit-function-declaration]
     if (copy_from_user( input, buff, len )) {
         ^~~~~~~~~~~~~~

Edit: Yeah, including linux/uaccess.h instead of asm/uaccess.h results in a successful build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants