Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Apr 2018 15:35:58 +0000 (UTC)
From:      "Jonathan T. Looney" <jtl@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: r332827 - stable/11/sys/amd64/amd64
Message-ID:  <201804201535.w3KFZwiK091916@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jtl
Date: Fri Apr 20 15:35:58 2018
New Revision: 332827
URL: https://svnweb.freebsd.org/changeset/base/332827

Log:
  MFC r330511:
    We shouldn't need to execute code in the recursive page table mappings;
    therefore, it should be safe to set the NX bit on the PML4E for the
    recursive page table mappings.  According to the Intel docs, the effect
    of the NX bit should propogate to any page reached through a PML4E which
    has the NX bit set.
  
  Sponsored by:	Netflix, Inc.

Modified:
  stable/11/sys/amd64/amd64/pmap.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/11/sys/amd64/amd64/pmap.c	Fri Apr 20 15:28:58 2018	(r332826)
+++ stable/11/sys/amd64/amd64/pmap.c	Fri Apr 20 15:35:58 2018	(r332827)
@@ -984,7 +984,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;
+	p4_p[PML4PML4I] |= X86_PG_RW | X86_PG_V | PG_U | 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?201804201535.w3KFZwiK091916>