Re: [PATCH RFC 3/6] Use %gs as the PDA base-segment in the kernel.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeremy Fitzhardinge (on Sun, 27 Aug 2006 01:44:20 -0700) wrote:
>2: entry.S constructs the stack in the shape of struct pt_regs, and this
>   is passed around the kernel so that the process's saved register
>   state can be accessed.
>--- a/arch/i386/kernel/entry.S
>+++ b/arch/i386/kernel/entry.S
>@@ -30,12 +30,14 @@
>  *	18(%esp) - %eax
>  *	1C(%esp) - %ds
>  *	20(%esp) - %es
>+ *	24(%esp) - %fs	(not saved/restored)
>+ *	28(%esp) - %gs
>+ *	2C(%esp) - orig_eax
>+ *	30(%esp) - %eip
>+ *	34(%esp) - %cs
>+ *	38(%esp) - %eflags
>+ *	3C(%esp) - %oldesp
>+ *	40(%esp) - %oldss
...
>+FS		= 0x24
>+GS		= 0x28
>+ORIG_EAX	= 0x2C
>+EIP		= 0x30
>+CS		= 0x34
>+EFLAGS		= 0x38
>+OLDESP		= 0x3C
>+OLDSS		= 0x40

Now would be a good time to get rid of those hard coded numbers and use
asm-offsets instead.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux