On Fri, 21 Feb 2003, nataraja kumar wrote:
> hi,
> my apologies if i am wrong. please let me know
> why does kernel use kernel stack when process jumps
> from user mode to kernel mode. why can't user stack
> be used ?
>
> nattu.
Because if a user-stack was used, any user could crash the kernel
and take down the system.
main()
{
__asm__ __volatile__("movl $0x08, %esp\n");
/* Only enough stack to push 0 and call exit() */
exit(0); /* Ultimately a sys-call */
}
Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.
-
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/
This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:34 EST