Date: Fri, 8 Jun 2018 22:57:40 -0700 (PDT) From: "Rodney W. Grimes" <freebsd@pdx.rh.CN85.dnsmgr.net> To: Tycho Nightingale <tychon@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334856 - head/sys/amd64/amd64 Message-ID: <201806090557.w595vegc017537@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201806082035.w58KZxmA085837@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[ 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@freebsd.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806090557.w595vegc017537>