Why does MIPS/Linux always reserve 32 bytes in the top of each process's kernel stack space
Hi, everyone:
Why does MIPS/Linux always reserve 32 bytes in the top of each process's kernel stack space.
See arch/mips/kernel/process.c:
int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
unsigned long unused, struct task_struct *p, struct pt_regs *regs)
{
struct thread_info *ti = p->thread_info;
struct pt_regs *childregs;
long childksp;
childksp = (unsigned long)ti + THREAD_SIZE - 32;
......
}Signature · 1 line
Rongkai Zhan
Quoted 2 lines · zhan rongkai
Why does MIPS/Linux always reserve 32 bytes in the top of each process's kernel stack space.
Paranoia.
Ralf