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) {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to