Re: [PATCH v2] stackdepot: ignore junk last entry in case of switch from user mode.

2017-10-13 Thread Andrey Ryabinin
On 10/11/2017 03:43 PM, Maninder Singh wrote: > Issue observed on ARM. > > Whenever there is switch from user mode, we end up with invalid last entry > with some user space address as below:- > > save_stack+0x40/0xec > __set_page_owner+0x2c/0x64 > > > __handle_domain_irq+0x9c/0x130

Re: [PATCH v2] stackdepot: ignore junk last entry in case of switch from user mode.

2017-10-13 Thread Andrey Ryabinin
On 10/11/2017 03:43 PM, Maninder Singh wrote: > Issue observed on ARM. > > Whenever there is switch from user mode, we end up with invalid last entry > with some user space address as below:- > > save_stack+0x40/0xec > __set_page_owner+0x2c/0x64 > > > __handle_domain_irq+0x9c/0x130

Re: [PATCH v2] stackdepot: ignore junk last entry in case of switch from user mode.

2017-10-12 Thread Dmitry Vyukov
On Thu, Oct 12, 2017 at 1:10 PM, Vaneet Narang wrote: > Hi Dmitry, > >>diff --git a/lib/stackdepot.c b/lib/stackdepot.c >>index f87d138..a045748 100644 >>--- a/lib/stackdepot.c >>+++ b/lib/stackdepot.c >>@@ -214,6 +214,13 @@ depot_stack_handle_t depot_save_stack(struct

Re: [PATCH v2] stackdepot: ignore junk last entry in case of switch from user mode.

2017-10-12 Thread Dmitry Vyukov
On Thu, Oct 12, 2017 at 1:10 PM, Vaneet Narang wrote: > Hi Dmitry, > >>diff --git a/lib/stackdepot.c b/lib/stackdepot.c >>index f87d138..a045748 100644 >>--- a/lib/stackdepot.c >>+++ b/lib/stackdepot.c >>@@ -214,6 +214,13 @@ depot_stack_handle_t depot_save_stack(struct stack_trace >>*trace, >>

RE: [PATCH v2] stackdepot: ignore junk last entry in case of switch from user mode.

2017-10-12 Thread Vaneet Narang
Hi Dmitry, >diff --git a/lib/stackdepot.c b/lib/stackdepot.c >index f87d138..a045748 100644 >--- a/lib/stackdepot.c >+++ b/lib/stackdepot.c >@@ -214,6 +214,13 @@ depot_stack_handle_t depot_save_stack(struct stack_trace >*trace, > if (unlikely(trace->nr_entries == 0)) > goto

RE: [PATCH v2] stackdepot: ignore junk last entry in case of switch from user mode.

2017-10-12 Thread Vaneet Narang
Hi Dmitry, >diff --git a/lib/stackdepot.c b/lib/stackdepot.c >index f87d138..a045748 100644 >--- a/lib/stackdepot.c >+++ b/lib/stackdepot.c >@@ -214,6 +214,13 @@ depot_stack_handle_t depot_save_stack(struct stack_trace >*trace, > if (unlikely(trace->nr_entries == 0)) > goto

[PATCH v2] stackdepot: ignore junk last entry in case of switch from user mode.

2017-10-11 Thread Maninder Singh
Issue observed on ARM. Whenever there is switch from user mode, we end up with invalid last entry with some user space address as below:- save_stack+0x40/0xec __set_page_owner+0x2c/0x64 __handle_domain_irq+0x9c/0x130 gic_handle_irq+0x40/0x80 __irq_usr+0x4c/0x60 0xb6507818 So in

[PATCH v2] stackdepot: ignore junk last entry in case of switch from user mode.

2017-10-11 Thread Maninder Singh
Issue observed on ARM. Whenever there is switch from user mode, we end up with invalid last entry with some user space address as below:- save_stack+0x40/0xec __set_page_owner+0x2c/0x64 __handle_domain_irq+0x9c/0x130 gic_handle_irq+0x40/0x80 __irq_usr+0x4c/0x60 0xb6507818 So in