diff options
-rw-r--r-- | sys/amd64/amd64/trap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index ebad9a0..1b6488f 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -566,8 +566,14 @@ trap_pfault(frame, usermode) map = &vm->vm_map; } + /* + * PGEX_I is defined only if the execute disable bit capability is + * supported and enabled; otherwise, that bit is reserved, i.e., zero. + */ if (frame->tf_err & PGEX_W) ftype = VM_PROT_WRITE; + else if (frame->tf_err & PGEX_I) + ftype = VM_PROT_EXECUTE; else ftype = VM_PROT_READ; |