summaryrefslogtreecommitdiff
path: root/sys/src/9/bcm64
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-08-27 03:47:18 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2019-08-27 03:47:18 +0200
commit2149600d129944f60cbc858bc669193af0523409 (patch)
tree89cd2d2b36e204bbb50ed2159ebdbf7f2cd7e01c /sys/src/9/bcm64
parent128ea44a89c7905612ad2fa5a61a9325ddfb5e1e (diff)
kernel: catch execution read fault on SG_NOEXEC segment
fault() now has an additional pc argument that is used to detect fault on a non-executable segment. that is, we check on read fault if the segment has the SG_NOEXEC attribute and the program counter is within faulting page.
Diffstat (limited to 'sys/src/9/bcm64')
-rw-r--r--sys/src/9/bcm64/trap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/bcm64/trap.c b/sys/src/9/bcm64/trap.c
index e64e41e77..3d74362a3 100644
--- a/sys/src/9/bcm64/trap.c
+++ b/sys/src/9/bcm64/trap.c
@@ -472,7 +472,7 @@ faultarm64(Ureg *ureg)
case 8: case 9: case 10: case 11: // Access flag fault.
case 12: case 13: case 14: case 15: // Permission fault.
case 48: // tlb conflict fault.
- if(fault(addr, read) == 0)
+ if(fault(addr, ureg->pc, read) == 0)
break;
/* wet floor */