Date: Wed, 15 May 2019 17:04:12 +0000 (UTC) From: Johannes Lundberg <johalun@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347620 - head/sys/compat/linuxkpi/common/include/asm Message-ID: <201905151704.x4FH4Clv027049@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 { \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905151704.x4FH4Clv027049>