Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 May 2003 11:32:56 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 32185 for review
Message-ID:  <200305311832.h4VIWuoR013760@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=32185

Change 32185 by marcel@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 =



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305311832.h4VIWuoR013760>