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
This commit is contained in:
parent
a62b4665f4
commit
4d20e87b7e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334856
@ -770,7 +770,8 @@ trap_pfault(struct trapframe *frame, int usermode)
|
|||||||
* If nx protection of the usermode portion of kernel page
|
* If nx protection of the usermode portion of kernel page
|
||||||
* tables caused trap, panic.
|
* 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) &&
|
PGEX_U | PGEX_I)) == (PGEX_P | PGEX_U | PGEX_I) &&
|
||||||
(curpcb->pcb_saved_ucr3 & ~CR3_PCID_MASK)==
|
(curpcb->pcb_saved_ucr3 & ~CR3_PCID_MASK)==
|
||||||
(PCPU_GET(curpmap)->pm_cr3 & ~CR3_PCID_MASK))
|
(PCPU_GET(curpmap)->pm_cr3 & ~CR3_PCID_MASK))
|
||||||
|
Loading…
Reference in New Issue
Block a user