mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-18 14:23:55 +00:00
Pass VM_PROT_EXECUTE to vm_fault() instead of VM_PROT_READ if the page
fault was caused by an instruction fetch.
This commit is contained in:
parent
7d2498889f
commit
079ba18aac
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161066
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue