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

Florian Delizy <[email protected]> Tue, 02 Jan 2007 12:02:45 +0100
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
Vincent Hanquez wrote:
> 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.
>
>   
Thanks for that point, actually, it's the way it's done in 2.6.17, (look 
at the entry.S code), but it has probably changed on recent version, and 
since we planned to merge with 2.6.20 ... I keep this email in safe place.

Anyway, that have to stay that way on 2.6.17, but I'll double check it

thanks again

Florian

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