Re: [PATCH V4] ARM : unwinder : Prevent data abort due to stack overflow

2013-12-06 Thread Dave Martin
On Thu, Dec 05, 2013 at 03:15:22PM +, Anurag Aggarwal wrote: > >>if (unlikely(check) && > >>*vsp >= (unsigned long *)ctrl->sp_high)) > > Good idea, It can help in optimizing the code and will leave code more > readable > and it will be easy to maintain also. That was my goal -- it's not

Re: [PATCH V4] ARM : unwinder : Prevent data abort due to stack overflow

2013-12-06 Thread Dave Martin
On Thu, Dec 05, 2013 at 03:15:22PM +, Anurag Aggarwal wrote: if (unlikely(check) *vsp = (unsigned long *)ctrl-sp_high)) Good idea, It can help in optimizing the code and will leave code more readable and it will be easy to maintain also. That was my goal -- it's not always easy

Re: [PATCH V4] ARM : unwinder : Prevent data abort due to stack overflow

2013-12-05 Thread Anurag Aggarwal
>>if (unlikely(check) && >>*vsp >= (unsigned long *)ctrl->sp_high)) Good idea, It can help in optimizing the code and will leave code more readable and it will be easy to maintain also. >>Does the code check anywhere that SP is word-aligned? >> >>That should probably be checked if it's not

Re: [PATCH V4] ARM : unwinder : Prevent data abort due to stack overflow

2013-12-05 Thread Dave Martin
On Thu, Dec 05, 2013 at 11:26:25AM +, Anurag Aggarwal wrote: > While unwinding backtrace, stack overflow is possible. This stack > overflow can sometimes lead to data abort in system if the area after > stack is not mapped to physical memory. > > To prevent this problem from happening,

[PATCH V4] ARM : unwinder : Prevent data abort due to stack overflow

2013-12-05 Thread Anurag Aggarwal
While unwinding backtrace, stack overflow is possible. This stack overflow can sometimes lead to data abort in system if the area after stack is not mapped to physical memory. To prevent this problem from happening, execute the instructions that can cause a data abort in separate helper

[PATCH V4] ARM : unwinder : Prevent data abort due to stack overflow

2013-12-05 Thread Anurag Aggarwal
While unwinding backtrace, stack overflow is possible. This stack overflow can sometimes lead to data abort in system if the area after stack is not mapped to physical memory. To prevent this problem from happening, execute the instructions that can cause a data abort in separate helper

Re: [PATCH V4] ARM : unwinder : Prevent data abort due to stack overflow

2013-12-05 Thread Dave Martin
On Thu, Dec 05, 2013 at 11:26:25AM +, Anurag Aggarwal wrote: While unwinding backtrace, stack overflow is possible. This stack overflow can sometimes lead to data abort in system if the area after stack is not mapped to physical memory. To prevent this problem from happening, execute the

Re: [PATCH V4] ARM : unwinder : Prevent data abort due to stack overflow

2013-12-05 Thread Anurag Aggarwal
if (unlikely(check) *vsp = (unsigned long *)ctrl-sp_high)) Good idea, It can help in optimizing the code and will leave code more readable and it will be easy to maintain also. Does the code check anywhere that SP is word-aligned? That should probably be checked if it's not done already.