Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Oct 2006 11:24:17 GMT
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 107545 for review
Message-ID:  <200610091124.k99BOH7n002774@repoman.freebsd.org>

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

Change 107545 by rdivacky@rdivacky_witten on 2006/10/09 11:24:06

	Use segment 4 instead of 3. This enables amd64 bash to start (ie. its working).

Affected files ...

.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#10 edit

Differences ...

==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#10 (text+ko) ====

@@ -647,13 +647,13 @@
 		 * looks like we're getting the idx we returned
 		 * in the set_thread_area() syscall
 		 */
-		if (idx != 6 && idx != 3)
+		if (idx != 6 && idx != 4)
 			return (EINVAL);
 
 		/* this doesnt happen in practice */
 		if (idx == 6) {
-		   	/* we might copy out the entry_number as 3 */
-		   	info.entry_number = 3;
+		   	/* we might copy out the entry_number as 4 */
+		   	info.entry_number = 4;
 			error = copyout(&info, (void *) td->td_frame->tf_rsi, sizeof(struct l_user_desc));
 			if (error)
 	   		   	return (error);
@@ -1221,10 +1221,10 @@
 
 	/* 
 	 * we support just GLIBC TLS now 
-	 * we should let 3 proceed as well because we use this segment so
+	 * we should let 4 proceed as well because we use this segment so
 	 * if code does two subsequent calls it should succeed
 	 */
-	if (idx != 6 && idx != -1 && idx != 3)
+	if (idx != 6 && idx != -1 && idx != 4)
 		return (EINVAL);
 
 	/* 
@@ -1233,7 +1233,7 @@
 	 * XXX: what if userspace program doesnt check this value and tries
 	 * to use 6, 7 or 8? 
 	 */
-	idx = info.entry_number = 3;
+	idx = info.entry_number = 4;
 	error = copyout(&info, args->desc, sizeof(struct l_user_desc));
 	if (error)
 		return (error);



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