Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2018 09:29:06 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r327959 - in stable/11/sys: amd64/amd64 i386/i386
Message-ID:  <201801140929.w0E9T6nP056378@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Jan 14 09:29:06 2018
New Revision: 327959
URL: https://svnweb.freebsd.org/changeset/base/327959

Log:
  MFC r327816, r327834:
  Update comment explaining the check, to reality.

Modified:
  stable/11/sys/amd64/amd64/support.S
  stable/11/sys/i386/i386/support.s
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/support.S
==============================================================================
--- stable/11/sys/amd64/amd64/support.S	Sun Jan 14 06:03:40 2018	(r327958)
+++ stable/11/sys/amd64/amd64/support.S	Sun Jan 14 09:29:06 2018	(r327959)
@@ -225,12 +225,11 @@ ENTRY(copyout)
 	jz	done_copyout
 
 	/*
-	 * Check explicitly for non-user addresses.  If 486 write protection
-	 * is being used, this check is essential because we are in kernel
-	 * mode so the h/w does not provide any protection against writing
-	 * kernel addresses.
+	 * Check explicitly for non-user addresses.  This check is essential
+	 * because it prevents usermode from writing into the kernel.  We do
+	 * not verify anywhere else that the user did not specify a rogue
+	 * address.
 	 */
-
 	/*
 	 * First, prevent address wrapping.
 	 */

Modified: stable/11/sys/i386/i386/support.s
==============================================================================
--- stable/11/sys/i386/i386/support.s	Sun Jan 14 06:03:40 2018	(r327958)
+++ stable/11/sys/i386/i386/support.s	Sun Jan 14 09:29:06 2018	(r327959)
@@ -284,12 +284,11 @@ ENTRY(copyout)
 	jz	done_copyout
 
 	/*
-	 * Check explicitly for non-user addresses.  If 486 write protection
-	 * is being used, this check is essential because we are in kernel
-	 * mode so the h/w does not provide any protection against writing
-	 * kernel addresses.
+	 * Check explicitly for non-user addresses.  This check is essential
+	 * because it prevents usermode from writing into the kernel.  We do
+	 * not verify anywhere else that the user did not specify a rogue
+	 * address.
 	 */
-
 	/*
 	 * First, prevent address wrapping.
 	 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801140929.w0E9T6nP056378>