Re: [x86] do_arch_prctl

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Lacombe
Date: Wednesday, November 19, 2008 - 4:35 pm

Thanks for your answer, I've got one last question ;)
In the ARCH_GET_GS, can you explain the line 834 to 838?

In fact, at first sight I thought that just the line 836 was sufficient, but I 
obviously miss the case where MSR_KERNEL_GS_BASE does not reflect the value 
requested, hence my question.

828 case ARCH_GET_GS: {
829                 unsigned long base;
830                 unsigned gsindex;
831                 if (task->thread.gsindex == GS_TLS_SEL)
832                         base = read_32bit_tls(task, GS_TLS);
833                 else if (doit) {
834                         asm("movl %%gs,%0" : "=r" (gsindex));
835                         if (gsindex)
836                                 rdmsrl(MSR_KERNEL_GS_BASE, base);
837                         else
838                                 base = task->thread.gs;
839                 }
840                 else
841                         base = task->thread.gs;

Thanks,

	Eric


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [x86] do_arch_prctl - bug?, Eric Lacombe, (Tue Nov 18, 10:35 am)
Re: [x86] do_arch_prctl - bug?, Eric Lacombe, (Tue Nov 18, 4:44 pm)
Re: [x86] do_arch_prctl - bug?, Jeremy Fitzhardinge, (Tue Nov 18, 6:07 pm)
Re: [x86] do_arch_prctl - bug?, Eric Lacombe, (Wed Nov 19, 2:23 am)
Re: [x86] do_arch_prctl - bug?, Jeremy Fitzhardinge, (Wed Nov 19, 2:06 pm)
Re: [x86] do_arch_prctl, Eric Lacombe, (Wed Nov 19, 4:35 pm)
Re: [x86] do_arch_prctl, Jeremy Fitzhardinge, (Wed Nov 19, 5:07 pm)
Re: [x86] do_arch_prctl, Eric Lacombe, (Wed Nov 19, 5:22 pm)
Re: [x86] do_arch_prctl, Eric Lacombe, (Mon Nov 24, 5:24 am)
Re: [x86] do_arch_prctl, Jeremy Fitzhardinge, (Mon Nov 24, 11:22 am)
Re: [x86] do_arch_prctl, Eric Lacombe, (Mon Nov 24, 12:28 pm)