summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-12-23 19:28:15 +0000
committerjhb <jhb@FreeBSD.org>2016-12-23 19:28:15 +0000
commit47736d6328c101b7feaf37b7e7f2b8b02bbe9cb0 (patch)
treee93264c73bc28a993d41c2dc965cf399aeaba613 /sys/amd64
parent6fe3572ab85710ef08eb56757141d76abee70c0b (diff)
downloadFreeBSD-src-47736d6328c101b7feaf37b7e7f2b8b02bbe9cb0.zip
FreeBSD-src-47736d6328c101b7feaf37b7e7f2b8b02bbe9cb0.tar.gz
MFC 308820,308821: Fixes for fatal page faults on x86.
308820: Report page faults due to reserved bits in PTEs as a separate fault type. Rather than reporting a page fault due to a bad PTE as a protection violation with the "rsv" flag, treat these faults as a separate type of fault altogether. 308821: MFamd64: Various fatal page fault fixes. - If a page fault is triggered due to reserved bits in a PTE, treat it as a fatal fault and panic. - If PG_NX is in use, report whether a fatal page fault is due to an instruction fetch or a data access. - If a fatal page fault is due to reserved bits in a PTE, report that as the page fault type rather than a protection violation.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/trap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index beb6ab6..ab52a7e 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -812,11 +812,11 @@ trap_fatal(frame, eva)
#endif
if (type == T_PAGEFLT) {
printf("fault virtual address = 0x%lx\n", eva);
- printf("fault code = %s %s %s%s, %s\n",
+ printf("fault code = %s %s %s, %s\n",
code & PGEX_U ? "user" : "supervisor",
code & PGEX_W ? "write" : "read",
code & PGEX_I ? "instruction" : "data",
- code & PGEX_RSV ? " rsv" : "",
+ code & PGEX_RSV ? "reserved bits in PTE" :
code & PGEX_P ? "protection violation" : "page not present");
}
printf("instruction pointer = 0x%lx:0x%lx\n",
OpenPOWER on IntegriCloud