Re: kernel stack memory

2012-09-16 Thread Rajat Sharma
you have mentioned above is more of a direct method of corrupting the thread_info structure - a definitive stack corruption. Date: Thu, 13 Sep 2012 15:32:05 +0530 Subject: Re: kernel stack memory From: mujeeb.a...@gmail.com To: getaru...@gmail.com CC: shubham20...@gmail.com; kernelnewbies

Re: kernel stack memory

2012-09-15 Thread Shreyansh Jain
). In that essence what you have mentioned above is more of a direct method of corrupting the thread_info structure - a definitive stack corruption. Date: Thu, 13 Sep 2012 15:32:05 +0530 Subject: Re: kernel stack memory From: mujeeb.a...@gmail.com To: getaru...@gmail.com CC: shubham20...@gmail.com

Re: kernel stack memory

2012-09-13 Thread Kshemendra KP
Not sure for all the tasks slab is created initailly with contiguous memory. Slab cache is shrinked when the system is low on memory. If the memory is contiguous wriring few bytes after the kernel stack may corrupt a task_struct of other task and it may for eg. corrupt the linked list element

Re: kernel stack memory

2012-09-13 Thread Arun KS
Hello Shubham, On Thu, Sep 13, 2012 at 12:15 PM, shubham sharma shubham20...@gmail.comwrote: Hi, As far as i know, the size of stack allocated in the kernel space is 8Kb for each process. But in case i use more than 8Kb of memory from the stack then what will happen? I think that in that

Re: kernel stack memory

2012-09-13 Thread Rajat Sharma
The kernel stack is part of task_struct of the running process Please double check that, its not part of task_struct, rather on some architectures, kernel stack is extended by a thread_info structure at the end which keeps a link to task_struct of the process. -Rajat On Thu, Sep 13, 2012 at

Re: kernel stack memory

2012-09-13 Thread Adil Mujeeb
Hi, On Thu, Sep 13, 2012 at 1:59 PM, Arun KS getaru...@gmail.com wrote: Hello Shubham, On Thu, Sep 13, 2012 at 12:15 PM, shubham sharma shubham20...@gmail.com wrote: Hi, As far as i know, the size of stack allocated in the kernel space is 8Kb for each process. But in case i use more than

Re: kernel stack memory

2012-09-13 Thread Denis Kirjanov
At the moment of forking a new process do_fork() creates a new stack for the task by using alloc_thread_info_node(): struct page *page = alloc_pages_node(node, THREADINFO_GFP, THREAD_SIZE_ORDER); On 9/13/12, Rajat Sharma fs.ra...@gmail.com

Re: kernel stack memory

2012-09-13 Thread Ashish Sangwan
Enable this CONFIG_CC_STACKPROTECTOR and you will get crash. Stack overflow does'nt necessarily creates kernel panic ;) On Thu, Sep 13, 2012 at 5:00 PM, Denis Kirjanov kirja...@gmail.com wrote: At the moment of forking a new process do_fork() creates a new stack for the task by using

RE: kernel stack memory

2012-09-13 Thread 卜弋天
:32:05 +0530 Subject: Re: kernel stack memory From: mujeeb.a...@gmail.com To: getaru...@gmail.com CC: shubham20...@gmail.com; kernelnewbies@kernelnewbies.org Hi, On Thu, Sep 13, 2012 at 1:59 PM, Arun KS getaru...@gmail.com wrote: Hello Shubham, On Thu, Sep 13, 2012 at 12:15 PM, shubham