PERFORCE change 32185 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sat May 31 11:32:58 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=32185
Change 32185 by marcel at marcel_nfs on 2003/05/31 11:32:38
Page faults that happen by code running in the gateway page should
not be treated as kernel faults, but as user faults. We operate on
user manipulated addresses here (signal trampolines). Since the
gateway page is the only kernel code running with user privileges,
avoid a VA range check and simply check the privilege level.
Affected files ...
.. //depot/projects/ia64/sys/ia64/ia64/trap.c#54 edit
Differences ...
==== //depot/projects/ia64/sys/ia64/ia64/trap.c#54 (text+ko) ====
@@ -696,7 +696,13 @@
goto out;
no_fault_in:
- if (!user) {
+ /*
+ * Additionally check the privilege level. We don't want to
+ * panic when we're in the gateway page, running at user
+ * level.
+ */
+ if (!user && (framep->tf_special.psr & IA64_PSR_CPL)
+ == IA64_PSR_CPL_KERN) {
/* Check for copyin/copyout fault. */
if (td != NULL && td->td_pcb->pcb_onfault != 0) {
framep->tf_special.iip =
More information about the p4-projects
mailing list