Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 May 2018 12:03:41 +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: r333404 - head/sys/amd64/amd64
Message-ID:  <201805091203.w49C3fMX011500@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed May  9 12:03:40 2018
New Revision: 333404
URL: https://svnweb.freebsd.org/changeset/base/333404

Log:
  Remove PG_U from the recursive pte for kernel pmap' PML4 page.
  
  This PML4 page is never used for the userspace process, so there is no
  security implications.  But the configuration trips SMAP check, which
  should be corrected.
  
  Reviewed by:	alc, markj
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Wed May  9 11:59:24 2018	(r333403)
+++ head/sys/amd64/amd64/pmap.c	Wed May  9 12:03:40 2018	(r333404)
@@ -1060,7 +1060,7 @@ create_pagetables(vm_paddr_t *firstaddr)
 	/* And recursively map PML4 to itself in order to get PTmap */
 	p4_p = (pml4_entry_t *)KPML4phys;
 	p4_p[PML4PML4I] = KPML4phys;
-	p4_p[PML4PML4I] |= X86_PG_RW | X86_PG_V | PG_U | pg_nx;
+	p4_p[PML4PML4I] |= X86_PG_RW | X86_PG_V | pg_nx;
 
 	/* Connect the Direct Map slot(s) up to the PML4. */
 	for (i = 0; i < ndmpdpphys; i++) {



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