Re: [PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-16 Thread Ravi Bangoria
Hi Michael, On Friday 16 June 2017 10:42 AM, Michael Ellerman wrote: > > That function (perf_get_regs_user()) didn't exist until 4.7, ie: > > ed4a4ef85cf5 ("powerpc/perf: Add support for sampling interrupt register > state") > > So there must be something else going on. > > I'll hold off on

Re: [PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-16 Thread Ravi Bangoria
Hi Michael, On Friday 16 June 2017 10:42 AM, Michael Ellerman wrote: > > That function (perf_get_regs_user()) didn't exist until 4.7, ie: > > ed4a4ef85cf5 ("powerpc/perf: Add support for sampling interrupt register > state") > > So there must be something else going on. > > I'll hold off on

Re: [PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-15 Thread Michael Ellerman
Ravi Bangoria writes: > When a kthread makes a call_usermodehelper() call the steps are: > a. allocates current->mm > b. load_elf_binary() > c. populates current->thread.regs > > While doing this, interrupts are not disabled. If there is a perf > interrupt in

Re: [PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-15 Thread Michael Ellerman
Ravi Bangoria writes: > When a kthread makes a call_usermodehelper() call the steps are: > a. allocates current->mm > b. load_elf_binary() > c. populates current->thread.regs > > While doing this, interrupts are not disabled. If there is a perf > interrupt in the middle of this process (i.e.

Re: [PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-15 Thread Ravi Bangoria
Thanks Naveen, On Thursday 15 June 2017 08:57 PM, Naveen N. Rao wrote: > Hmm... are you sure it's the same issue? The above commit only went into > v4.7, which means we weren't able to use --call-graph=dwarf till v4.7. Yes sorry. It's from v4.7 onwards. -Ravi

Re: [PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-15 Thread Ravi Bangoria
Thanks Naveen, On Thursday 15 June 2017 08:57 PM, Naveen N. Rao wrote: > Hmm... are you sure it's the same issue? The above commit only went into > v4.7, which means we weren't able to use --call-graph=dwarf till v4.7. Yes sorry. It's from v4.7 onwards. -Ravi

Re: [PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-15 Thread Naveen N. Rao
On 2017/06/15 07:16PM, Ravi Bangoria wrote: > When a kthread makes a call_usermodehelper() call the steps are: > a. allocates current->mm > b. load_elf_binary() > c. populates current->thread.regs > > While doing this, interrupts are not disabled. If there is a perf > interrupt in the middle

Re: [PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-15 Thread Naveen N. Rao
On 2017/06/15 07:16PM, Ravi Bangoria wrote: > When a kthread makes a call_usermodehelper() call the steps are: > a. allocates current->mm > b. load_elf_binary() > c. populates current->thread.regs > > While doing this, interrupts are not disabled. If there is a perf > interrupt in the middle

[PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-15 Thread Ravi Bangoria
When a kthread makes a call_usermodehelper() call the steps are: a. allocates current->mm b. load_elf_binary() c. populates current->thread.regs While doing this, interrupts are not disabled. If there is a perf interrupt in the middle of this process (i.e. step 'a' has completed but not yet

[PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-15 Thread Ravi Bangoria
When a kthread makes a call_usermodehelper() call the steps are: a. allocates current->mm b. load_elf_binary() c. populates current->thread.regs While doing this, interrupts are not disabled. If there is a perf interrupt in the middle of this process (i.e. step 'a' has completed but not yet