svn commit: r334856 - head/sys/amd64/amd64
Rodney W. Grimes
freebsd at pdx.rh.CN85.dnsmgr.net
Sat Jun 9 05:57:44 UTC 2018
[ Charset UTF-8 unsupported, converting... ]
> Author: tychon
> Date: Fri Jun 8 20:35:58 2018
> New Revision: 334856
> URL: https://svnweb.freebsd.org/changeset/base/334856
>
> Log:
> Don't bother looking for non-executable pages when a process is
> excluded from PTI.
>
> Reviewed by: kib
> Sponsored by: Dell EMC Isilon
> Differential Revision: https://reviews.freebsd.org/D15708
MFC?
> Modified:
> head/sys/amd64/amd64/trap.c
>
> Modified: head/sys/amd64/amd64/trap.c
> ==============================================================================
> --- head/sys/amd64/amd64/trap.c Fri Jun 8 20:31:59 2018 (r334855)
> +++ head/sys/amd64/amd64/trap.c Fri Jun 8 20:35:58 2018 (r334856)
> @@ -770,7 +770,8 @@ trap_pfault(struct trapframe *frame, int usermode)
> * If nx protection of the usermode portion of kernel page
> * tables caused trap, panic.
> */
> - if (pti && usermode && pg_nx != 0 && (frame->tf_err & (PGEX_P | PGEX_W |
> + if (PCPU_GET(curpmap)->pm_ucr3 != PMAP_NO_CR3 && usermode &&
> + pg_nx != 0 && (frame->tf_err & (PGEX_P | PGEX_W |
> PGEX_U | PGEX_I)) == (PGEX_P | PGEX_U | PGEX_I) &&
> (curpcb->pcb_saved_ucr3 & ~CR3_PCID_MASK)==
> (PCPU_GET(curpmap)->pm_cr3 & ~CR3_PCID_MASK))
>
>
--
Rod Grimes rgrimes at freebsd.org
More information about the svn-src-head
mailing list