RE: kernel stack size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,
This stack is used by processes when they are in
kernel mode although there is overflow handling
pointer that is the maximum address chek is there(in
intel processors stack grows downwards although i
think u can make it grow upward also) i had read it
somewhere in intel docs,and this stack is ok for
process to work in kernel mode ,
and for kernel threads and modules,  kernel trusts on
them that's why the recursive code etc causing stack
overflow are avoided,that's why programming in kernel
has got certain limitation.
But yes it is possible to overflow the stack,there are

many possible ways also.
Prasanna

--- manish regmi <manish_regmi@xxxxxxxxxxx> wrote:
> >Could you please answer his query.
> >Regards
> >Syed
> >
> >Hi,
> >Why is that the stack size of linux kernel is 8k in
> >32 bit arch? Whis is this limitation and is there
> ne
> 
> Because it is more than enough. More than 8k is not
> necessary. I hope you 
> know the use of stack.
> 
> >way that I can increase the size of the stack?What
> other
> >alternatives are there in C programming so that I
> maintain
> >the size of the stack below 8k? Is there ne tool
> >by which I can know to what max extent the stack
> has reached,
> >so that I can be careful.
> >Thanks in adv.
> >regards
> >Suresh
> 
> In latest 2.6 kernels, You can compile with 4K
> stacks. You can configure 
> stack as 4k during make #config
> 
> Remember, That is a kernel stack. Each task has its
> own kernel stack which 
> is used during syscall and a user stack used in
> userspace.
> 
> regards manish
> 
>
_________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months
> FREE*. 
> http://join.msn.com/?page=features/virus
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux
> kernel.
> Archive:      
> http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux