From owner-svn-src-all@freebsd.org Sat Jun 9 05:57:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 729BB1005F63; Sat, 9 Jun 2018 05:57:44 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4F32875F9; Sat, 9 Jun 2018 05:57:43 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w595vfZ2017538; Fri, 8 Jun 2018 22:57:41 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w595vegc017537; Fri, 8 Jun 2018 22:57:40 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201806090557.w595vegc017537@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334856 - head/sys/amd64/amd64 In-Reply-To: <201806082035.w58KZxmA085837@repo.freebsd.org> To: Tycho Nightingale Date: Fri, 8 Jun 2018 22:57:40 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2018 05:57:44 -0000 [ 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