Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jan 2018 12:07:24 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r327816 - in head/sys: amd64/amd64 i386/i386
Message-ID:  <201801111207.w0BC7O9p094919@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Jan 11 12:07:24 2018
New Revision: 327816
URL: https://svnweb.freebsd.org/changeset/base/327816

Log:
  Update comment explaining the check, to reality.
  
  Discussed with:	jhb
  Sponsored by:	The FreeBSD Foundation
  MFC after:	3 days

Modified:
  head/sys/amd64/amd64/support.S
  head/sys/i386/i386/support.s

Modified: head/sys/amd64/amd64/support.S
==============================================================================
--- head/sys/amd64/amd64/support.S	Thu Jan 11 09:42:24 2018	(r327815)
+++ head/sys/amd64/amd64/support.S	Thu Jan 11 12:07:24 2018	(r327816)
@@ -249,12 +249,10 @@ 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 kernel.  We do not
+	 * verify that user did not specified a rogue address anywhere else.
 	 */
-
 	/*
 	 * First, prevent address wrapping.
 	 */

Modified: head/sys/i386/i386/support.s
==============================================================================
--- head/sys/i386/i386/support.s	Thu Jan 11 09:42:24 2018	(r327815)
+++ head/sys/i386/i386/support.s	Thu Jan 11 12:07:24 2018	(r327816)
@@ -291,12 +291,10 @@ 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 kernel.  We do not
+	 * verify that user did not specified a rogue address anywhere else.
 	 */
-
 	/*
 	 * First, prevent address wrapping.
 	 */



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