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

tab-mTI/[email protected] (Vincent Hanquez) Sun, 24 Dec 2006 17:36:57 +0100
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
On Fri, Dec 22, 2006 at 11:47:38PM +0100, Florian Delizy wrote:
> @@ -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);

I think that's wrong.

current register value could be different than the gs you want to send.
it's actually very possible, since nowadays (2.6.20) fs hold the PDA
on i386, like gs on x64.

-- 
Vincent Hanquez

-------------------------------------------------------------------------
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