what's the purpose for the few bytes at the end of kernel stack
Dander.He at sonymobile.com
Tue Nov 6 20:24:49 EST 2012
Recently I’m studying linux kernel. I have a question about the space after struct pt_regs in kernel stack.
Why reserved 8 bytes at the end of kernel stack for ARM and 32 bytes for MIPS?
Do you know what’s the purpose for it? Who and where use it?
I checked the real kernel stack for some processes. Some of them are all zero. Some of them are not.
Here are some sample data on ARM for those 8 bytes in different kernel stack:
1. In arm, it’s reserved 8 bytes
#define THREAD_START_SP (THREAD_SIZE - 8)
2. In mips, it’s reserved 32 bytes.
* Offset to the current process status flags, the first 32 bytes of the
* stack are not used.
#define ST_OFF (_THREAD_SIZE - 32 - PT_SIZE + PT_STATUS)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the linux-arm-kernel