Author: markj Date: Mon Sep 23 14:11:59 2019 New Revision: 352622 URL: https://svnweb.freebsd.org/changeset/base/352622
Log: Set NX in mappings created by pmap_kenter() and pmap_kenter_attr(). There does not appear to be any existing need for such mappings to be executable. Reviewed by: alc, kib MFC after: 1 month Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21754 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Sep 23 13:45:50 2019 (r352621) +++ head/sys/amd64/amd64/pmap.c Mon Sep 23 14:11:59 2019 (r352622) @@ -3134,7 +3134,7 @@ pmap_kenter(vm_offset_t va, vm_paddr_t pa) pt_entry_t *pte; pte = vtopte(va); - pte_store(pte, pa | X86_PG_RW | X86_PG_V | pg_g); + pte_store(pte, pa | X86_PG_RW | X86_PG_V | pg_g | pg_nx); } static __inline void @@ -3145,7 +3145,7 @@ pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mo pte = vtopte(va); cache_bits = pmap_cache_bits(kernel_pmap, mode, 0); - pte_store(pte, pa | X86_PG_RW | X86_PG_V | pg_g | cache_bits); + pte_store(pte, pa | X86_PG_RW | X86_PG_V | pg_g | pg_nx | cache_bits); } /* _______________________________________________ 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"