PERFORCE change 101641 for review
Kip Macy
kmacy at FreeBSD.org
Sat Jul 15 07:55:40 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101641
Change 101641 by kmacy at kmacy_storage:sun4v_work_stable on 2006/07/15 07:54:51
fix handling of alignment faults on user addresses in copyin and umtx
Affected files ...
.. //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/trap.c#3 edit
Differences ...
==== //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/trap.c#3 (text+ko) ====
@@ -380,6 +380,31 @@
printf("trap: %ld=%s: 0x%lx at 0x%lx:0x%lx\n", trapno, trap_msg[trap_conversion[trapno]], data, tf->tf_tpc, tf->tf_tnpc);
case T_DATA_ERROR:
case T_MEM_ADDRESS_NOT_ALIGNED:
+ if (tf->tf_asi == ASI_AIUP) {
+ if (tf->tf_tpc >= (u_long)copy_nofault_begin &&
+ tf->tf_tpc <= (u_long)copy_nofault_end) {
+ tf->tf_tpc = (u_long)copy_fault;
+ tf->tf_tnpc = tf->tf_tpc + 4;
+ error = 0;
+ break;
+ }
+ if (tf->tf_tpc >= (u_long)fs_nofault_begin &&
+ tf->tf_tpc <= (u_long)fs_nofault_end) {
+ tf->tf_tpc = (u_long)fs_fault;
+ tf->tf_tnpc = tf->tf_tpc + 4;
+ error = 0;
+ break;
+ }
+ /* this is really too permissive, but it is needed to cope with umtx's
+ * casuptr
+ */
+ tf->tf_tpc = (u_long)fs_fault;
+ tf->tf_tnpc = tf->tf_tpc + 4;
+ error = 0;
+ break;
+
+
+ }
error = 1;
break;
More information about the p4-projects
mailing list