Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 May 2019 03:58:42 +0000 (UTC)
From:      Johannes Lundberg <johalun@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r348085 - stable/12/sys/compat/linuxkpi/common/include/asm
Message-ID:  <201905220358.x4M3wgeP046781@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: johalun
Date: Wed May 22 03:58:41 2019
New Revision: 348085
URL: https://svnweb.freebsd.org/changeset/base/348085

Log:
  MFC r347620:
  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

Modified:
  stable/12/sys/compat/linuxkpi/common/include/asm/uaccess.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linuxkpi/common/include/asm/uaccess.h
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/include/asm/uaccess.h	Wed May 22 03:54:25 2019	(r348084)
+++ stable/12/sys/compat/linuxkpi/common/include/asm/uaccess.h	Wed May 22 03:58:41 2019	(r348085)
@@ -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?201905220358.x4M3wgeP046781>