I'm baffled by the i386 'current' macro. It appears to just take
the stack pointer and round it down to the next 8K alignment. How
can this work if the stack is larger than 8K and far removed from
the task_struct? Or is current only used for the kernel threads?
Kernel stack is only for the kernel. On nearly all architectures
things look like:
kernel stack -------------------------
| PAGE 2 |
-------------------------
| PAGE 1 |
| ... bottom of kstack |
| struct task_struct |
current --> -------------------------
Later,
David "Sparc" Miller
davem@caip.rutgers.edu