Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Apr 2018 17:33:17 +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: r332504 - head/sys/amd64/amd64
Message-ID:  <201804141733.w3EHXHNd090266@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Apr 14 17:33:16 2018
New Revision: 332504
URL: https://svnweb.freebsd.org/changeset/base/332504

Log:
  Set PG_G global mapping bit on the trampoline ptes.
  
  Trampoline mappings are better treated as global since they are valid
  in all address spaces, even for PTI.  pmap_invalidate_range() must work
  on global mappings for pti since kernel_pmap invalidations are really
  same as for non-PTI.
  
  Reviewed by:	alc, markj
  Tested by:	pho
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 month
  Differential revision:	https://reviews.freebsd.org/D15052

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

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Sat Apr 14 14:57:32 2018	(r332503)
+++ head/sys/amd64/amd64/pmap.c	Sat Apr 14 17:33:16 2018	(r332504)
@@ -8000,7 +8000,7 @@ pmap_pti_add_kva_locked(vm_offset_t sva, vm_offset_t e
 	for (; sva < eva; sva += PAGE_SIZE) {
 		pte = pmap_pti_pte(sva, &unwire_pde);
 		pa = pmap_kextract(sva);
-		ptev = pa | X86_PG_RW | X86_PG_V | X86_PG_A |
+		ptev = pa | X86_PG_RW | X86_PG_V | X86_PG_A | X86_PG_G |
 		    (exec ? 0 : pg_nx) | pmap_cache_bits(kernel_pmap,
 		    VM_MEMATTR_DEFAULT, FALSE);
 		if (*pte == 0) {



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