Bug on syscall error test for 64 bits apps

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Mar 26 17:58:21 EST 2004


Hi !

It seems that we have a bug in the syscall exit code path, where
we use a 32 bits compare to check if the result is an error, thus
potentially returning spurrious error SO bits in CR to userspace
for 64 bits applications.

If anybody found a problem that could be caused by that, test the
enclosed patch. I'd appreciate some regression testing for people
without a problem as well. I intend to push to Linus in a couple
of days at most.

===== arch/ppc64/kernel/entry.S 1.32 vs edited =====
--- 1.32/arch/ppc64/kernel/entry.S	Fri Mar 19 16:59:29 2004
+++ edited/arch/ppc64/kernel/entry.S	Fri Mar 26 17:56:07 2004
@@ -139,7 +139,7 @@
 91:
 #endif
 	li	r10,-_LAST_ERRNO
-	cmpl	0,r3,r10
+	cmpld	0,r3,r10
 	blt	30f
 	neg	r3,r3
 22:	ld	r10,_CCR(r1)	/* Set SO bit in CR */

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list