Re: 2.5.69-mjb1

Martin J. Bligh (mbligh@aracnet.com)
Mon, 12 May 2003 06:43:11 -0700


--On Monday, May 12, 2003 08:34:13 -0700 Dave Hansen <haveblue@us.ibm.com> wrote:

> Martin J. Bligh wrote:
>> OK, so maybe I'm still asleep, but I don't see why the hardcoded
>> magic constant (grrr) is 4096 in mainline, when the stacksize is 8K.
>> Presumably the 1019*4 makes up the rest of it? Maybe the real question
>> is what the hell was whoever wrote that in the first place smoking ? ;-)
>> Why on earth would you skip halfway through the stack with one stupid
>> magic constant, and then the rest of the way with another?
>
> You can go ask the author:
>
> http://linus.bkbits.net:8080/linux-2.5/diffs/include/asm-i386/processor.h@1.12?nav=index.html|src/|src/include|src/include/asm-i386|hist/include/asm-i386/processor.h

-#define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1019])
-#define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1022])
...
+#define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1019])
+#define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1022])

Nope, not his fault, really.

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