PERFORCE change 102313 for review

Roman Divacky rdivacky at FreeBSD.org
Mon Jul 24 21:28:32 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=102313

Change 102313 by rdivacky at rdivacky_witten on 2006/07/24 21:28:00

	Safekeep handler. If we are passed descriptor \#6 change it to 3. Just to
	be safe. This doesnt happend in practise but better safe than sorry.

Affected files ...

.. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.c#10 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.h#3 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#23 edit

Differences ...

==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.c#10 (text+ko) ====


==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.h#3 (text+ko) ====

@@ -41,4 +41,10 @@
 #define LINUX_FUTEX_CMP_REQUEUE	4
 #define LINUX_FUTEX_WAKE_OP	5
 
+#define FUTEX_OP_SET            0       /* *(int *)UADDR2 = OPARG; */
+#define FUTEX_OP_ADD            1       /* *(int *)UADDR2 += OPARG; */
+#define FUTEX_OP_OR             2       /* *(int *)UADDR2 |= OPARG; */
+#define FUTEX_OP_ANDN           3       /* *(int *)UADDR2 &= ~OPARG; */
+#define FUTEX_OP_XOR            4       /* *(int *)UADDR2 ^= OPARG; */
+
 #endif /* !_LINUX_FUTEX_H */

==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#23 (text+ko) ====

@@ -475,16 +475,14 @@
 		if (idx != 6 && idx != 3)
 			return (EINVAL);
 
-#ifdef notyet			 
 		/* this doesnt happen in practice */
 		if (idx == 6) {
 		   	/* we might copy out the entry_number as 3 */
-		   	idx = info.entry_number = 3;
-			error = copyout(&info, args->desc, sizeof(struct l_user_desc));
+		   	info.entry_number = 3;
+			error = copyout(&info, (void *) td->td_frame->tf_esi, sizeof(struct l_user_desc));
 			if (error)
 	   		   	return (error);
 		}
-#endif
 
 		a[0] = LDT_entry_a(&info);
 		a[1] = LDT_entry_b(&info);


More information about the p4-projects mailing list