svn commit: r347620 - head/sys/compat/linuxkpi/common/include/asm
Johannes Lundberg
johalun at FreeBSD.org
Wed May 15 17:04:13 UTC 2019
Author: johalun
Date: Wed May 15 17:04:12 2019
New Revision: 347620
URL: https://svnweb.freebsd.org/changeset/base/347620
Log:
LinuxKPI: Update user_access_begin for Linux v5.0.
Check the new LINUXKPI_VERSION macro for backwards compatibility.
This patch is part of D19565
Reviewed by: hps
Approved by: imp (mentor), hps
MFC after: 1 week
Modified:
head/sys/compat/linuxkpi/common/include/asm/uaccess.h
Modified: head/sys/compat/linuxkpi/common/include/asm/uaccess.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/asm/uaccess.h Wed May 15 16:59:04 2019 (r347619)
+++ head/sys/compat/linuxkpi/common/include/asm/uaccess.h Wed May 15 17:04:12 2019 (r347620)
@@ -52,7 +52,11 @@ copy_from_user(void *to, const void *from, unsigned lo
#define __copy_from_user(...) copy_from_user(__VA_ARGS__)
#define __copy_in_user(...) copy_from_user(__VA_ARGS__)
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 50000
+#define user_access_begin(ptr, len) access_ok(ptr, len)
+#else
#define user_access_begin() do { } while (0)
+#endif
#define user_access_end() do { } while (0)
#define unsafe_get_user(x, ptr, err) do { \
More information about the svn-src-all
mailing list