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