[5/5] openmosix/fix-i386-arch_mig_send_proc_context.patch

Florian Delizy <[email protected]> Fri, 22 Dec 2006 23:47:38 +0100
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------090800070308070305050401
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit


This patch fix the %gs/%fs handling, this is a candidate patch, I didn't 
test it on i386 I'm a amd64 guy ;)

It may or may not correct the bug as well as crash your computer and 
start the end of the world who knows ....

i386 guys, please feedback

---
hpc/arch-i386.c | 8 +++++---
1 file changed%2c 5 insertions(+)%2c 3 deletions(-)



--------------090800070308070305050401
Content-Type: text/x-patch;
 name="fix-i386-arch_mig_send_proc_context.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
	filename="fix-i386-arch_mig_send_proc_context.patch"

Subject: [@num@/@total@] @name@

This patch fix the %gs/%fs handling, this is a candidate patch, I didn't test it on i386 I'm a amd64 guy ;)

It may or may not correct the bug as well as crash your computer and start the end of the world, who knows ....

i386 guys, please feedback

---
 hpc/arch-i386.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)


Index: linux/hpc/arch-i386.c
===================================================================
--- linux.orig/hpc/arch-i386.c	2006-12-22 15:30:18.000000000 +0100
+++ linux/hpc/arch-i386.c	2006-12-22 15:30:22.000000000 +0100
@@ -186,9 +186,11 @@
 	regs = ARCH_TASK_GET_USER_REGS(p);
 	memcpy(&m->regs, regs, sizeof(struct pt_regs));
 
-	/* copy some segmentation registers */
-	m->arch.fs = p->thread.fs;
-	m->arch.gs = p->thread.gs;
+	/* There is no guaranty that %fs/%gs copie on the thread struct */
+	/* are accurate, we need the real one (TM) 			*/
+
+	savesegment(fs, m->arch.fs);
+	savesegment(gs, m->arch.gs);
 
 	for (i = 0; i < GDT_ENTRY_TLS_ENTRIES; i++)
 		m->arch.tls_array[i] = p->thread.tls_array[i];

--------------090800070308070305050401
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--------------090800070308070305050401
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
openMosix-devel mailing list
openMosix-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/openmosix-devel

--------------090800070308070305050401--